Better Sprinting

Better Sprinting

1M Downloads

1.10.2 - LAN Players Unable to Connect v1.1.7

MokahTGS opened this issue ยท 11 comments

commented

We are having issues with LAN players joining the host game with this mod installed.

Version 1.1.7 for 1.10.2

Players can load the client just fine, they just get kicked with a network error when trying to join a LAN game. If I disable the mod they can join with no problem.

commented

Can you join a regular server on the same machine?

commented

Not sure what you mean. I can launch and play it on a host machine. LAN players cannot join.

commented

Upload the FML log file that contains the network error.

commented

I just encountered this error while trying to get a LAN game up, here is the error shown by the Log:
Im reporting this in as im verifying that this still exists in 1.11.2
EDIT: Why doesnt it exists spoilers in Github
[18:01:34] [Netty Server IO #3/ERROR] [FML/]: There was a critical exception handling a packet on channel BSM
java.lang.IndexOutOfBoundsException: readerIndex(2) + length(1) exceeds writerIndex(2): UnpooledHeapByteBuf(ridx: 2, widx: 2, cap: 2)
at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1175) ~[AbstractByteBuf.class:4.0.23.Final]
at io.netty.buffer.AbstractByteBuf.readByte(AbstractByteBuf.java:570) ~[AbstractByteBuf.class:4.0.23.Final]
at io.netty.buffer.AbstractByteBuf.readBoolean(AbstractByteBuf.java:579) ~[AbstractByteBuf.class:4.0.23.Final]
at net.minecraft.network.PacketBuffer.readBoolean(PacketBuffer.java:748) ~[et.class:?]
at chylex.bettersprinting.client.ClientNetwork.onPacket(ClientNetwork.java:25) ~[ClientNetwork.class:?]
at chylex.bettersprinting.system.PacketPipeline.onServerPacket(PacketPipeline.java:43) ~[PacketPipeline.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_156_PacketPipeline_onServerPacket_ServerCustomPacketEvent.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.network.FMLEventChannel.fireRead(FMLEventChannel.java:129) ~[FMLEventChannel.class:?]
at net.minecraftforge.fml.common.network.NetworkEventFiringHandler.channelRead0(NetworkEventFiringHandler.java:51) ~[NetworkEventFiringHandler.class:?]
at net.minecraftforge.fml.common.network.NetworkEventFiringHandler.channelRead0(NetworkEventFiringHandler.java:39) ~[NetworkEventFiringHandler.class:?]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[SimpleChannelInboundHandler.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) ~[AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) ~[DefaultChannelPipeline.class:4.0.23.Final]
at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:4.0.23.Final]
at net.minecraftforge.fml.common.network.internal.FMLProxyPacket.func_148833_a(FMLProxyPacket.java:102) [FMLProxyPacket.class:?]
at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:149) [er.class:?]
at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:51) [er.class:?]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [SimpleChannelInboundHandler.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final]
at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.handleServerSideCustomPacket(NetworkDispatcher.java:449) [NetworkDispatcher.class:?]
at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:271) [NetworkDispatcher.class:?]
at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:73) [NetworkDispatcher.class:?]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [SimpleChannelInboundHandler.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) [ByteToMessageDecoder.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) [ByteToMessageDecoder.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) [ByteToMessageDecoder.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:150) [ReadTimeoutHandler.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) [DefaultChannelPipeline.class:4.0.23.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130) [AbstractNioByteChannel$NioByteUnsafe.class:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [NioEventLoop.class:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [NioEventLoop.class:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [NioEventLoop.class:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [NioEventLoop.class:4.0.23.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [SingleThreadEventExecutor$2.class:4.0.23.Final]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_141]

Minecraft Version: 1.11.2
Better Sprinting Mod Version: 1.1.9
Forge Version: 13.20.1.2530

commented

No response in 2 months, closing the issue as invalid. Reopen if you can still reproduce the issue in latest version for 1.11.2.

commented

Here's a log of the error,
https://pastebin.com/iSjkmEyy

commented

Interesting... the packet data is missing, I wonder if that's some issue in Forge that only happens in LAN connections, I'll have to investigate this more. Saving the key part of the log here for reference.

net.minecraftforge.fml.common.network.FMLNetworkEvent$ServerCustomPacketEvent@3fbde89a:
java.lang.IndexOutOfBoundsException: readerIndex(2) + length(1) exceeds writerIndex(2): PooledUnsafeDirectByteBuf(ridx: 2, widx: 2, cap: 2)
at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1396) ~[AbstractByteBuf.class:4.1.9.Final]
at io.netty.buffer.AbstractByteBuf.readByte(AbstractByteBuf.java:687) ~[AbstractByteBuf.class:4.1.9.Final]
at io.netty.buffer.AbstractByteBuf.readBoolean(AbstractByteBuf.java:696) ~[AbstractByteBuf.class:4.1.9.Final]
at net.minecraft.network.PacketBuffer.readBoolean(PacketBuffer.java:859) ~[gy.class:?]
at chylex.bettersprinting.client.ClientNetwork.onPacket(ClientNetwork.java:24) ~[ClientNetwork.class:?]
at chylex.bettersprinting.system.PacketPipeline.onServerPacket(PacketPipeline.java:43) ~[PacketPipeline.class:?]
commented

Forge has completely redone their networking in 1.13 and it's no longer crashing there, but I found the issue and will release an update for 1.12.2 at some point.

commented

Having this issue as well with the mod I'm currently updating. Seems like it's an issue with event driven channels in 1.12.2? Might just switch over to the more well documented SimpleImpl: https://mcforge.readthedocs.io/en/latest/networking/simpleimpl/.

commented

It's not an issue with the system, but with the assumption of sides. On LAN, the hosting client acts as a server and receives packets intended for servers.

commented

@chylex okay I see I see. My issue is actually unrelated. Turns out Minecraft updated Netty in 1.12 to use the allocator while creating unpooled buffers resulting in the server now receiving buffers without backing bytes. Sorry for the confusion but I figured it out!