io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(2) + length(1) exceeds writerIndex(2): SlicedAbstractByteBuf(ridx: 2, widx: 2, cap: 2/2, unwrapped: PooledUnsafeDirectByteBuf(ridx: 3, widx: 12, cap: 64))

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by mibby
, 1 year ago
java.lang.IndexOutOfBoundsException: readerIndex(2) + length(1) exceeds writerIndex(2): SlicedAbstractByteBuf(ridx: 2, widx: 2, cap: 2/2, unwrapped: PooledUnsafeDirectByteBuf(ridx: 3, widx: 12, cap: 64))
via Stack Overflow by Bhesh Gurung
, 1 year ago
com.google.protobuf.InvalidProtocolBufferException: While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either than the input has been truncated or that an embedded message misreported its own length.
via GitHub by txgs888
, 1 month ago
java.lang.IndexOutOfBoundsException: readerIndex(39) + length(1) exceeds writerIndex(39): UnpooledSlicedByteBuf(ridx: 39, widx: 39, cap: 39/39, unwrapped: PooledUnsafeDirectByteBuf(ridx: 40, widx: 40, cap: 240))
via GitHub by MrPowerGamerBR
, 11 months ago
java.lang.IndexOutOfBoundsException: readerIndex(6) + length(14080) exceeds writerIndex(14): UnpooledSlicedByteBuf(ridx: 6, widx: 14, cap: 14/14, unwrapped: PooledUnsafeDirectByteBuf(ridx: 15, widx: 15, cap: 1024))
via GitHub by Twi5TeD
, 1 year ago
java.lang.IndexOutOfBoundsException: readerIndex(0) + length(1) exceeds writerIndex(0): SlicedAbstractByteBuf(ridx: 0, widx: 0, cap: 0/0, unwrapped: PooledUnsafeDirectByteBuf(ridx: 2, widx: 2, cap: 128))
via GitHub by JoeyHaalboom
, 11 months ago
java.lang.IndexOutOfBoundsException: readerIndex(1061) + length(1) exceeds writerIndex(1061): PooledUnsafeDirectByteBuf(ridx: 1061, widx: 1061, cap: 8192)
io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(2) + length(1) exceeds writerIndex(2): SlicedAbstractByteBuf(ridx: 2, widx: 2, cap: 2/2, unwrapped: PooledUnsafeDirectByteBuf(ridx: 3, widx: 12, cap: 64))
at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1413)
at io.netty.buffer.AbstractByteBuf.readByte(AbstractByteBuf.java:687)
at net.md_5.bungee.protocol.DefinedPacket.readVarInt(DefinedPacket.java:100)
at net.md_5.bungee.protocol.DefinedPacket.readVarInt(DefinedPacket.java:90)
at net.md_5.bungee.protocol.DefinedPacket.readString(DefinedPacket.java:29)
at net.md_5.bungee.protocol.packet.Handshake.read(Handshake.java:27)
at net.md_5.bungee.protocol.DefinedPacket.read(DefinedPacket.java:185)
at net.md_5.bungee.protocol.MinecraftDecoder.decode(MinecraftDecoder.java:41)
at net.md_5.bungee.protocol.MinecraftDecoder.decode(MinecraftDecoder.java:10)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:280)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:396)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:266)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:961)
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:386)
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:302)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:877)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
6 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
1 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.