TAB icon indicating copy to clipboard operation
TAB copied to clipboard

Serverswitchevent on 1.7 Client crashes due to existing scoreboard teams

Open c0dingnoobi opened this issue 2 years ago • 12 comments

Server version

1.8.8

TAB version

3.1.5

Describe the bug

Players on 1.7 experience crashes sometimes when switching servers while their scoreboard is enabled. It is not happening often, sometimes it works without any problems. To reproduce u either have to relog then multitple times until it doesnt work or restart the servers.

Expected behavior

Server switching without crashes

Steps to reproduce

  1. Join on 1.8 server using 1.7
  2. Have default config with scoreboards and globalplayerlist set
  3. Switch servers to see crash

Additional info

Client crash report: crash-2022-10-09_00.33.12-client.txt

Checklist

  • [X] I am running latest version of the plugin
  • [X] I have read the wiki to make sure it's not an issue with configuration
  • [X] I have read the Compatibility wiki page and am not trying to run the plugin on an unsupported server version / platform

c0dingnoobi avatar Oct 10 '22 17:10 c0dingnoobi

Some important details have been omitted here:

  1. You are using lunar client, which has some known issues with compatibility.
  2. I assume that, as you are connecting to a 1.8 server with a 1.7 client, the server is running some form of protocol translation software, most likely ViaVersion with ViaRewind.
  3. Details about the servers being switched between and some other multi-server setup details. Are you switching between two 1.8 servers running the same software? Is TAB running on both of the backend servers and/or the proxy (which I assume is BungeeCord or a derivative, as that's the only proxy we support)?

Also, you clearly haven't read the compatibility guide well enough, as the last point at the very bottom has information about custom clients, and mentions how Lunar Client has 3 known bugs.

I don't know if anyone else wants to try and debug this, but I certainly won't try and debug this, as you're using a proprietary custom client and a version that is not supported by any of the sources that I could retrieve mappings to look at the game's source with anymore, and it hasn't been for ages.

If you can reproduce the issue without Lunar Client, with just a regular vanilla 1.7 client, then it's probably a Lunar issue, and no attempt will be made to fix it on our end. If it still occurs with a vanilla 1.7 client, me or nez will look in to it, and see what we can do.

BomBardyGamer avatar Oct 11 '22 10:10 BomBardyGamer

  1. Yes I am. The issue also has just been tested on vanilla 1.7 and behaviour still persists.
  2. Protocol translation is done with latest commit of ViaRewind
  3. Yes TAB-Bridge is on both servers which do run on 1.8

Some detail which might be important to avoid further questions. I am using XCord as for proxy but also just have been tested using latest Bungeecord. Same thing as for my spigot. I am using WindSpigot but also has been tested with vanilla Spigot 1.8.8 jar without any plugins except the Bridges. As for your last statement, i guess u meant "If you can't reproduce". As pointed in 1. it has also just been tested on vanilla 1.7 Client. Ah and my bad for not providing those details, did not think of them.

c0dingnoobi avatar Oct 11 '22 13:10 c0dingnoobi

XCord has issues on 1.7 I believe, try another fork.

NEZNAMY avatar Oct 12 '22 18:10 NEZNAMY

As Mentioned It also has been tested using latest Bungeecord.

c0dingnoobi avatar Oct 12 '22 19:10 c0dingnoobi

Latest bungeecord does not support 1.7.

NEZNAMY avatar Oct 12 '22 19:10 NEZNAMY

Had ViaVersion plus ViaRewind while doing that. I can test using FlameCord which has 1.7 support.

c0dingnoobi avatar Oct 12 '22 19:10 c0dingnoobi

ViaVersion on bungeecord is an unfixable compatibility issue.

NEZNAMY avatar Oct 12 '22 19:10 NEZNAMY

Also seems to be replicateable on FlameCord (without any plugin on proxy).

c0dingnoobi avatar Oct 12 '22 19:10 c0dingnoobi

After further testing for like 2 weeks, i could reproduce that specific problem also when ever 1.7 player does not have a scoreboard defined (like f.e if he is in a world which doesnt have a scoreboard set) and stays afk for about 10 - 20 min. This also happens to 1.7 vanilla Minecraft. It has been tested using Xcord and Flamecord (ran both for like 3 days to be sure). Via is only on backends. When the client crashes it produces same Crash log with same error as i mentioned above.

My theory is that somehow even if the player doesnt have the scoreboard given by TAB, it still tries to either update or load a non existing scoreboard which causes the crashes. I personally think that the server switch event itself isnt the cause. I have tested defining a scoreboard to the server where i crashed before when switiching to. Having a scoreboard on the server leads to no crash. Whenever i remove that test scoreboard the client is again able to crash.

So to sum up Afking in world without scoreboard defined --> crash Switching to a server which has no scoreboard defined --> crash Switching to server which has scoreboard defined --> no crash

Hopefully these small details did help.

c0dingnoobi avatar Oct 25 '22 18:10 c0dingnoobi

After even testing more I can reproduce this bug with another Crash reason. Seems like when having disable_entity_metadata_rewrite in waterfall.yml disabled, the crash report is being more clear. Lunar Client Crash Log: https://pastebin.com/6czbpYKw

Vanilla 1.7 Crash Log: https://pastebin.com/TLN2MeXJ

c0dingnoobi avatar Oct 30 '22 18:10 c0dingnoobi

The fact that this is to do with scoreboard teams indicates to me that the issue is with player tags (the stuff above/below your name tag), rather than the scoreboard, which is a good indication. These errors would indicate to me that there's a desync between TAB on the server and the clients (TAB and the server think a team doesn't exist to set the nametag data, so they create one, but the client thinks the team still exists).

