RFTools

RFTools

74M Downloads

java.lang.NullPointerException crashing sever at startup.

QuImUfu opened this issue ยท 4 comments

commented

Issue description:
java.lang.NullPointerException crashing sever at startup.

Steps to reproduce:
Somehow (no idea how) get an "bad" world and start the server. If you want the server folder i can upload it.

Versions:

  • Minecraft: 1.10.2
  • Forge: 12.18.3.2185
  • CompatLayer: compatlayer-1.10-0.2.2.jar
  • McJtyLib: mcjtylib-1.1x-2.3.8
  • RFTools: rftools-1.1x-5.84

Relevant log:

java.lang.NullPointerException
	at mcjty.lib.varia.BlockTools.reorient(BlockTools.java:61) ~[BlockTools.class:?]
	at mcjty.lib.varia.BlockTools.reorient(BlockTools.java:39) ~[BlockTools.class:?]
	at mcjty.rftools.blocks.relay.RelayTileEntity.receiveEnergy(RelayTileEntity.java:163) ~[RelayTileEntity.class:?]
	at mcjty.rftools.blocks.relay.RelayEnergyStorage.receiveEnergy(RelayEnergyStorage.java:19) ~[RelayEnergyStorage.class:?]
	at com.rwtema.extrautils2.power.energy.EnergyTransfer.sendPower(EnergyTransfer.java:139) ~[EnergyTransfer.class:?]
	at com.rwtema.extrautils2.power.energy.EnergyTransfer.onServerTick(EnergyTransfer.java:116) ~[EnergyTransfer.class:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_318_EnergyTransfer_onServerTick_ServerTickEvent.invoke(.dynamic) ~[?:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:185) ~[EventBus.class:?]
	at net.minecraftforge.fml.common.FMLCommonHandler.onPreServerTick(FMLCommonHandler.java:274) ~[FMLCommonHandler.class:?]
	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:602) ~[MinecraftServer.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471) [MinecraftServer.class:?]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]

My guess:
this is caused by EnumFacing side beeing nullable in RelayEnergyStorage.java but in mcjty.lib.varia.BlockTools.reorient side is assumed to be not null.

commented

I recommend enabling the forge option to remove invalid tile entities (in forge.cfg) so that you can start up your world. I have no clue what caused this and I also no longer develop on 1.10.2

commented

The remove invalid tile entities option in forge only removes TileEntities that error in the update() method of said TileEntities, and does therefore not help me. I will try to fix the issue myself. If i succeed, do you want a pull request, or do you not plan to update 1.10.2 versions at all?

commented

Hmm I don't even have a 1.10 dev env anymore. Also the 1.10 versions of my mods are not used that much anymore at this time

commented

This issue was fixed in 4993c5a#diff-f2fc4eb993432ed24fd28c5ca53a17a5
for 1.12. I made a backport for my server, that seems to work fine and prevents the crash. Do you want me to polish it up, test it and submit a pull request or would that be useless work as you will not update the 1.11/1.10 version of the mod anyway?