Ender IO Zoo

Ender IO Zoo

962k Downloads

[1.12.2] Troubles connecting to a server: OutOfBoundsException in ByteBuf.

MarkL4YG opened this issue ยท 7 comments

commented

First of all: Thank you for updating EnderIO to 1.12! As a developer and someone who did some dives into Minecraft mod development I'm aware of how much of a challenge this must've been.

Now to the issue:
We would like to add EnderIO to a custom modpack but we encounter an issue upon connecting to a server.

Upon trying to log in to a server the client receives the unhelpful message Network Disconnect: A fatal error has occurred, this connection is terminated.
The log shows exceptions indicating there's been an issue with EnderIOs client<->server communitation.

<truncated>
Caused by: java.lang.IndexOutOfBoundsException: index: 5, length: 101 (expected: range(0, 88))
	at io.netty.buffer.AbstractByteBuf.checkIndex0(AbstractByteBuf.java:1353) ~[AbstractByteBuf.class:4.1.9.Final]
	at io.netty.buffer.AbstractUnpooledSlicedByteBuf.nioBuffer(AbstractUnpooledSlicedByteBuf.java:451) ~[AbstractUnpooledSlicedByteBuf.class:4.1.9.Final]
	at io.netty.buffer.AbstractDerivedByteBuf.internalNioBuffer(AbstractDerivedByteBuf.java:108) ~[AbstractDerivedByteBuf.class:4.1.9.Final]
	at io.netty.buffer.ByteBufUtil.decodeString(ByteBufUtil.java:630) ~[ByteBufUtil.class:4.1.9.Final]
	at io.netty.buffer.AbstractByteBuf.toString(AbstractByteBuf.java:1213) ~[AbstractByteBuf.class:4.1.9.Final]
	at net.minecraftforge.fml.common.network.ByteBufUtils.readUTF8String(ByteBufUtils.java:152) ~[ByteBufUtils.class:?]
	at crazypants.enderio.base.item.yetawrench.YetaWrenchPacketProcessor.fromBytes(YetaWrenchPacketProcessor.java:33) ~[YetaWrenchPacketProcessor.class:?]
	at net.minecraftforge.fml.common.network.simpleimpl.SimpleIndexedCodec.decodeInto(SimpleIndexedCodec.java:36) ~[SimpleIndexedCodec.class:?]
	at net.minecraftforge.fml.common.network.simpleimpl.SimpleIndexedCodec.decodeInto(SimpleIndexedCodec.java:26) ~[SimpleIndexedCodec.class:?]
	at net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:101) ~[FMLIndexedMessageToMessageCodec.class:?]
	at net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:38) ~[FMLIndexedMessageToMessageCodec.class:?]
	at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:4.1.9.Final]
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88) ~[MessageToMessageDecoder.class:4.1.9.Final]
	... 55 more
[18:38:01] [Netty Client IO #7/ERROR] [FML]: Network Disconnect: A fatal error has occurred, this connection is terminated
<truncated>

The server is run using SpongeForge but as it does not report any connection issues I suspect Sponge not be causing this behavior.
Here're the log entries during a dropped connection attempt:

> [18:38:36] [Server thread/INFO]: mark332[/XXX.XXX.XXX.XXX:53644] logged in with entity id 300 in world(0) at (5.5, 92.0, 259.5)
> [18:38:36] [Server thread/INFO] [EnderCore]: Sending server configs to client for com.enderio.core.common.config.ConfigHandler
> [18:38:36] [Server thread/INFO] [Mekanism]: Sent config to 'mark332.'
> [18:38:36] [Server thread/INFO] [journeymap]: Sending log in packet.
> [18:38:36] [Server thread/INFO]: [+] mark332
> [18:38:43] [Server thread/INFO]: mark332 lost connection: Disconnected
> [18:38:43] [Server thread/INFO]: [-] mark332

(This has been tested with and without a BungeeCord proxy)

Here's a gist containing all client logs:
https://gist.github.com/MarkL4YG/9aa9a7ff1a402b327d270daa62daa5c4


Version information:
SpongeForge version: 1.12.2-2611-7.1.0-BETA-2931
Forge version: 1.12.2-14.23.2.2619
EnderCore version: 1.12.2-0.5.18
EnderIO version: 1.12.2-5.0.21


If you have any further questions please feel free to ask. I'm happy to provide you with any information necessary to debug this issue.

commented

YetaWrenchPacketProcessor is a network packet that is sent to the server when a Yeta Wrench is clicked on something. Here it is received on the client when connecting. That is not possible.

What's happening here is that some other network packet is reading too much/too little data. The network code then interprets random data from the middle of a packet as the packet ID, which happens to be the ID of YetaWrenchPacketProcessor by chance.

TL;DR: Not Ender IO related.

commented

Thanks for the information!
As you seem to know a thing or two about the protocol: Do you have any special tips I could use for narrowing down on the cause of this aside from common strategies for everyday-modpack issues?
I hope I don't end up having to set up a debuggable client in a development environment...

commented

This kind of packet issue is very hard to figure out. The moment there's any indication that is happening, there's no data left on the bad packet. My advice would be to do the usual "binary search" through the mods.

commented

That's unfortunate... but it'll have to do the job.
I'll get back when I've found something.

commented

Hello there. I finally got around trying some things.
I've started by only having EnderIO installed on both client and server.
Sadly the issue still persists. (Even without Sponge installed on the server).

As you can see there's only EnderIO installed on the client:

[20:11:48] [main/DEBUG] [FML/]: Found a candidate zip or jar file EnderCore-1.12.2-0.5.18.jar
[20:11:48] [main/DEBUG] [FML/]: Found a candidate zip or jar file EnderIO+Base-1.12.2-5.0.21.jar
[20:11:48] [main/DEBUG] [FML/]: Found a candidate zip or jar file EnderIO+Conduits-1.12.2-5.0.21.jar
[20:11:48] [main/DEBUG] [FML/]: Ignoring unknown file EnderIO+Integration+forestry-1.12.2-5.0.21.jar.DISABLED in mods directory
[20:11:48] [main/DEBUG] [FML/]: Found a candidate zip or jar file EnderIO+Invpanel-1.12.2-5.0.21.jar
[20:11:48] [main/DEBUG] [FML/]: Found a candidate zip or jar file EnderIO+Machines-1.12.2-5.0.21.jar

fml-client-latest.log

Any comment/advice on how to continue?

commented

Yes, remove that invpanel jar

commented

Oops, thanks for the reminder! ^^
Yes, removing invpanel resolved the issue :)