Problem in Protocollib with PacketContainer#deepClone()
CloudeLecaw opened this issue · 3 comments
With one of our plugins sometimes get this error in console:
22:02:07] [Server thread/ERROR]: �[31m[Minecraft] [AdvancedGUI] Unhandled exception occurred in onPacketSending(PacketEvent) for AdvancedGUI�[0m
java.lang.RuntimeException: Unable to clone object PacketContainer[type=ENTITY_METADATA[class=PacketPlayOutEntityMetadata, id=77], structureModifier=StructureModifier[fieldType=class java.lang.Object, data=[private final int net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata.a, private final java.util.List net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata.b]]] (com.comphenix.protocol.events.PacketContainer)
at com.comphenix.protocol.reflect.cloning.SerializableCloner.clone(SerializableCloner.java:44) ~[ProtocolLib_5.0.0-Build553.jar:?]
at com.comphenix.protocol.events.PacketContainer.deepClone(PacketContainer.java:256) ~[ProtocolLib_5.0.0-Build553.jar:?]
at me.leoko.advancedgui.utils.map_freez_fix.PacketIdMapper.onPacketSending(PacketIdMapper.java:29) ~[AdvancedGUI_2.2.1.jar:?]
at com.comphenix.protocol.injector.SortedPacketListenerList.invokeSendingListener(SortedPacketListenerList.java:195) ~[ProtocolLib_5.0.0-Build553.jar:?]
at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketSending(SortedPacketListenerList.java:149) ~[ProtocolLib_5.0.0-Build553.jar:?]
at com.comphenix.protocol.injector.PacketFilterManager.postPacketToListeners(PacketFilterManager.java:552) ~[ProtocolLib_5.0.0-Build553.jar:?]
at com.comphenix.protocol.injector.PacketFilterManager.invokePacketSending(PacketFilterManager.java:526) ~[ProtocolLib_5.0.0-Build553.jar:?]
at com.comphenix.protocol.injector.netty.manager.NetworkManagerInjector.onPacketSending(NetworkManagerInjector.java:95) ~[ProtocolLib_5.0.0-Build553.jar:?]
at com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.processOutbound(NettyChannelInjector.java:508) ~[ProtocolLib_5.0.0-Build553.jar:?]
at com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.access$000(NettyChannelInjector.java:40) ~[ProtocolLib_5.0.0-Build553.jar:?]
at com.comphenix.protocol.injector.netty.channel.NettyChannelInjector$2.proxyRunnable(NettyChannelInjector.java:450) ~[ProtocolLib_5.0.0-Build553.jar:?]
at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.execute(NettyEventLoopProxy.java:220) ~[ProtocolLib_5.0.0-Build553.jar:?]
at net.minecraft.network.Connection.writePacket(Connection.java:433) ~[?:?]
at net.minecraft.network.Connection.send(Connection.java:382) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:2039) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:2025) ~[?:?]
at net.minecraft.server.level.ServerEntity.sendPairingData(ServerEntity.java:285) ~[?:?]
at net.minecraft.server.level.ServerEntity.addPairing(ServerEntity.java:268) ~[?:?]
at net.minecraft.server.level.ChunkMap$TrackedEntity.updatePlayer(ChunkMap.java:2345) ~[?:?]
at net.minecraft.server.level.ChunkMap$TrackedEntity.updatePlayers(ChunkMap.java:2258) ~[?:?]
at net.minecraft.server.level.ChunkMap.processTrackQueue(ChunkMap.java:2043) ~[paper-1.18.2.jar:git-Paper-286]
at net.minecraft.server.level.ChunkMap.tick(ChunkMap.java:2064) ~[paper-1.18.2.jar:git-Paper-286]
at net.minecraft.server.level.ServerChunkCache.tickChunks(ServerChunkCache.java:1076) ~[?:?]
at net.minecraft.server.level.ServerChunkCache.tick(ServerChunkCache.java:907) ~[?:?]
at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:628) ~[?:?]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1591) ~[paper-1.18.2.jar:git-Paper-286]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:483) ~[paper-1.18.2.jar:git-Paper-286]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1455) ~[paper-1.18.2.jar:git-Paper-286]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1225) ~[paper-1.18.2.jar:git-Paper-286]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315) ~[paper-1.18.2.jar:git-Paper-286]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.IllegalArgumentException: Unable to find a method that matches {modifiers=[required: 1000, banned: 0], return=Exact class net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata, params=[{Type: Exact class net.minecraft.network.PacketDataSerializer, Index: 0}], paramCount=1}
at com.comphenix.protocol.reflect.FuzzyReflection.getMethod(FuzzyReflection.java:174) ~[ProtocolLib_5.0.0-Build553.jar:?]
at com.comphenix.protocol.events.PacketContainer.readObject(PacketContainer.java:330) ~[ProtocolLib_5.0.0-Build553.jar:?]
at jdk.internal.reflect.GeneratedMethodAccessor133.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1231) ~[?:?]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2434) ~[?:?]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2268) ~[?:?]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1744) ~[?:?]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:514) ~[?:?]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:472) ~[?:?]
at com.comphenix.protocol.reflect.cloning.SerializableCloner.clone(SerializableCloner.java:42) ~[ProtocolLib_5.0.0-Build553.jar:?]
... 30 more
[22:02:07] [Server thread/ERROR]: �[31m[Minecraft] Parameters:
net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata@7d67a247[
a=594521
b=[net.minecraft.network.syncher.DataWatcher$Item@63ee312a, net.minecraft.network.syncher.DataWatcher$Item@235bc28a, net.minecraft.network.syncher.DataWatcher$Item@699acca0, net.minecraft.network.syncher.DataWatcher$Item@74e5ac77, net.minecraft.network.syncher.DataWatcher$Item@6610b4a0, net.minecraft.network.syncher.DataWatcher$Item@1ba2657a, net.minecraft.network.syncher.DataWatcher$Item@24e24562, net.minecraft.network.syncher.DataWatcher$Item@7dbdd39d, net.minecraft.network.syncher.DataWatcher$Item@1eebcd3e, net.minecraft.network.syncher.DataWatcher$Item@16eaf22c, net.minecraft.network.syncher.DataWatcher$Item@20157cc6, net.minecraft.network.syncher.DataWatcher$Item@33277262, net.minecraft.network.syncher.DataWatcher$Item@73e5db05, net.minecraft.network.syncher.DataWatcher$Item@325f2cc7, net.minecraft.network.syncher.DataWatcher$Item@39a79506, net.minecraft.network.syncher.DataWatcher$Item@319b4432, net.minecraft.network.syncher.DataWatcher$Item@6c7b9cf7, net.minecraft.network.syncher.DataWatcher$Item@2789bcab, net.minecraft.network.syncher.DataWatcher$Item@228302f9, net.minecraft.network.syncher.DataWatcher$Item@4952784f, net.minecraft.network.syncher.DataWatcher$Item@797ed9b6, net.minecraft.network.syncher.DataWatcher$Item@13f85ed6]
]
The Dev on the plugin said it might be because the packet PacketContainer#deepClone() was not called. So he asked me if this this packet still existing in Protocollib 5 or is there a new one that replaces it?
Or does the issue might accour of other reasons?
Currently we are using
- ProtocolLib_5.0.0-Build553
- Server is Paper 1.18.2
This is a duplicate of #1401
Please refer to #1401 (comment)