SquidDev-CC / CCTweaks

Random additions to ComputerCraft (somewhat deprecated, use CC-Tweaked if you're on Minecraft 1.12).
MIT License
12 stars 2 forks source link

MovingWorld crash #100

Closed dshadowwolf closed 8 years ago

dshadowwolf commented 8 years ago

In an attempt to use "Archimedes Ships Plus" its support library appears to have triggered a null-pointer dereference in CCTweaks.

To me it appears as though MovingWorld attempts to set the "ship" into motion and this causes a connection issue with the network cables and/or modems while CCTweaks is running its "onServerTick" handler.

To be honest I'm not sure if the crash belongs here or should be reported to ComputerCrafts issue tracker directly, so I am going to do both.

Forgot this, initially: Forge Version: 10.13.4.1614 Minecraft: 1.7.10 ComputerCraft: 1.75 CCTweaks: 3.3.7

Crash log from the server follows:
[21:22:25] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.NullPointerException
at dan200.computercraft.shared.peripheral.common.TilePeripheralBase.getPeripheralType(TilePeripheralBase.java:103) ~[TilePeripheralBase.class:?]
at dan200.computercraft.shared.peripheral.modem.TileCable$2.canConnect(TileCable_Patch.java:109) ~[TileCable$2.class:?]
at org.squiddev.cctweaks.core.network.NetworkHelpers.getAdjacentNodes(NetworkHelpers.java:45) ~[NetworkHelpers.class:?]
at org.squiddev.cctweaks.core.network.NetworkHelpers.getAdjacentNodes(NetworkHelpers.java:35) ~[NetworkHelpers.class:?]
at org.squiddev.cctweaks.core.network.AbstractWorldNode.getConnectedNodes(AbstractWorldNode.java:30) ~[AbstractWorldNode.class:?]
at org.squiddev.cctweaks.core.network.cable.SingleModemCable.getConnectedNodes(SingleModemCable.java:25) ~[SingleModemCable.class:?]
at org.squiddev.cctweaks.core.network.AbstractWorldNode.connect(AbstractWorldNode.java:37) ~[AbstractWorldNode.class:?]
at org.squiddev.cctweaks.core.network.cable.BasicCable.connect(BasicCable.java:68) ~[BasicCable.class:?]
at org.squiddev.cctweaks.core.network.cable.SingleModemCable.connect(SingleModemCable.java:19) ~[SingleModemCable.class:?]
at dan200.computercraft.shared.peripheral.modem.TileCable$3.run(TileCable_Patch.java:143) ~[TileCable$3.class:?]
at org.squiddev.cctweaks.core.FmlEvents.onServerTick(FmlEvents.java:48) ~[FmlEvents.class:?]
at cpw.mods.fml.common.eventhandler.ASMEventHandler_184_FmlEvents_onServerTick_ServerTickEvent.invoke(.dynamic) ~[?:?]
at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]
at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140) ~[EventBus.class:?]
at cpw.mods.fml.common.FMLCommonHandler.onPreServerTick(FMLCommonHandler.java:260) ~[FMLCommonHandler.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:536) ~[MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:396) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [li.class:?]
SquidDev commented 8 years ago

See dan200/ComputerCraft#105. I'm going to dig into the MovingWorld souce to see if this is avoidable there.

SquidDev commented 8 years ago

This isn't fixed, but I'm closing it as I can't do any more. The above commit should prevent similar issues with other mods/scenarios.

dshadowwolf commented 8 years ago

I'd have attempted to find a fix myself, but I am woefully unprepared for Java after spending many long years learning the tricks of C and C++ and transitioning to Perl and Python.

DRH

On Mon, May 23, 2016 at 3:45 PM, SquidDev notifications@github.com wrote:

This isn't fixed, but I'm closing it as I can't do any more. The above commit should prevent similar issues with other mods/scenarios.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/SquidDev-CC/CCTweaks/issues/100#issuecomment-221074853