Chunky (Bukkit)

Chunky (Bukkit)

20.6k Downloads

Crash after cancelling task and starting new one with circle shape

mainrs opened this issue ยท 3 comments

commented

I wanted to generate a circle instead of a square. So I cancelled my previous task and used a circle instead. I got this exception.

[15Aug2024 15:56:53.707] [Chunky-minecraft:overworld Thread/INFO] [net.minecraft.server.MinecraftServer/]: [Chunky] Task stopped for minecraft:overworld.
[15Aug2024 15:56:53.715] [Render thread/INFO] [net.minecraft.client.gui.components.ChatComponent/]: [CHAT] [Chunky] Cancelling all tasks.
[15Aug2024 15:57:36.598] [Server thread/ERROR] [net.minecraft.server.MinecraftServer/]: Encountered an unexpected exception
java.lang.NoClassDefFoundError: org/popcraft/chunky/shape/Circle
	at org.popcraft.chunky.shape.ShapeFactory.getShape(ShapeFactory.java:16) ~[Chunky-1.2.164.jar%2379!/:1.2.164]
	at org.popcraft.chunky.shape.ShapeFactory.getShape(ShapeFactory.java:10) ~[Chunky-1.2.164.jar%2379!/:1.2.164]
	at org.popcraft.chunky.GenerationTask.<init>(GenerationTask.java:46) ~[Chunky-1.2.164.jar%2379!/:1.2.164]
	at org.popcraft.chunky.command.StartCommand.lambda$execute$4(StartCommand.java:82) ~[Chunky-1.2.164.jar%2379!/:1.2.164]
	at org.popcraft.chunky.command.StartCommand.execute(StartCommand.java:91) ~[Chunky-1.2.164.jar%2379!/:1.2.164]
	at org.popcraft.chunky.ChunkyForge.lambda$onServerStarting$1(ChunkyForge.java:57) ~[Chunky-1.2.164.jar%2379!/:1.2.164]
	at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:263) ~[brigadier-1.0.18.jar%2322!/:?]
	at net.minecraft.commands.Commands.m_82117_(Commands.java:234) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.m_9957_(ServerGamePacketListenerImpl.java:1150) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.m_143628_(ServerGamePacketListenerImpl.java:1129) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.m_7388_(ServerGamePacketListenerImpl.java:1115) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.network.protocol.game.ServerboundChatPacket.m_5797_(ServerboundChatPacket.java:30) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.network.protocol.game.ServerboundChatPacket.m_5797_(ServerboundChatPacket.java:7) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.network.protocol.PacketUtils.m_131356_(PacketUtils.java:22) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:157) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:799) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:164) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:131) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:782) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:776) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:116) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:761) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:689) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:261) ~[client-1.18.2-20220404.173914-srg.jar%23225!/:?]
	at java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: java.lang.ClassNotFoundException: org.popcraft.chunky.shape.Circle
	at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:141) ~[securejarhandler-1.0.8.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]
	... 27 more
commented

This is not a bug. The most likely cause of this is replacing/deleting the mod file while the server is running, from my experience, although it could be due to another issue. Either way, it's something outside of the mod.

commented

Thanks for clarifying! I can ensure that it did not happen due to file movement on my side while the server was running. It sounds like it's similar to #313.

commented

No worries. Yes it is the same issue, but the class it occurs with will be completely random. This can happen with basically any class in any mod or plugin given the circumstances.

Even if you aren't sure how you caused it, most likely you shouldn't run into this again with normal usage.