NEZNAMY / TAB

"That" TAB plugin.
Apache License 2.0
881 stars 248 forks source link

An error occurred when reading packets - NullPointerException: null #121

Closed mibby closed 4 years ago

mibby commented 4 years ago

Server version Purpur dev 497 (Paper Fork for Spigot 1.15.2)

Plugin version Tab 2.7.0

19.03.2020 - 16:10:17 - [TAB v2.7.0] An error occurred when reading packets
19.03.2020 - 16:10:17 - java.lang.NullPointerException: null
19.03.2020 - 16:10:17 -        at com.google.common.collect.LinkedHashMultimap$1.next(LinkedHashMultimap.java:550)
19.03.2020 - 16:10:17 -        at com.google.common.collect.LinkedHashMultimap$1.next(LinkedHashMultimap.java:534)
19.03.2020 - 16:10:17 -        at com.google.common.collect.AbstractMultimap.putAll(AbstractMultimap.java:95)
19.03.2020 - 16:10:17 -        at com.google.common.collect.LinkedHashMultimap.putAll(LinkedHashMultimap.java:86)
19.03.2020 - 16:10:17 -        at com.google.common.collect.ForwardingMultimap.putAll(ForwardingMultimap.java:110)
19.03.2020 - 16:10:17 -        at me.neznamy.tab.shared.packets.PacketPlayOutPlayerInfo$PlayerInfoData.toNMS(PacketPlayOutPlayerInfo.java:139)
19.03.2020 - 16:10:17 -        at me.neznamy.tab.shared.packets.PacketPlayOutPlayerInfo.toNMS(PacketPlayOutPlayerInfo.java:199)
19.03.2020 - 16:10:17 -        at me.neznamy.tab.platforms.bukkit.Injector$1.write(Injector.java:95)
19.03.2020 - 16:10:17 -        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
19.03.2020 - 16:10:17 -        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
19.03.2020 - 16:10:17 -        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816)
19.03.2020 - 16:10:17 -        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723)
19.03.2020 - 16:10:17 -        at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:106)
19.03.2020 - 16:10:17 -        at me.bigteddy98.bannerboard.b28.write(Unknown Source)
19.03.2020 - 16:10:17 -        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
19.03.2020 - 16:10:17 -        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
19.03.2020 - 16:10:17 -        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816)
19.03.2020 - 16:10:17 -        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723)
19.03.2020 - 16:10:17 -        at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111)
19.03.2020 - 16:10:17 -        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
19.03.2020 - 16:10:17 -        at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801)
19.03.2020 - 16:10:17 -        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814)
19.03.2020 - 16:10:17 -        at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794)
19.03.2020 - 16:10:17 -        at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831)
19.03.2020 - 16:10:17 -        at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1071)
19.03.2020 - 16:10:17 -        at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:300)
19.03.2020 - 16:10:17 -        at com.comphenix.protocol.injector.netty.ChannelProxy.writeAndFlush(ChannelProxy.java:327)
19.03.2020 - 16:10:17 -        at net.minecraft.server.v1_15_R1.NetworkManager.lambda$b$4(NetworkManager.java:223)
19.03.2020 - 16:10:17 -        at com.comphenix.protocol.injector.netty.ChannelInjector$3.lambda$onMessageScheduled$1(ChannelInjector.java:321)
19.03.2020 - 16:10:17 -        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
19.03.2020 - 16:10:17 -        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
19.03.2020 - 16:10:17 -        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:313)
19.03.2020 - 16:10:17 -        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
19.03.2020 - 16:10:17 -        at java.base/java.lang.Thread.run(Thread.java:830)
NEZNAMY commented 4 years ago

https://github.com/NEZNAMY/TAB/blob/master/src/me/neznamy/tab/shared/packets/PacketPlayOutPlayerInfo.java#L139 there's even a null check. Does this error appear often or rarely ?

mibby commented 4 years ago

I'd assume rarely. I noticed a staff member who logged in after a server restart did not have his playername nametag colored while others did, so I typed /tab reload. It fixed the coloring of his name but the error occurred.

mibby commented 4 years ago

I seem to be running into more and more players who don't have a TAB nametag. It's not everyone, just seems to be select individuals at random. Reloading tab forced their nametag to reappear, but sometimes it disappears immediately after. Usually forcing a second reload again makes it stick. :(

Could any of these client errors have something to do with it? These errors are found in the client log file and spam somewhat regularly. Removing TAB, the errors no longer occur.

[23:55:59] [main/FATAL]: Error executing task on Client
java.lang.IllegalStateException: Player is either on another team or not on any team. Cannot remove from team 'collideRule_1240'.
    at cwl.b(SourceFile:236) ~[cwl.class:?]
    at dnp.a(SourceFile:2112) ~[dnp.class:?]
    at os.a(SourceFile:122) ~[os.class:?]
    at os.a(SourceFile:16) ~[os.class:?]
    at lv.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:33) ~[lv.class:?]
    at lv$$Lambda$2380/1346770763.run(Unknown Source) ~[?:?]
    at ais.c(ThreadTaskExecutor.java:173) [ais.class:?]
    at aiw.c(SourceFile:23) [aiw.class:?]
    at ais.w(ThreadTaskExecutor.java:135) [ais.class:?]
    at ais.bk(ThreadTaskExecutor.java:115) [ais.class:?]
    at dbn.d(SourceFile:956) [dbn.class:?]
    at dbn.d(SourceFile:619) [dbn.class:?]
    at net.minecraft.client.main.Main.main(SourceFile:204) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]
    at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:159) [launchwrapper-of-2.1.jar:2.1]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:30) [launchwrapper-of-2.1.jar:2.1]
