Valkyrien-Skies-2 icon indicating copy to clipboard operation
Valkyrien-Skies-2 copied to clipboard

NullPointerException on server restart

Open bradyj04 opened this issue 6 months ago • 0 comments

This issue occurs when only Valkyrien Skies and addons are installed and no other mods

  • [X] I have tested this issue and it occurs when no other mods are installed

Minecraft Version

1.20.x

Mod Loader

Fabric

Issue description

Get this error when restarting server with the mod, if i had to guess id say it was because a steering wheel was destroyed before the ship was disassembled. [18:34:22] [Server thread/ERROR]: Exception stopping the server java.lang.NullPointerException: Cannot invoke "org.valkyrienskies.core.apigame.world.ServerShipWorldCore.setGameServer(org.valkyrienskies.core.apigame.GameServer)" because "this.shipWorld" is null at net.minecraft.server.MinecraftServer.handler$gjl000$valkyrienskies$preStopServer(MinecraftServer.java:11655) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_3782(MinecraftServer.java) ~[server-intermediary.jar:?] at net.minecraft.class_3176.method_3782(class_3176.java:537) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:703) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:265) ~[server-intermediary.jar:?] at java.lang.Thread.run(Thread.java:1583) ~[?:?]

Hoping its not a terribly hard fix, may just be adding checks for the Null pointer. should note, this was after multiple successful launches, the only difference is we messed around stuff in this mod before restarting it and getting this issue

Issue reproduction

Create some ships, explode them, restart server. May reproduce the same issue.

Logs

latest.log

bradyj04 avatar Jul 31 '24 22:07 bradyj04