io.netty.handler.codec.DecoderException

java.lang.IndexOutOfBoundsException: readerIndex(3) + length(68) exceeds writerIndex(18): PooledUnsafeDirectByteBuf(ridx: 3, widx: 18, cap: 18)

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web117

  • java.lang.IndexOutOfBoundsException: readerIndex(3) + length(68) exceeds writerIndex(18): PooledUnsafeDirectByteBuf(ridx: 3, widx: 18, cap: 18)
  • via GitHub by L4BORG
    , 1 year ago
    java.lang.IndexOutOfBoundsException: readerIndex(3) + length(2) exceeds writerIndex(3): PooledUnsafeDirectByteBuf(ridx: 3, widx: 3, cap: 3)
  • java.lang.IndexOutOfBoundsException: readerIndex(3) + length(97) exceeds writerIndex(14): PooledUnsafeDirectByteBuf(ridx: 3, widx: 14, cap: 14)
  • Stack trace

    • io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(3) + length(68) exceeds writerIndex(18): PooledUnsafeDirectByteBuf(ridx: 3, widx: 18, cap: 18) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:276) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:263) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) at io.netty.handler.codec.ByteToMessageDecoder.handlerRemoved(ByteToMessageDecoder.java:216) at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved0(DefaultChannelPipeline.java:527) at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved(DefaultChannelPipeline.java:521) at io.netty.channel.DefaultChannelPipeline.remove0(DefaultChannelPipeline.java:351) at io.netty.channel.DefaultChannelPipeline.remove(DefaultChannelPipeline.java:322) at io.netty.channel.DefaultChannelPipeline.remove(DefaultChannelPipeline.java:299) at net.md_5.bungee.protocol.LegacyDecoder.decode(LegacyDecoder.java:37) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:360) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:244) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:152) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846) at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:823) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:339) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:255) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IndexOutOfBoundsException: readerIndex(3) + length(68) exceeds writerIndex(18): PooledUnsafeDirectByteBuf(ridx: 3, widx: 18, cap: 18) at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1178) at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1172) at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:693) at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:701) at net.md_5.bungee.protocol.DefinedPacket.readString(DefinedPacket.java:36) 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:33) at net.md_5.bungee.protocol.MinecraftDecoder.decode(MinecraftDecoder.java:10) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ... 26 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 11 months ago
    Unknown user
    2 times, 11 months ago
    Unknown user
    Once, 7 months ago
    6 times, 11 months ago
    Unknown user
    Once, 11 months ago