I got this exception when a player on my server sent a plugin-message (custom payload) on a channel for which I have created a ChannelListener in my plugin.
[03:29:18] [net.minecraft.network.NetHandlerPlayServer] [ERROR]: Error receiving 'C17PacketCustomPayload': readerIndex(1) + length(123) exceeds writerIndex(59): UnpooledHeapByteBuf(ridx: 1, widx: 59, cap: 59)
java.lang.IndexOutOfBoundsException: readerIndex(1) + length(123) exceeds writerIndex(59): UnpooledHeapByteBuf(ridx: 1, widx: 59, cap: 59)
at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1161) ~[CanaryMod-1.8.0-1.2.0-RC1.jar:1.8.0-1.2.0-RC1]
at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:669) ~[CanaryMod-1.8.0-1.2.0-RC1.jar:1.8.0-1.2.0-RC1]
at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:677) ~[CanaryMod-1.8.0-1.2.0-RC1.jar:1.8.0-1.2.0-RC1]
at net.minecraft.network.PacketBuffer.readBytes(PacketBuffer.java:581) ~[CanaryMod-1.8.0-1.2.0-RC1.jar:1.8.0-1.2.0-RC1]
at net.minecraft.network.PacketBuffer.a(PacketBuffer.java:59) ~[CanaryMod-1.8.0-1.2.0-RC1.jar:1.8.0-1.2.0-RC1]
at net.minecraft.network.NetHandlerPlayServer.a(NetHandlerPlayServer.java:1383) [CanaryMod-1.8.0-1.2.0-RC1.jar:1.8.0-1.2.0-RC1]
at net.minecraft.network.play.client.C17PacketCustomPayload.a(C17PacketCustomPayload.java:34) [CanaryMod-1.8.0-1.2.0-RC1.jar:1.8.0-1.2.0-RC1]
at net.minecraft.network.play.client.C17PacketCustomPayload.a(C17PacketCustomPayload.java:46) [CanaryMod-1.8.0-1.2.0-RC1.jar:1.8.0-1.2.0-RC1]
at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:17) [CanaryMod-1.8.0-1.2.0-RC1.jar:1.8.0-1.2.0-RC1]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_66]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_66]
at net.minecraft.server.MinecraftServer.z(MinecraftServer.java:634) [CanaryMod-1.8.0-1.2.0-RC1.jar:1.8.0-1.2.0-RC1]
at net.minecraft.server.dedicated.DedicatedServer.z(DedicatedServer.java:436) [CanaryMod-1.8.0-1.2.0-RC1.jar:1.8.0-1.2.0-RC1]
at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:583) [CanaryMod-1.8.0-1.2.0-RC1.jar:1.8.0-1.2.0-RC1]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:488) [CanaryMod-1.8.0-1.2.0-RC1.jar:1.8.0-1.2.0-RC1]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_66]
As you can see from the stacktrace, the exception is'nt caused by any of the plugins, just by the server itself.
The onChannelInput method in the listener I had regististered wasn't called either.
Can this bug be fixed asap or is there a way to contribute to CanaryMod itself to address this issue?