Baubles

Baubles

116M Downloads

ClientCrashlog Spam when Playing on a Server

Speiger opened this issue ยท 3 comments

commented

I just recently started my IC2Classic server beta test and since i support baubles with it i decided to put it on.

And as soon i open the Baubles i get a crashlog on my client (while playing on my server)

[00:40:25] [Client thread/ERROR]: SimpleChannelHandlerWrapper exception
java.lang.NullPointerException
	at net.minecraftforge.fml.common.network.FMLOutboundHandler$OutboundTarget$6.selectNetworks(FMLOutboundHandler.java:179) ~[FMLOutboundHandler$OutboundTarget$6.class:?]
	at net.minecraftforge.fml.common.network.FMLOutboundHandler.write(FMLOutboundHandler.java:293) ~[FMLOutboundHandler.class:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:658) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:716) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:651) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
	at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:112) ~[MessageToMessageEncoder.class:4.0.23.Final]
	at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116) ~[MessageToMessageCodec.class:4.0.23.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:658) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:716) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:706) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:741) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
	at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:895) ~[DefaultChannelPipeline.class:4.0.23.Final]
	at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:240) ~[AbstractChannel.class:4.0.23.Final]
	at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.sendToDimension(SimpleNetworkWrapper.java:282) [SimpleNetworkWrapper.class:?]
	at baubles.common.event.EventHandlerEntity.playerTick(EventHandlerEntity.java:114) [EventHandlerEntity.class:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_13_EventHandlerEntity_playerTick_LivingUpdateEvent.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.common.ForgeHooks.onLivingUpdate(ForgeHooks.java:493) [ForgeHooks.class:?]
	at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1931) [sf.class:?]
	at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:233) [zs.class:?]
	at net.minecraft.client.entity.EntityOtherPlayerMP.func_70071_h_(SourceFile:55) [bno.class:?]
	at net.minecraft.world.World.func_72866_a(World.java:1964) [aid.class:?]
	at net.minecraft.world.World.func_72870_g(World.java:1934) [aid.class:?]
	at net.minecraft.world.World.func_72939_s(World.java:1750) [aid.class:?]
	at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1789) [bcx.class:?]
	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1055) [bcx.class:?]
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:371) [bcx.class:?]
	at net.minecraft.client.main.Main.main(SourceFile:124) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91]
	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_91]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91]
	at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:310) [NewLaunch.jar:?]
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:395) [NewLaunch.jar:?]
	at org.multimc.EntryPoint.listen(EntryPoint.java:170) [NewLaunch.jar:?]
	at org.multimc.EntryPoint.main(EntryPoint.java:54) [NewLaunch.jar:?]

Here is the issue. (Thats why i am thinking is the issue)
You register the EntityEventHandler on Server&Client and have the syncer called on the EntityLivingEvent.UpdateEvent.
What you forgot to do is to make is a "isServer" check. And whenever someone plays on a server and opens it on the client side it will call a crash log because it tries to send a packet from the client to the client because as soon the gui opens the clientsided slots get synced from the server and markt dirty and your entityEventhandler can not handle that.

commented

What version of baubles are you using? I recently fixed a very similar problem to this.

commented

Actually nevermind. There is indeed a isRemote check missing in there and I guess the try block isn't catching the previous error. I was unable to replicate it last time (and I still am unable), but there is a definite issue here.

commented

If i find something else i am going to tell you.
Thanks for the quick fix :3
Edit: i was running the latest on curse. I should have told you. But then again i should have told that i did check your "Latest" source code and made my guess based of that.