Soft crash when switching multiplayer and single player instances
Bobcat64 opened this issue ยท 2 comments
If I disconnect from my multiplayer instance and load my single player creative instance the first load does a soft crash with a message of 'This connection has been terminated' back to the multiplayer menu (not the single player world selection).
Now after this occurs, if I go back and load that creative single player instance again it loads without issue.
Wasn't until I looked into the logs that I discovered that apparently the same error that crashes the single player, is logged when I connect to the multiplayer server (though only logged on the client, server reports no such error). It is also what makes me suspect it is related to rendering the turbine rotor (I have a complete one setup with glass in both).
Behavior appears to be:
- Fresh MC Launch -> Creative SP = Success
- Fresh MC Launch -> Multiplayer = Success
- disconnect from Creative SP -> load Multiplayer = Success (though errors logged on client only)
- disconnect from Multiplayer -> load Creative SP = Soft crash back to Multiplayer Server selection
- Attempting to load Creative SP afterward succeeds
Full disclosure there are some exceptions also being thrown by Open Computers on initial load up of the single player instance, but they seem to be related to registering JEI recipes and aren't crashing the connection.
What I believe to be the relevant error is (stack abbreviated, you can see the full in the file):
[12:30:06] [Netty Server IO #5/ERROR]: There was a critical exception handling a packet on channel nuclearcraft
java.lang.NullPointerException: null
at net.minecraftforge.fml.common.network.FMLOutboundHandler$OutboundTarget$5.selectNetworks(FMLOutboundHandler.java:162) ~[FMLOutboundHandler$OutboundTarget$5.class:?]
at net.minecraftforge.fml.common.network.FMLOutboundHandler.write(FMLOutboundHandler.java:378) ~[FMLOutboundHandler.class:?]
<io.netty calls omitted>
at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.sendToAll(SimpleNetworkWrapper.java:236) ~[SimpleNetworkWrapper.class:?]
at nc.multiblock.turbine.TurbineLogic.onTurbineFormed(TurbineLogic.java:178) ~[TurbineLogic.class:?]
at nc.multiblock.turbine.TurbineLogic.onMachineAssembled(TurbineLogic.java:84) ~[TurbineLogic.class:?]
at nc.multiblock.turbine.Turbine.onMachineAssembled(Turbine.java:147) ~[Turbine.class:?]
at nc.multiblock.Multiblock.assembleMachine(Multiblock.java:437) ~[Multiblock.class:?]
at nc.multiblock.Multiblock.checkIfMachineIsWhole(Multiblock.java:415) ~[Multiblock.class:?]
at nc.multiblock.turbine.Turbine.checkIfMachineIsWhole(Turbine.java:192) ~[Turbine.class:?]
at nc.multiblock.MultiblockWorldRegistry.processMultiblockChanges(MultiblockWorldRegistry.java:243) ~[MultiblockWorldRegistry.class:?]
at nc.multiblock.MultiblockRegistry.tickStart(MultiblockRegistry.java:92) ~[MultiblockRegistry.class:?]
at nc.multiblock.MultiblockHandler.onClientTick(MultiblockHandler.java:51) ~[MultiblockHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_548_MultiblockHandler_onClientTick_ClientTickEvent.invoke(.dynamic) ~[?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
<Minecraft and Forge Launcher calls omitted.>
[12:30:06] [Netty Server IO #5/ERROR]: Network Disconnect: A fatal error has occurred, this connection is terminated
[12:30:06] [Netty Local Client IO #2/INFO]: Client disconnected from server
My guess is the issue is in onTurbineFormed(TurbineLogic.java:178)
and something with how the packet is created, or when it is being sent. That line is conditionally called if it should render the turbine rotor.
The NPE pointing to Forge's code is on a line that makes a chain of function calls with the last few being obfuscated names. But this looks like code that is ran very often for many mods, and appears to be getting the iterator for all connected players.
Full Log (multiple connections): latest.log
NC Overhaul version: 2o.3.5
Forge version: 1.12.2-14.23.5.2854
Uploaded version 2o.3.6 which hopfully fixes the problem :)