Draconic Evolution

Draconic Evolution

77M Downloads

server crash when vein mining IO crystals

sithrak opened this issue ยท 2 comments

commented

Hello,
I've encountered a crash related to this mod. A player on my server used vein mining when ripping up a first tier IO crystal. There were four of them in a horizontal diamond pattern, each one diagonally adjacent to two others with an empty block between them.
The nether star generators they were connected to had already been removed
Seems to be a crash when oreexcavator and draconicevolution interact.

Minecraft details (FTB SkyFactory3)
Minecraft Version: 1.10.2
draconicevolution: 2.0.8

Trace:

Description: Exception in server tick loop
java.lang.NullPointerException: Exception in server tick loop
        at com.brandon3055.brandonscore.blocks.TileBCBase.getState(TileBCBase.java:222)
        at com.brandon3055.draconicevolution.blocks.energynet.tileentity.TileCrystalBase.getTier(TileCrystalBase.java:354)
        at com.brandon3055.draconicevolution.blocks.energynet.tileentity.TileCrystalBase.writeRetainedData(TileCrystalBase.java:532)
        at com.brandon3055.brandonscore.blocks.TileBCBase.func_189515_b(TileBCBase.java:262)
        at oreexcavation.undo.BlockHistory.<init>(BlockHistory.java:33)
        at oreexcavation.handlers.MiningAgent.tickMiner(MiningAgent.java:211)
        at oreexcavation.handlers.MiningScheduler.tickAgents(MiningScheduler.java:133)
        at oreexcavation.handlers.EventHandler.onTick(EventHandler.java:178)
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_453_EventHandler_onTick_ServerTickEvent.invoke(.dynamic)
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
        at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:185)
        at net.minecraftforge.fml.common.FMLCommonHandler.onPostServerTick(FMLCommonHandler.java:261)
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:657)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471)
        at java.lang.Thread.run(Thread.java:745)

full log

commented

After poking around in the code (I'm not familiar with minecraft programming but I have a programming / RE background) my suspicion is that worldObj.getBlockState(pos) is returning NULL.
Can that return NULL?

I suspect the vein miner hits it because its destroying all of them at once
when it goes down the "writeRemainingData" path, it tries to tell the adjacent node that one of its connections has been destroyed (didn't look at the code, just guessing what it would be writing), but its also gone, so it null derefs

commented

I will add a patch on my end to fix this but this crash should never happen.

worldObj.getBlockState(pos) will NEVER return null. If there is no block at the position it will return air.
That means worldObj must be null and worldObj should NEVER be null unless oreexcavator is screwing with it which it but it shouldn't be because that would break things... like this.

On second thought getBlockType() may be returning null. But same thing that should never be null...