io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(16) + length(770414) exceeds writerIndex(31): PooledUnsafeDirectByteBuf(ridx: 16, widx: 31, cap: 512)

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

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by Underbalanced
, 1 year ago
java.lang.IndexOutOfBoundsException: readerIndex(16) + length(770414) exceeds writerIndex(31): PooledUnsafeDirectByteBuf(ridx: 16, widx: 31, cap: 512)
via GitHub by breml
, 2 months ago
java.lang.IndexOutOfBoundsException: index: 0, length: 2378 (expected: range(0, 1605))
via GitHub by breml
, 2 months ago
java.lang.IndexOutOfBoundsException: index: 0, length: 1418 (expected: range(0, 709))
via GitHub by breml
, 2 months ago
java.lang.IndexOutOfBoundsException: index: 0, length: 170 (expected: range(0, 85))
via GitHub by breml
, 2 months ago
java.lang.IndexOutOfBoundsException: index: 0, length: 170 (expected: range(0, 85))
via GitHub by breml
, 2 months ago
java.lang.IndexOutOfBoundsException: index: 0, length: 2874 (expected: range(0, 1269))
io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(16) + length(770414) exceeds writerIndex(31): PooledUnsafeDirectByteBuf(ridx: 16, widx: 31, cap: 512)
at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1395)
at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1389)
at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:850)
at io.netty.buffer.WrappedByteBuf.readBytes(WrappedByteBuf.java:655)
at io.netty.buffer.AdvancedLeakAwareByteBuf.readBytes(AdvancedLeakAwareByteBuf.java:502)
at com.freeuniversegames.general.general_eight.netty.variant.VLQDecoder.unsafeDecodeArray(VLQDecoder.java:199)
at com.freeuniversegames.general.general_eight.netty.variant.VLQDecoder.unsafeDecodeString(VLQDecoder.java:140)
at com.freeuniversegames.general.general_eight.netty.variant.VLQDecoder.unsafeDecodeString(VLQDecoder.java:162)
at com.freeuniversegames.general.general_eight.netty.variant.NetworkFileEncoderDecoder.readMetaData(NetworkFileEncoderDecoder.java:128)
at com.freeuniversegames.general.general_eight.netty.variant.NetworkFileEncoderDecoder.read(NetworkFileEncoderDecoder.java:146)
at com.freeuniversegames.infastructure.development_file_server.FileServer$1$2.decode(FileServer.java:253)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411)
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.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:610)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:551)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:465)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:437)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)
at io.netty.util.internal.chmv8.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1412)
at io.netty.util.internal.chmv8.ForkJoinTask.doExec(ForkJoinTask.java:280)
at io.netty.util.internal.chmv8.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:877)
at io.netty.util.internal.chmv8.ForkJoinPool.scan(ForkJoinPool.java:1711)
at io.netty.util.internal.chmv8.ForkJoinPool.runWorker(ForkJoinPool.java:1666)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
6 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

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