libraryaddict / LibsDisguises

Minecraft disguise plugin
https://www.spigotmc.org/resources/libs-disguises.32453/
Other
262 stars 129 forks source link

IndexOutOfBoundsException for component jukebox_playable #783

Open wmcdevx opened 2 days ago

wmcdevx commented 2 days ago

minimal instance, latest purpur 1.21.1 server Latest dev build of LibsDisguises, latest snapshot of PacketEvents No changes made to the config files

when running the command: /minecraft:give @p minecraft:music_disc_11[jukebox_playable={song:"cat"}] gives error:

[17:09:14 WARN]: java.lang.IndexOutOfBoundsException: readerIndex(15) + length(4) exceeds writerIndex(15): PooledUnsafeDirectByteBuf(ridx: 15, widx: 15, cap: 256)
[17:09:14 WARN]:    at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1442)
[17:09:14 WARN]:    at io.netty.buffer.AbstractByteBuf.readInt(AbstractByteBuf.java:809)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//io.github.retrooper.packetevents.netty.buffer.ByteBufOperatorModernImpl.readInt(ByteBufOperatorModernImpl.java:89)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.netty.buffer.ByteBufOperator.readFloat(ByteBufOperator.java:78)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.netty.buffer.ByteBufHelper.readFloat(ByteBufHelper.java:135)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.wrapper.PacketWrapper.readFloat(PacketWrapper.java:808)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.protocol.item.jukebox.IJukeboxSong.read(IJukeboxSong.java:69)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.protocol.component.builtin.item.ItemJukeboxPlayable.read(ItemJukeboxPlayable.java:62)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.protocol.component.StaticComponentType.read(StaticComponentType.java:69)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.wrapper.PacketWrapper.readItemStackModern(PacketWrapper.java:483)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.wrapper.PacketWrapper.readItemStack(PacketWrapper.java:502)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.wrapper.PacketWrapper.readEntityMetadata(PacketWrapper.java:970)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerEntityMetadata.read(WrapperPlayServerEntityMetadata.java:52)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.wrapper.PacketWrapper.readEvent(PacketWrapper.java:277)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.wrapper.PacketWrapper.<init>(PacketWrapper.java:182)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.wrapper.PacketWrapper.<init>(PacketWrapper.java:172)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerEntityMetadata.<init>(WrapperPlayServerEntityMetadata.java:36)
[17:09:14 WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.utilities.DisguiseUtilities.constructWrapper(DisguiseUtilities.java:3051)
[17:09:14 WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.utilities.packets.packetlisteners.PacketListenerViewSelfDisguise.onPacketPlaySend(PacketListenerViewSelfDisguise.java:60)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.event.SimplePacketListenerAbstract.onPacketSend(SimplePacketListenerAbstract.java:64)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.event.PacketSendEvent.call(PacketSendEvent.java:51)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.event.EventManager.callEvent(EventManager.java:84)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//com.github.retrooper.packetevents.util.PacketEventsImplHelper.handleClientBoundPacket(PacketEventsImplHelper.java:61)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//io.github.retrooper.packetevents.injector.handlers.PacketEventsEncoder.handleClientBoundPacket(PacketEventsEncoder.java:88)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//io.github.retrooper.packetevents.injector.handlers.PacketEventsEncoder.encode(PacketEventsEncoder.java:73)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//io.github.retrooper.packetevents.injector.handlers.PacketEventsEncoder.encode(PacketEventsEncoder.java:52)
[17:09:14 WARN]:    at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:90)
[17:09:14 WARN]:    at packetevents-spigot-2.6.1-SNAPSHOT.jar//io.github.retrooper.packetevents.injector.handlers.PacketEventsEncoder.write(PacketEventsEncoder.java:107)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
[17:09:14 WARN]:    at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:113)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:851)
[17:09:14 WARN]:    at io.netty.handler.codec.MessageToMessageEncoder.writePromiseCombiner(MessageToMessageEncoder.java:140)
[17:09:14 WARN]:    at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:120)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
[17:09:14 WARN]:    at io.netty.channel.ChannelOutboundHandlerAdapter.write(ChannelOutboundHandlerAdapter.java:113)
[17:09:14 WARN]:    at net.minecraft.network.Connection$2.write(Connection.java:771)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:940)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:966)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:934)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:984)
[17:09:14 WARN]:    at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1025)
[17:09:14 WARN]:    at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:306)
[17:09:14 WARN]:    at net.minecraft.network.Connection.doSendPacket(Connection.java:513)
[17:09:14 WARN]:    at net.minecraft.network.Connection.lambda$sendPacket$13(Connection.java:498)
[17:09:14 WARN]:    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
[17:09:14 WARN]:    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
[17:09:14 WARN]:    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
[17:09:14 WARN]:    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
[17:09:14 WARN]:    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
[17:09:14 WARN]:    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
[17:09:14 WARN]:    at java.base/java.lang.Thread.run(Thread.java:1583)
libraryaddict commented 1 day ago

To be clear, this is a bug in https://github.com/retrooper/packetevents