ViaRewind

ViaRewind

7.4k Downloads

1.7 Crash (Team Scoreboard bug)

GabrielMottaDev opened this issue ยท 5 comments

commented

The error only occurs using ViaRewind, I tested in parallel with ViaVersion along with an older version of ProtocolSupport, and the bug described here no longer occurs

The following code snippet is being built on both servers (Server1, Server2):
@EventHandler
public void onJoin(PlayerJoinEvent e){
e.getPlayer().setScoreboard(Bukkit.getServer().getScoreboardManager().getNewScoreboard(););
Scoreboard board = e.getPlayer().getScoreboard();
Team team = board.getTeam("mmembro");
if (team == null) {
team = board.registerNewTeam("mmembro");
}
team.setPrefix("Member ");
}

When the player is using the minecraft version 1.7 and connects to Server1 everything happens normally and the team is registered
But now that the player is on Server1, if it connects to Server2, the error occurs and crashes the player

Error displaying to client:
unknown 2

The bug was found using the following setting:
Bungee[HexaCord]: (ViaVersion-1.6.0, ViaRewind-1.3.13)
Server1[Spigot 1.8.8]: (CustomPlugin)
Server2[Spigot 1.8.8]: (CustomPlugin)

Here is the ProtocolSupport jar, that im using as an alternative (if anyone needs, or is usefull to fix that bug):
ProtocolSupport.zip

Note:
I think this error occurs by an inconsistency of scoreboard teams, that be caused by the ViaRewind

commented

Update:
Apparently this only happens with ViaRewind while using it directly in BungeeCord.

I use this setting and works:
Bungee[HexaCord: (ViaVersion-1.6.0)
Server1[Spigot 1.8.8]: (ViaVersion-1.6.0, ViaRewind-1.3.13, CustomPlugin)
Server2[Spigot 1.8.8]: (ViaVersion-1.6.0, ViaRewind-1.3.13, CustomPlugin)

commented

There is a pretty complicated issue in ViaVersion, which causes packets to be sent in a wrong order in some cases. I guess this will be related it.

commented

I have the same issue in 2020, any update ?

commented

I have the same issue in 2020, any update ?

commented

As explained on the ViaVersion discord;
This happens when:

  • A scoreboard clear packet is sent down pipeline but ends up to be later than another scoreboard team add packet sent after
  • You're re-registering teams from the proxy without clearing them
  • Bungeecord doesn't correctly clear teams from the client on switch due to a timing issue with either ViaVersion or the packet queue.

If you want us to be able to assist you must provide a setup we can reproduce this on with minimal plugins, i.e. only the scoreboard or teams plugin and the server version and ViaVersion-build