java.lang.IndexOutOfBoundsException

readerIndex(0) + length(10) exceeds writerIndex(4): CompositeByteBuf(ridx: 0, widx: 4, cap: 4, components=1)

Samebug tips0

We couldn't find tips for this exception.

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

Solutions on the web49

Stack trace

  • java.lang.IndexOutOfBoundsException: readerIndex(0) + length(10) exceeds writerIndex(4): CompositeByteBuf(ridx: 0, widx: 4, cap: 4, components=1) at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1346) at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1340) at io.netty.buffer.AbstractByteBuf.bytesBefore(AbstractByteBuf.java:1161) at com.corundumstudio.socketio.protocol.PacketDecoder.decodePackets(PacketDecoder.java:122) at com.corundumstudio.socketio.handler.InPacketHandler.channelRead0(InPacketHandler.java:65) at com.corundumstudio.socketio.handler.InPacketHandler.channelRead0(InPacketHandler.java:36) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:83) at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRead(DefaultChannelHandlerInvoker.java:154) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:354) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:145) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:83) at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRead(DefaultChannelHandlerInvoker.java:154) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:354)

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 visitor
Unknown visitorOnce,
tyson925tyson925
6 times, last one
Unknown visitor
Unknown visitorOnce,