- edited description
Upgrade Packager - NullPointerException
Version: RouterReborn-1.7.10-1.2.0.31-universal
Clicking on the 2x2 or 3x3 Grid button disconnects you and throws this error:
[02:23:13] [Server thread/ERROR] [FML]: SimpleChannelHandlerWrapper exception
java.lang.NullPointerException
at router.reborn.RouterNetPackage$Handler.onMessage(RouterNetPackage.java:300) ~[RouterNetPackage$Handler.class:?]
at router.reborn.RouterNetPackage$Handler.onMessage(RouterNetPackage.java:67) ~[RouterNetPackage$Handler.class:?]
at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:37) ~[SimpleChannelHandlerWrapper.class:?]
at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:17) ~[SimpleChannelHandlerWrapper.class:?]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:101) [SimpleChannelInboundHandler.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:?]
at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?]
at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?]
at cpw.mods.fml.common.network.internal.FMLProxyPacket.func_148833_a(FMLProxyPacket.java:77) [FMLProxyPacket.class:?]
at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212) [ej.class:?]
at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:165) [nc.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:659) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) [MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:111) [bsx.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [?:?]
Comments (13)
-
reporter -
repo owner im pretty sure this is fixed in 1.2.0.33
-
repo owner - changed status to resolved
im setting this as resolved, this should have been fixed in newer versions, not received any more feedback or reports regarding this issue.
-
reporter - changed status to open
Still happens with latest version (1.2.0.35)
-
repo owner ya found it, but its weird, for some reason it cant get your player class from its id, and end up with a null pointer, i added the null check, ill get it compiled in a bit, it will fix the crash but result in the packager not working, eject to i asume.
Can you tell me what forge your running and what mods you got installed and i will do some testing and see if i can figure out what is happening with it.
-
reporter Forge version: 1.7.10-10.13.4.1448 You can find all mods here: https://github.com/MyM-ModpackTeam/GalacticScience/tree/master/src/mods Which id do you mean? UUID or?
-
repo owner Player.getEntityId() is what is sent to the server, the player is then located on the server with (EntityPlayer) MinecraftServer.getServer().getEntityWorld().getEntityByID(playerID); this is what fails, the player is not found, or rather the playerid is faulty, normally you dont need to get a player that way, but using a gui on a item is different.
-
The network packed comes from the player, the onMessage override gives you the context which contains a direct reference to the player (context.getServerHandler().playerEntity), hence I'm a bit confused on why would we need to transfer a playerID here?
-
repo owner im pretty sure that is missing, when doing gui on a item everything is different, i cant remember the details of it but opening a gui on a item in your hand, because of how you need to do it context is null or not correct and you cant get the player from it, being the reason why the player id is sent, normal gui on a block is not a problem and you can get it from context. its been a while since i did the code for it but i sent the id cause i could not get the player any other way. something todo with a item not having a tileentity.or container.
I will take a closer look at it again, and see if there is maybe a better way todo it, its trange though that for some reason it cant get the playerID
-
repo owner this might explain it, https://github.com/coolAlias/Forge_Tutorials/blob/master/InventoryItemTutorial.java
-
repo owner - changed status to on hold
on hold until i get a way of duplicating this
-
repo owner - changed status to open
No idea what i was thinking there, fixed and will be in next build
-
repo owner - changed status to resolved
fixed 1.2.0.37
- Log in to comment