BomBardyGamer avatar Nov 03 '22 09:11 BomBardyGamer

Yea im currently also experiencing these crashes without scoreboards which should confirm your statement.

c0dingnoobi avatar Nov 03 '22 09:11 c0dingnoobi

Try https://github.com/NEZNAMY/TAB/actions/runs/3393807158

NEZNAMY avatar Nov 04 '22 12:11 NEZNAMY

Works, when having disable_entity_metadata_rewrite: true in waterfall.yml set to true. Otherwhise its still crashing for same crash reason.

c0dingnoobi avatar Nov 04 '22 13:11 c0dingnoobi

Sounds about right. Pipeline injection is disabled for 1.7 clients, so Login packet sent to clear data cannot be detected, so plugin assumes one was sent on server switch.

NEZNAMY avatar Nov 04 '22 13:11 NEZNAMY

Ah, just a reminder. It doesn't crash on serverswitchevents anymore. But it still does when being in a world which doesn't have a scoreboard set. Crash reason is also same (team already exists). It happens randomly so i guess it has something to do with any kind of refreshing.

c0dingnoobi avatar Nov 05 '22 19:11 c0dingnoobi

What is the name of the team?

NEZNAMY avatar Nov 05 '22 19:11 NEZNAMY

01playernameA

c0dingnoobi avatar Nov 05 '22 19:11 c0dingnoobi

That's from teams feature, not sidebar as you originally reported. I'll need steps to reproduce.

NEZNAMY avatar Nov 05 '22 19:11 NEZNAMY

Okay. I can try to do more tests to see what exactly causes it. But for now I can only say that it randomly happens with 1.7 when being in a world which doesnt have sb defined.

c0dingnoobi avatar Nov 05 '22 19:11 c0dingnoobi

That's not related to scoreboard in any way.

NEZNAMY avatar Nov 05 '22 19:11 NEZNAMY

Okay will keep that in mind. Will just do some testing might report when i know more about it.

c0dingnoobi avatar Nov 05 '22 19:11 c0dingnoobi

Okay seems to happen whenever disable_entity_metadata_rewrite: true is true in waterfall.yml It still random and i cant figure out what does cause the crash exactly. But it only happens when that is enabled.

c0dingnoobi avatar Nov 06 '22 21:11 c0dingnoobi

Do you have teams disabled in some servers?

NEZNAMY avatar Nov 06 '22 21:11 NEZNAMY

Not rlly no. I once removed the default two and set disable-in-servers: [] disable-in-worlds: []

c0dingnoobi avatar Nov 06 '22 21:11 c0dingnoobi

Try https://github.com/NEZNAMY/TAB/actions/runs/3406131262

NEZNAMY avatar Nov 06 '22 21:11 NEZNAMY

kk

c0dingnoobi avatar Nov 06 '22 21:11 c0dingnoobi

Okay that might sound weird. The error message u built in never came. The clients still crashing. After further testing this seems to be irrelevant to waterfall.yml option since it happens regardless if true or false. The error message which usually should indicate which team was involved also doesnt seem to happen anymore. It just sends me the NullPointerException which i got once before (https://pastebin.com/riDqGkGY). I am still testing to see what triggers it.

c0dingnoobi avatar Nov 08 '22 18:11 c0dingnoobi

Looks like I should add the check to objectives as well. However, finding the cause with steps to reproduce will help more.

NEZNAMY avatar Nov 08 '22 18:11 NEZNAMY

Working on it can't rlly give u any informations about reproducing yet Edit: It is still noticeable that this only occurs for player's who are in worlds which don't have any scoreboards defined. At spawn (which has a sb defined) it never happened.

c0dingnoobi avatar Nov 08 '22 18:11 c0dingnoobi