Matter changes in machines cause network channel NullPointerExceptions
fatalerrorcoded opened this issue ยท 9 comments
As long as a machine is getting or consuming matter, the error log is absolutely flooded with NullPointerExceptions. In the case of fusion reactors, having enough of them running causes the game to start lagging.
[19:46:31] [Client thread/ERROR] [FML]: SimpleChannelHandlerWrapper exception
java.lang.NullPointerException: null
at net.minecraftforge.fml.common.network.FMLOutboundHandler$OutboundTarget$7.selectNetworks(FMLOutboundHandler.java:224) ~[FMLOutboundHandler$OutboundTarget$7.class:?]
at net.minecraftforge.fml.common.network.FMLOutboundHandler.write(FMLOutboundHandler.java:378) ~[FMLOutboundHandler.class:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111) ~[MessageToMessageEncoder.class:4.1.9.Final]
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116) ~[MessageToMessageCodec.class:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1032) ~[DefaultChannelPipeline.class:4.1.9.Final]
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:296) ~[AbstractChannel.class:4.1.9.Final]
at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.sendToAllAround(SimpleNetworkWrapper.java:264) ~[SimpleNetworkWrapper.class:?]
at matteroverdrive.network.PacketPipeline.sendToAllAround(PacketPipeline.java:122) ~[PacketPipeline.class:?]
at matteroverdrive.tile.MOTileEntityMachineMatter.updateClientMatter(MOTileEntityMachineMatter.java:47) ~[MOTileEntityMachineMatter.class:?]
at matteroverdrive.data.MachineMatterStorage.setMatterStored(MachineMatterStorage.java:61) ~[MachineMatterStorage.class:?]
at matteroverdrive.network.packet.client.PacketMatterUpdate$ClientHandler.handleClientMessage(PacketMatterUpdate.java:44) ~[PacketMatterUpdate$ClientHandler.class:?]
at matteroverdrive.network.packet.client.PacketMatterUpdate$ClientHandler.handleClientMessage(PacketMatterUpdate.java:36) ~[PacketMatterUpdate$ClientHandler.class:?]
at matteroverdrive.network.packet.AbstractPacketHandler.lambda$onMessage$0(AbstractPacketHandler.java:24) ~[AbstractPacketHandler.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_312]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_312]
at net.minecraft.util.Util.func_181617_a(Util.java:47) [h.class:?]
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1088) [bib.class:?]
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398) [bib.class:?]
at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_312]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_312]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_312]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_312]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_312]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_312]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_312]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_312]
at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:210) [NewLaunch.jar:?]
at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:245) [NewLaunch.jar:?]
at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]
Fixed in 0.7.6 but also have a bunch of other issues I've found mucking around with this
Turns out this issue occurs any time the matter value in any machine changes - be it increase or decrease - but it's most obvious on reactors, since those start lagging the game because of this.
this needs alot more info as ive had servers online for weeks and not had any issues...
I should clarify: this happens only on the client-side, nothing gets logged on the server-side. While I can't try it myself right now I noticed: isn't this supposed to be !world.isRemote
and not world != null
so it doesn't get called on the client side?
I am playing on a server, every client in the vicinity gets the above exception when a machine's matter changes. I've tried and it doesn't happen in singleplayer.