Applied Energistics 2

Applied Energistics 2

156M Downloads

NPE in TheOneProbe support on a dedicated server

shartte opened this issue ยท 0 comments

commented

Git revision 38f6bf1 (1.15.2 master).

TheOneProbe info provider for powered tile entities will use appeng.util.Platform#formatPowerLong which will throw an NPE since AEConfig.instance().getSelectedPowerUnit() is a client-only setting and the server cannot know the setting of the current player.

[12:31:02] [Server thread/DEBUG] [mc.th.TheOneProbe/]: The One Probe catched error: 
java.lang.NullPointerException: null
	at appeng.api.config.PowerUnits.convertTo(PowerUnits.java:61) ~[classes/:?] {re:classloading}
	at appeng.util.Platform.formatPowerLong(Platform.java:167) ~[classes/:?] {re:classloading,pl:runtimedistcleaner:A}
	at appeng.integration.modules.theoneprobe.tile.PowerStorageInfoProvider.addProbeInfo(PowerStorageInfoProvider.java:49) ~[classes/:?] {re:classloading}
	at appeng.integration.modules.theoneprobe.TileInfoProvider.addProbeInfo(TileInfoProvider.java:69) ~[classes/:?] {re:classloading}
	at mcjty.theoneprobe.network.PacketGetInfo.getProbeInfo(PacketGetInfo.java:136) ~[TheOneProbe-1.15-1.15-2.0.4-5_mapped_snapshot_20200715-1.15.1.jar:1.15-2.0.4-5] {re:classloading}
	at mcjty.theoneprobe.network.PacketGetInfo.lambda$handle$0(PacketGetInfo.java:100) ~[TheOneProbe-1.15-1.15-2.0.4-5_mapped_snapshot_20200715-1.15.1.jar:1.15-2.0.4-5] {re:classloading}
	at net.minecraftforge.fml.network.NetworkEvent$Context.enqueueWork(NetworkEvent.java:215) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200715-1.15.1-recomp.jar:?] {re:classloading}
	at mcjty.theoneprobe.network.PacketGetInfo.handle(PacketGetInfo.java:97) ~[TheOneProbe-1.15-1.15-2.0.4-5_mapped_snapshot_20200715-1.15.1.jar:1.15-2.0.4-5] {re:classloading}
	at net.minecraftforge.fml.network.simple.IndexedMessageCodec.lambda$tryDecode$3(IndexedMessageCodec.java:128) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200715-1.15.1-recomp.jar:?] {re:classloading}
	at java.util.Optional.ifPresent(Optional.java:159) ~[?:1.8.0_121] {}
	at net.minecraftforge.fml.network.simple.IndexedMessageCodec.tryDecode(IndexedMessageCodec.java:128) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200715-1.15.1-recomp.jar:?] {re:classloading}
	at net.minecraftforge.fml.network.simple.IndexedMessageCodec.consume(IndexedMessageCodec.java:162) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200715-1.15.1-recomp.jar:?] {re:classloading}
	at net.minecraftforge.fml.network.simple.SimpleChannel.networkEventListener(SimpleChannel.java:80) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200715-1.15.1-recomp.jar:?] {re:classloading}
	at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:212) ~[eventbus-2.2.0-service.jar:?] {}
	at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:204) ~[eventbus-2.2.0-service.jar:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258) ~[eventbus-2.2.0-service.jar:?] {}
	at net.minecraftforge.fml.network.NetworkInstance.dispatch(NetworkInstance.java:84) ~[?:?] {re:classloading}
	at net.minecraftforge.fml.network.NetworkHooks.lambda$onCustomPayload$1(NetworkHooks.java:78) ~[?:?] {re:classloading}
	at java.util.Optional.map(Optional.java:215) ~[?:1.8.0_121] {}
	at net.minecraftforge.fml.network.NetworkHooks.onCustomPayload(NetworkHooks.java:78) ~[?:?] {re:classloading}
	at net.minecraft.network.play.ServerPlayNetHandler.processCustomPayload(ServerPlayNetHandler.java:1366) ~[?:?] {re:classloading}
	at net.minecraft.network.play.client.CCustomPayloadPacket.processPacket(CCustomPayloadPacket.java:51) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.network.play.client.CCustomPayloadPacket.processPacket(CCustomPayloadPacket.java:12) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:19) ~[?:?] {re:classloading}
	at net.minecraft.util.concurrent.TickDelayedTask.run(TickDelayedTask.java:20) [?:?] {re:classloading}
	at net.minecraft.util.concurrent.ThreadTaskExecutor.run(ThreadTaskExecutor.java:140) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.util.concurrent.RecursiveEventLoop.run(RecursiveEventLoop.java:22) [?:?] {re:classloading}
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:759) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}