java.lang.IllegalArgumentException: Default value cannot be lower than minimum value!
    at alx.<init>(SourceFile:21) ~[alx.class:?]
    at dnp.a(SourceFile:2167) ~[dnp.class:?]
    at pf.a(SourceFile:70) ~[pf.class:?]
    at pf.a(SourceFile:15) ~[pf.class:?]
    at lv.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:33) ~[lv.class:?]
    at lv$$Lambda$2380/1346770763.run(Unknown Source) ~[?:?]
    at ais.c(ThreadTaskExecutor.java:173) [ais.class:?]
    at aiw.c(SourceFile:23) [aiw.class:?]
    at ais.w(ThreadTaskExecutor.java:135) [ais.class:?]
    at ais.bk(ThreadTaskExecutor.java:115) [ais.class:?]
    at dbn.d(SourceFile:956) [dbn.class:?]
    at dbn.d(SourceFile:619) [dbn.class:?]
    at net.minecraft.client.main.Main.main(SourceFile:204) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]
    at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:159) [launchwrapper-of-2.1.jar:2.1]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:30) [launchwrapper-of-2.1.jar:2.1]
[23:38:15] [main/FATAL]: Error executing task on Client
java.lang.NullPointerException: null
    at dnp.a(SourceFile:565) ~[dnp.class:?]
    at mc.a(SourceFile:57) ~[mc.class:?]
    at mc.a(SourceFile:11) ~[mc.class:?]
    at lv.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:33) ~[lv.class:?]
    at lv$$Lambda$2380/1346770763.run(Unknown Source) ~[?:?]
    at ais.c(ThreadTaskExecutor.java:173) [ais.class:?]
    at aiw.c(SourceFile:23) [aiw.class:?]
    at ais.w(ThreadTaskExecutor.java:135) [ais.class:?]
    at ais.bk(ThreadTaskExecutor.java:115) [ais.class:?]
    at dbn.d(SourceFile:956) [dbn.class:?]
    at dbn.d(SourceFile:619) [dbn.class:?]
    at net.minecraft.client.main.Main.main(SourceFile:204) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]
    at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:159) [launchwrapper-of-2.1.jar:2.1]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:30) [launchwrapper-of-2.1.jar:2.1]
mibby commented 4 years ago

Here is the full client log at the start of connecting to the server with all player chat stripped away from it. You can see errors usually occur when teleporting around loading players or when someone logs off. There are 3 unique errors (all 3 posted above) and go away when TAB is removed. :(

NEZNAMY commented 4 years ago

java.lang.IllegalStateException: Player is either on another team or not on any team. Cannot remove from team 'collideRule_1240'. This team comes from another plugin.

For the nullpointer, try adding safe-team-register: false into your config.

mibby commented 4 years ago

safe-team-register: false is unfortunately already added in the config from the last time we tried to fix the error.

This team comes from another plugin.

I don't have any other plugins installed that modify teams. The only thing I could think of is possibly Paper Spigot's global setting enable-player-collisions: false. I'll set that to true and give it a try. That only covers 1 of the errors though. :(

I cloned my server locally for testing and was able to reproduce the other 2 NullPointerExceptions by myself with just Citizens NPCs near me.

NEZNAMY commented 4 years ago

So it's not TAB then ?

mibby commented 4 years ago

It is TAB. The bottom two client exceptions occur only when TAB is installed. Specifically java.lang.IllegalArgumentException: Default value cannot be lower than minimum value! and Error executing task on Client java.lang.NullPointerException: null.

NEZNAMY commented 4 years ago

Since the code is obfuscated i don't know which features cause it. Can you try disabling one by one to find out ?

mibby commented 4 years ago

I'd assume it is the nametag feature. I do not have anything else enabled but change-nametag-prefix-suffix: true.

NEZNAMY commented 4 years ago

What client version and how to use the console ? I will try it myself.

mibby commented 4 years ago

Client 1.15.2. Logs can be found in \%AppData%\Roaming\.minecraft\logs or enabling Open output log when games start setting in the Settings menu of the minecraft launcher.

mibby commented 4 years ago

Client errors have been fixed. Caused by bad entity packets from Tuinity fork.