KubeJS

KubeJS

61M Downloads

Crash on spongeforge when stop server

ChihHao-Su opened this issue · 1 comments

commented

When using kobejs with spongeforge mod, shutting down the server can cause kubrjs crash with theese log below.
After remove the spongeforge mod, the server can stop normally without any problems。

[13:24:51] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: Done (5.830s)! For help, type "help" or "?"
>asdfasdfasdf
[13:24:55] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: Unknown command. Try /help for a list of commands
>save-all
[13:24:58] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: Saving...
[13:24:58] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: Saved the world
>stop
[13:25:01] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: Stopping the server
[13:25:01] [Server thread/ERROR] [net.minecraft.server.MinecraftServer]: Encountered an unexpected exception
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from KubeJS (kubejs)

Caused by: java.lang.ArrayIndexOutOfBoundsException: 31
at it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap$MapIterator.nextEntry(Int2ObjectOpenHashMap.java:642) ~[Int2ObjectOpenHashMap$MapIterator.class:?]
at it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap$ValueIterator.next(Int2ObjectOpenHashMap.java:876) ~[Int2ObjectOpenHashMap$ValueIterator.class:?]
at dev.latvian.kubejs.world.KubeJSWorldEventHandler.onServerStopping(KubeJSWorldEventHandler.java:66) ~[KubeJSWorldEventHandler.class:?]
at dev.latvian.kubejs.KubeJS.onServerStopping(KubeJS.java:160) ~[KubeJS.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_251]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_251]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_251]
at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:637) ~[forge-1.12.2-14.23.5.2838-universal.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_251]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_251]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_251]
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[minecraft_server.1.12.2.jar:?]
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[minecraft_server.1.12.2.jar:?]
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[minecraft_server.1.12.2.jar:?]
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[minecraft_server.1.12.2.jar:?]
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[minecraft_server.1.12.2.jar:?]
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[minecraft_server.1.12.2.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[minecraft_server.1.12.2.jar:?]
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219) ~[forge-1.12.2-14.23.5.2838-universal.jar:?]
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197) ~[forge-1.12.2-14.23.5.2838-universal.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_251]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_251]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_251]
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[minecraft_server.1.12.2.jar:?]
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[minecraft_server.1.12.2.jar:?]
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[minecraft_server.1.12.2.jar:?]
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[minecraft_server.1.12.2.jar:?]
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[minecraft_server.1.12.2.jar:?]
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[minecraft_server.1.12.2.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[minecraft_server.1.12.2.jar:?]
at net.minecraftforge.fml.common.LoadController.redirect$zza000$forgeImpl$PostEvent(LoadController.java:568) ~[LoadController.class:?]
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136) ~[LoadController.class:?]
at net.minecraftforge.fml.common.Loader.serverStopping(Loader.java:805) ~[Loader.class:?]
at net.minecraftforge.fml.common.FMLCommonHandler.handleServerStopping(FMLCommonHandler.java:308) ~[FMLCommonHandler.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:533) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_251]
[13:25:01] [Server thread/INFO] [STDOUT]: [net.minecraft.crash.CrashReport:func_85057_a:300]: Negative index in crash report handler (0/5)
[13:25:01] [Server thread/ERROR] [net.minecraft.server.MinecraftServer]: This crash report has been saved to: D:\NPCCRAFT\2020_1.12.2\NPC_KFW_SERVER_2020.\crash-reports\crash-2020-06-19_13.25.01-server.txt
[13:25:01] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Stopping server
[13:25:01] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving players
[13:25:01] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving worlds
[13:25:01] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving chunks for level 'world'/0
[13:25:01] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving chunks for level 'DIM-1'/-1
[13:25:01] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving chunks for level 'DIM1'/1
[13:25:01] [Server thread/INFO] [Sponge]: Unloading world [world] (minecraft:overworld/0)
[13:25:01] [Server thread/INFO] [Sponge]: Unloading world [DIM-1] (minecraft:nether/-1)
[13:25:01] [Server thread/INFO] [Sponge]: Unloading world [DIM1] (minecraft:the_end/1)
[13:25:01] [Server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.

commented

Its possible this was fixed, but Sponge isn't supposed anyway