Slimefun

Slimefun

3M Downloads

NullPointerException when triggering hologram projector updates via chat message

L4BORG opened this issue · 4 comments

commented

❗ Checklist

  • I am using the official english version of Slimefun and did not modify the jar.
  • I am using an up to date "DEV" (not "RC") version of Slimefun.
  • I am aware that issues related to Slimefun addons need to be reported on their bug trackers and not here.
  • I searched for similar open issues and could not find an existing bug report on this.

📍 Description

com.destroystokyo.paper.exception.ServerSchedulerException: Task #34239066 for Slimefun vDEV - 999 (git e02eedd9) generated an exception
	at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:498)
	at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1567)
	at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:490)
	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1483)
	at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1282)
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.NullPointerException: Cannot invoke "String.trim()" because "in" is null
	at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1838)
	at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.base/java.lang.Double.parseDouble(Double.java:651)
	at Slimefun4.jar//io.github.thebusybiscuit.slimefun4.implementation.items.blocks.HologramProjector.getArmorStand(HologramProjector.java:135)
	at Slimefun4.jar//io.github.thebusybiscuit.slimefun4.implementation.items.blocks.HologramProjector.lambda$openEditor$1(HologramProjector.java:109)
	at Slimefun4.jar//io.github.thebusybiscuit.slimefun4.libraries.dough.chat.ChatInput$1.onChat(ChatInput.java:58)
	at Slimefun4.jar//io.github.thebusybiscuit.slimefun4.libraries.dough.chat.ChatInputListener.lambda$checkInput$1(ChatInputListener.java:79)
	at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101)
	at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483)
	at app//net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1567)
	at app//net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:490)
	at app//net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1483)
	at app//net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1282)
	... 2 more

📑 Reproduction Steps

I saw a lot of those, but I'm not sure why I don't think NULL could end up in HologramProjector?

💡 Expected Behavior

Not sure, maybe the solution would be to skip HologramProjector on null?

📷 Screenshots / Videos

No response

📜 Server Log

No response

📂 /error-reports/ folder

No response

💻 Server Software

Paper

🎮 Minecraft Version

1.17.x

⭐ Slimefun version

> sf versions
[03:04:41 INFO]: This Server uses the following setup of Slimefun:
Paper git-Paper-408 (MC: 1.17.1)
Slimefun DEV - 999 (git e02eedd9)
Metrics-Module #28
Java 17

Installed Addons: (3)
  EcoPower vDEV - 5 (git 5c1ecd68)
  SlimefunLuckyBlocks vDEV - 36 (git 60f0c8dc)
  ExoticGarden vDEV - 77 (git a2c4b6d3)

🧭 Other plugins

No response

commented

To reproduce it you need to click edit text and break hologram projector. When you type in chat something it throws an exception.

commented

Caused by:

double offset = Double.parseDouble(BlockStorage.getLocationInfo(projector.getLocation(), OFFSET_PARAMETER));

So the offset is not stored anymore, this shouldn't ever happen unless someone resets data. Did you happen to modify or remove some SF data for the blocks around here (or just for the whole world)?

Without reproduction steps finding this would be insanely hard but a simple "fix" (which isn't actually a fix, just avoiding the problem)

commented

By changing SF data you mean like edit SF files? In data-storage folder? I'm pretty sure nobody touched those.

Would it be possible this is caused by missing armor stand? For example if we have a plugin that would limit number of armor stands per chunk and if there are too many it would start despawning them.

commented

I've tested this, I can't replicate exception by removing armor stands... so I'm guessing it's something else.