ViaRewind

ViaRewind

7.4k Downloads

Entity type is lost in the tracker

Pablete1234 opened this issue ยท 7 comments

commented

/viaversion dump Output

https://dump.viaversion.com/cf4487d47d27d9e029cb71ee8daa2431315a2fce876ea3ad855cda7a26f8f251

Console Error

[03:44:41 ERROR]: [ViaVersion] (1.9->1.8) An error occurred in entity data handler EntityPacketRewriter1_9 for untracked entity type: Metadata{id=17, metaType=COMPOUND_TAG, value={}}
[03:44:41 ERROR]: [ViaVersion] (1.9->1.8) Full entity data: Metadata{id=17, metaType=COMPOUND_TAG, value={}}
[03:44:41 ERROR]: [ViaVersion] (1.9->1.8) Error: 
java.lang.NullPointerException: Cannot invoke "com.viaversion.viaversion.api.minecraft.entities.EntityType.getParent()" because "currentType" is null
	at ViaRewind-4.0.1-SNAPSHOT.jar/com.viaversion.viarewind.protocol.v1_9to1_8.data.EntityDataIndex1_8.searchIndex(EntityDataIndex1_8.java:50) ~[ViaRewind-4.0.1-SNAPSHOT.jar:?]
	at ViaRewind-4.0.1-SNAPSHOT.jar/com.viaversion.viarewind.protocol.v1_9to1_8.rewriter.EntityPacketRewriter1_9.handleEntityData(EntityPacketRewriter1_9.java:534) ~[ViaRewind-4.0.1-SNAPSHOT.jar:?]
	at ViaVersion-5.0.1.jar/com.viaversion.viaversion.rewriter.EntityRewriter.handleEntityData(EntityRewriter.java:126) ~[ViaVersion-5.0.1.jar:?]
	at ViaBackwards-5.0.1.jar/com.viaversion.viabackwards.api.rewriters.EntityRewriterBase.handleEntityData(EntityRewriterBase.java:72) ~[ViaBackwards-5.0.1.jar:?]
	at ViaBackwards-5.0.1.jar/com.viaversion.viabackwards.api.rewriters.LegacyEntityRewriter$3.lambda$register$0(LegacyEntityRewriter.java:105) ~[ViaBackwards-5.0.1.jar:?]
	at ViaVersion-5.0.1.jar/com.viaversion.viaversion.api.protocol.remapper.PacketHandlers.handle(PacketHandlers.java:179) ~[ViaVersion-5.0.1.jar:?]
	at ViaVersion-5.0.1.jar/com.viaversion.viaversion.api.protocol.AbstractProtocol.transform(AbstractProtocol.java:405) ~[ViaVersion-5.0.1.jar:?]
	at ViaVersion-5.0.1.jar/com.viaversion.viaversion.protocol.packet.PacketWrapperImpl.apply(PacketWrapperImpl.java:369) ~[ViaVersion-5.0.1.jar:?]
	at ViaVersion-5.0.1.jar/com.viaversion.viaversion.protocol.ProtocolPipelineImpl.transform(ProtocolPipelineImpl.java:122) ~[ViaVersion-5.0.1.jar:?]
	at ViaVersion-5.0.1.jar/com.viaversion.viaversion.connection.UserConnectionImpl.transform(UserConnectionImpl.java:337) ~[ViaVersion-5.0.1.jar:?]
	at ViaVersion-5.0.1.jar/com.viaversion.viaversion.connection.UserConnectionImpl.transformClientbound(UserConnectionImpl.java:313) ~[ViaVersion-5.0.1.jar:?]
	at ViaVersion-5.0.1.jar/com.viaversion.viaversion.bukkit.handlers.BukkitEncodeHandler.encode(BukkitEncodeHandler.java:58) ~[ViaVersion-5.0.1.jar:?]
	at ViaVersion-5.0.1.jar/com.viaversion.viaversion.bukkit.handlers.BukkitEncodeHandler.encode(BukkitEncodeHandler.java:35) ~[ViaVersion-5.0.1.jar:?]
[...]
	at net.minecraft.network.Connection.doSendPacket(Connection.java:513) ~[paper-1.21.jar:1.21-15-2df432f]
	at net.minecraft.network.Connection.lambda$sendPacket$13(Connection.java:498) ~[paper-1.21.jar:1.21-15-2df432f]
	at ProtocolLib.jar/com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.lambda$proxyRunnable$2(NettyEventLoopProxy.java:48) ~[ProtocolLib.jar:?]
	at io.netty.util.concurrent.AbstractEventExecutor.runTask$$$capture(AbstractEventExecutor.java:174) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:167) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413) ~[netty-transport-classes-epoll-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

Bug Description

I am unsure as to what either causes the entity not to make it into the tracker, or removes it too early from the tracker. But once that happens any future metadata updates for this entity are spamming these errors in console.

All i can say is it happens reliably, and it could have to do with custom tablist implementation that sends specific metadata packets to toggle skin layers on/off, but it was working fine in earlier viarewind versions.

I believe this only started happening after 481315f

Steps to Reproduce

Server in 1.21
A client joins with 1.21
Another client joins in 1.8
???
Console log spam?

I'm sorry but i have not figured out what the root cause is so i can't really tell you how to reproduce, if nothing obvious has changed about entity tracking i'll dive deeper and attach further info.

Expected Behavior

No console error spam?

Additional Server Info

No response

Checklist

commented

Platform: 1.21--15--2df432f%20%28MC%3A%201.21%29
ViaVersion (5.0.1): Even with master
ViaBackwards(5.0.1): Even with master
ViaRewind(4.0.0): 5 commits behind master

Please update all Via* plugins from https://ci.viaversion.com/.In case the issue still persists send the new dump and the issue will be reopened

commented

Platform: 1.21--15--2df432f%20%28MC%3A%201.21%29
ViaVersion (5.0.1): Even with master
ViaBackwards(5.0.1): Even with master
ViaRewind(4.0.1-SNAPSHOT): Even with master

commented

The commit you mentioned wasn't in the 4.0.0 release (the version you seem to used in the first dump) and generally shouldn't change anything as it's the same, it's more likely that this is another plugin sending bad data. You should follow #524 (comment) to find if another plugin is causing this.

commented

@FlorianMichael the version used is the second posted, i copied the dump from my previous issue, but this only started happening after the update to 4.0.1 snapshot

commented

@Pablete1234 Can you take a look at the VV discord?

commented

Found the root cause and it was not viarewind related