Skip to content

Instantly share code, notes, and snippets.

@riking
Last active December 15, 2015 17:48
Show Gist options
  • Save riking/5298619 to your computer and use it in GitHub Desktop.
Save riking/5298619 to your computer and use it in GitHub Desktop.

CraftBukkit Scoreboard - Current Bug

Sometimes, when a player logs onto a server, the scoreboard is not properly sent. This can result in a client-side NullPointerException when the Scoreboard display slot is set for an objective already in that exact same slot. Here is an example stacktrace:

java.lang.NullPointerException
at arj.k(SourceFile:133)
at bdl.a(SourceFile:1086)
at fc.a(SourceFile:43)
at ci.b(SourceFile:350)
at bdl.d(SourceFile:95)

Here is an example data dump of the client's Scoreboard when this occurs:

a{}
b{}
c{Riking={null=arg@dbe848}}
d[null, null, null]
e{}
f{}

Here is an example data dump of the client's scoreboard in proper conditions:

a{health=are@9befde}
b{arl@35f5cb=[are@9befde]}
c{Mattman1153={are@9befde=arg@ff742e}, Wolvereness={are@9befde=arg@1249f80}, Riking={are@9befde=arg@163985e}}
d[null, are@9befde, null]
e{Orange-Red=arf@1a87752, Yeller=arf@131e0bc, Periwinkle=arf@1997f42}
f{Mattman1153=arf@1997f42, Wolvereness=arf@1a87752}

The cause of this is unknown as of April 2.

Please, do tests and help us find the cause of this bug.

To recreate the Scoreboard data dump, compile the following as a client mod, decompile b.java, apply diff, create ScoreboardCrash.java as seen at https://gist.github.com/riking/5298434, then javac -cp minecraft.jar b.java ScoreboardCrash.java inside your .minecraft/bin. (This creates a client mod, direct-install it to your jar.)

If someone could log packets coming to the client right before this crash happens, that would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment