mojira.dev
MC-49150

'/scoreboard players reset *' produces error if tracking multiple players

Ensure you are using a newly created world or have no other players tracked on the scoreboard.

Objective:

/scoreboard objectives add TEST dummy

Increment:

/scoreboard players add @p TEST 1

The next step is to reset all players using the *** iterator. The following works just fine because at this step, only one player is being tracked:

/scoreboard players reset *

If there are two players being tracked, whether or not they are online:

/scoreboard players add #FAKE TEST 1
/scoreboard players add @p TEST 1

And then reset scores:

/scoreboard players reset *

You will receive the error: "An unknown error occurred while attempting to perform this command" and only one of the tracked players will be reset.

It might be the fact that multiple players are found, rather than specifically offline players. Unfortunately I don't have the means to test this, as I'd need two online players to know for sure. Confirmation from somebody who has access to that is greatly appreciated!

It is confirmed caused by multiple players being tracked.

Error details presented in the server log:

[16:12:28 ERROR]: Couldn't process command: 'scoreboard players reset *'
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(Unknown Source) ~[?:1.7.0_21]
at java.util.HashMap$KeyIterator.next(Unknown Source) ~[?:1.7.0_21]
at cc.c(SourceFile:207) ~[minecraft_server.14w08a.jar:?]
at cc.b(SourceFile:42) ~[minecraft_server.14w08a.jar:?]
at z.a(SourceFile:65) [minecraft_server.14w08a.jar:?]
at op.d(SourceFile:531) [minecraft_server.14w08a.jar:?]
at op.a(SourceFile:518) [minecraft_server.14w08a.jar:?]
at js.a(SourceFile:37) [minecraft_server.14w08a.jar:?]
at js.a(SourceFile:9) [minecraft_server.14w08a.jar:?]
at fm.a(SourceFile:163) [minecraft_server.14w08a.jar:?]
at ok.c(SourceFile:134) [minecraft_server.14w08a.jar:?]
at net.minecraft.server.MinecraftServer.w(SourceFile:555) [minecraft_server.14w08a.jar:?]
at nb.w(SourceFile:264) [minecraft_server.14w08a.jar:?]
at net.minecraft.server.MinecraftServer.v(SourceFile:471) [minecraft_server.14w08a.jar:?]
at net.minecraft.server.MinecraftServer.run(SourceFile:387) [minecraft_server.14w08a.jar:?]
at mr.run(SourceFile:657) [minecraft_server.14w08a.jar:?]

Linked issues

Comments 4

this has been fixed in 14w10a

Is this still a concern in the current Minecraft version 14w18a / Launcher version 1.3.11 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Did you even read my comment? It might be back in w18, but if so I wouldn't know. It DID work in w10, and if it doesn't anymore, then Mojang must have to revert to some old code. (I will test it when I get the chance tho)

No, I didn't, that was a bulk change.

Skylinerw

(Unassigned)

Unconfirmed

Minecraft 14w07a, Minecraft 14w08a

Minecraft 14w17a

Retrieved