joshuaprince / CoordinateOffset

⛏️ A Minecraft Spigot/Paper plugin that configurably obfuscates players' coordinates.
GNU Affero General Public License v3.0
18 stars 7 forks source link

Illegally attempt to offset the item's coordinates #23

Closed deveworld closed 4 days ago

deveworld commented 4 days ago

Describe the bug The plugin modify the item's data strangely and the packet's data cannot be decoded by the client, so it crashes.

Environment details Output of /version:

Current Purpur Version: 1.21.3-2340-db09358 (MC: 1.21.3)*
* You are running the latest version
Previous: 1.21.3-31-4e2291e (MC: 1.21.3)

CoordinateOffset version: 4.0.5 PacketEvents version: 2.6.0 Output of /plugins:

Paper Plugins: (0):
Bukkit Plugins: (2):
 - CoordinateOffset, ProtocolLib

Log errors Below is server's error,

[15:22:18] [Netty Epoll Server IO #1/WARN]: java.lang.reflect.InvocationTargetException
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:74)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.coordinateoffset.offsetter.OffsetterRegistry.attemptToOffset(OffsetterRegistry.java:83)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.coordinateoffset.PacketOffsetAdapter$Listener.onPacketSend(PacketOffsetAdapter.java:87)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.event.PacketSendEvent.call(PacketSendEvent.java:51)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.event.EventManager.callEvent(EventManager.java:84)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.util.PacketEventsImplHelper.handleClientBoundPacket(PacketEventsImplHelper.java:61)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.io.github.retrooper.packetevents.injector.handlers.PacketEventsEncoder.handleClientBoundPacket(PacketEventsEncoder.java:88)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.io.github.retrooper.packetevents.injector.handlers.PacketEventsEncoder.encode(PacketEventsEncoder.java:73)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.io.github.retrooper.packetevents.injector.handlers.PacketEventsEncoder.encode(PacketEventsEncoder.java:52)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:90)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.io.github.retrooper.packetevents.injector.handlers.PacketEventsEncoder.write(PacketEventsEncoder.java:107)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:113)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:851)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.handler.codec.MessageToMessageEncoder.writePromiseCombiner(MessageToMessageEncoder.java:140)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:120)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.ChannelOutboundHandlerAdapter.write(ChannelOutboundHandlerAdapter.java:113)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at net.minecraft.network.Connection$2.write(Connection.java:771)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:940)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:966)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:934)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1020)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:311)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at ProtocolLib.jar//com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:227)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at ProtocolLib.jar//com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:233)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at net.minecraft.network.Connection.doSendPacket(Connection.java:513)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at net.minecraft.network.Connection.lambda$sendPacket$13(Connection.java:498)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at ProtocolLib.jar//com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.lambda$proxyAction$7(NettyChannelInjector.java:566)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at java.base/java.lang.Thread.run(Thread.java:1583)
[15:22:18] [Netty Epoll Server IO #1/WARN]: Caused by: java.lang.IndexOutOfBoundsException: readerIndex(17) + length(1) exceeds writerIndex(17): PooledUnsafeDirectByteBuf(ridx: 17, widx: 17, cap: 256)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1442)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.buffer.AbstractByteBuf.readByte(AbstractByteBuf.java:730)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.io.github.retrooper.packetevents.netty.buffer.ByteBufOperatorModernImpl.readByte(ByteBufOperatorModernImpl.java:74)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.netty.buffer.ByteBufHelper.readByte(ByteBufHelper.java:67)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.wrapper.PacketWrapper.readByte(PacketWrapper.java:354)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.wrapper.PacketWrapper.readVarInt(PacketWrapper.java:394)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.wrapper.PacketWrapper.readEntityMetadata(PacketWrapper.java:965)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerEntityMetadata.read(WrapperPlayServerEntityMetadata.java:52)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.wrapper.PacketWrapper.readEvent(PacketWrapper.java:277)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.wrapper.PacketWrapper.<init>(PacketWrapper.java:182)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.wrapper.PacketWrapper.<init>(PacketWrapper.java:172)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerEntityMetadata.<init>(WrapperPlayServerEntityMetadata.java:36)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     ... 53 more
[15:22:18] [Netty Epoll Server IO #1/WARN]: java.lang.reflect.InvocationTargetException
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:74)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.coordinateoffset.offsetter.OffsetterRegistry.attemptToOffset(OffsetterRegistry.java:83)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.coordinateoffset.PacketOffsetAdapter$Listener.onPacketSend(PacketOffsetAdapter.java:87)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.event.PacketSendEvent.call(PacketSendEvent.java:51)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.event.EventManager.callEvent(EventManager.java:84)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.util.PacketEventsImplHelper.handleClientBoundPacket(PacketEventsImplHelper.java:61)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.io.github.retrooper.packetevents.injector.handlers.PacketEventsEncoder.handleClientBoundPacket(PacketEventsEncoder.java:88)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.io.github.retrooper.packetevents.injector.handlers.PacketEventsEncoder.encode(PacketEventsEncoder.java:73)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.io.github.retrooper.packetevents.injector.handlers.PacketEventsEncoder.encode(PacketEventsEncoder.java:52)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:90)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.io.github.retrooper.packetevents.injector.handlers.PacketEventsEncoder.write(PacketEventsEncoder.java:107)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:113)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.ChannelOutboundHandlerAdapter.write(ChannelOutboundHandlerAdapter.java:113)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at net.minecraft.network.Connection$2.write(Connection.java:771)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.DefaultChannelPipeline.write(DefaultChannelPipeline.java:1015)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.AbstractChannel.write(AbstractChannel.java:301)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at ProtocolLib.jar//com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.write(NettyChannelProxy.java:210)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at ProtocolLib.jar//com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.write(NettyChannelProxy.java:199)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at net.minecraft.network.Connection.doSendPacket(Connection.java:513)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at net.minecraft.network.Connection.lambda$sendPacket$13(Connection.java:498)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at ProtocolLib.jar//com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.lambda$proxyRunnable$2(NettyEventLoopProxy.java:49)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at java.base/java.lang.Thread.run(Thread.java:1583)
[15:22:18] [Netty Epoll Server IO #1/WARN]: Caused by: java.lang.IndexOutOfBoundsException: readerIndex(17) + length(1) exceeds writerIndex(17): PooledUnsafeDirectByteBuf(ridx: 17, widx: 17, cap: 256)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1442)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at io.netty.buffer.AbstractByteBuf.readByte(AbstractByteBuf.java:730)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.io.github.retrooper.packetevents.netty.buffer.ByteBufOperatorModernImpl.readByte(ByteBufOperatorModernImpl.java:74)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.netty.buffer.ByteBufHelper.readByte(ByteBufHelper.java:67)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.wrapper.PacketWrapper.readByte(PacketWrapper.java:354)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.wrapper.PacketWrapper.readVarInt(PacketWrapper.java:394)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.wrapper.PacketWrapper.readEntityMetadata(PacketWrapper.java:965)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerEntityMetadata.read(WrapperPlayServerEntityMetadata.java:52)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.wrapper.PacketWrapper.readEvent(PacketWrapper.java:277)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.wrapper.PacketWrapper.<init>(PacketWrapper.java:182)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.wrapper.PacketWrapper.<init>(PacketWrapper.java:172)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at CoordinateOffset-v4.0.5.jar//com.jtprince.lib.com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerEntityMetadata.<init>(WrapperPlayServerEntityMetadata.java:36)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
[15:22:18] [Netty Epoll Server IO #1/WARN]:     ... 51 more

Below is client's error (when player held the item and try to login)

---- Minecraft Network Protocol Error Report ----
// All lines are down!

Time: 2024-11-23 23:57:59
Description: Packet handling error

io.netty.handler.codec.DecoderException: Failed to decode packet 'clientbound/minecraft:container_set_content'
    at knot//net.minecraft.class_9136.method_56425(class_9136.java:38)
    at knot//net.minecraft.class_9136.decode(class_9136.java:14)
    at knot//net.minecraft.class_2543.decode(class_2543.java:31)
    at knot//io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:529)
    at knot//io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468)
    at knot//io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at knot//io.netty.handler.flow.FlowControlHandler.dequeue(FlowControlHandler.java:202)
    at knot//io.netty.handler.flow.FlowControlHandler.channelRead(FlowControlHandler.java:164)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at knot//io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
    at knot//io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at knot//io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
    at knot//io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:333)
    at knot//io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:454)
    at knot//io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at knot//io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at knot//io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at knot//io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at knot//io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
    at knot//io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
    at knot//io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
    at knot//io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
    at knot//io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
    at knot//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
    at knot//io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
    at knot//io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.IndexOutOfBoundsException: readerIndex(226) + length(1) exceeds writerIndex(226): PooledUnsafeDirectByteBuf(ridx: 226, widx: 226, cap: 226)
    at knot//io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1442)
    at knot//io.netty.buffer.AbstractByteBuf.readByte(AbstractByteBuf.java:730)
    at knot//net.minecraft.class_8703.method_53016(class_8703.java:28)
    at knot//net.minecraft.class_2540.method_10816(class_2540.java:500)
    at knot//net.minecraft.class_1799$1.method_56099(class_1799.java:138)
    at knot//net.minecraft.class_1799$1.decode(class_1799.java:133)
    at knot//net.minecraft.class_2649.<init>(class_2649.java:34)
    at knot//net.minecraft.class_9139$8.decode(class_9139.java:39)
    at knot//net.minecraft.class_9139$11.method_56441(class_9139.java:93)
    at knot//net.minecraft.class_9139$11.decode(class_9139.java:89)
    at knot//net.minecraft.class_9136.method_56425(class_9136.java:36)
    ... 45 more

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Netty Client IO #2
Stacktrace:
    at knot//net.minecraft.class_2547.method_55622(class_2547.java:33)

-- Connection --
Details:
    Protocol: play
    Flow: CLIENTBOUND
    Is Local: false
    Server type: OTHER
    Server brand: Purpur (Velocity)
Stacktrace:
    at knot//net.minecraft.class_2547.method_55622(class_2547.java:33)
    at knot//net.minecraft.class_2600.method_59803(class_2600.java:62)
    at knot//net.minecraft.class_8673.method_60882(class_8673.java:131)
    at knot//net.minecraft.class_8673.method_60881(class_8673.java:122)
    at knot//net.minecraft.class_2535.exceptionCaught(class_2535.java:161)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:325)
    at knot//io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:317)
    at knot//io.netty.channel.ChannelInboundHandlerAdapter.exceptionCaught(ChannelInboundHandlerAdapter.java:143)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:447)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at knot//io.netty.handler.flow.FlowControlHandler.dequeue(FlowControlHandler.java:202)
    at knot//io.netty.handler.flow.FlowControlHandler.channelRead(FlowControlHandler.java:164)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at knot//io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
    at knot//io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at knot//io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
    at knot//io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:333)
    at knot//io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:454)
    at knot//io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at knot//io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at knot//io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at knot//io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
    at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at knot//io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
    at knot//io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
    at knot//io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
    at knot//io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
    at knot//io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
    at knot//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
    at knot//io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
    at knot//io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at java.base/java.lang.Thread.run(Thread.java:1583)

Steps to reproduce 2024-11-24_00 46 26 Try to view Potion (In my case, Potion of Fire Resistance)

joshuaprince commented 4 days ago

Thanks for the report, this should be fixed in v4.0.6.

It was caused by https://github.com/retrooper/packetevents/issues/1054.