[MC-122609] '/scoreboard players reset * objective' does not work Created: 27/Nov/17  Updated: 03/Jan/18  Resolved: 03/Jan/18

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 17w48a, Minecraft 17w49a, Minecraft 17w50a
Fix Version/s: Minecraft 18w01a

Type: Bug
Reporter: Somin Assignee: [Mojang] Dinnerbone (Nathan Adams)
Resolution: Fixed Votes: 13
Labels: command, scoreboard

Issue Links:
Cloners
clones MC-49150 '/scoreboard players reset *' produce... Resolved
Duplicate
is duplicated by MC-122993 ConcurrentModificationException when ... Resolved
is duplicated by MC-123146 ConcurrentModificationException when ... Resolved
CHK:
Confirmation Status: Confirmed

 Description   

The bug

'/scoreboard players reset * objective' does not work. The command prints java.util.ConcurrentModificationException in chat and resets only one player's score for the chosen objective.

Expected behavior

All players' scores are reset. The objective is empty.

How to reproduce

  1. Create an Objective with multiple scores (players or fake names)
  2. Use the command /scoreboard players reset * objective

Note: I noticed that in rare cases it works as intended, resetting all scores. It seems to work after setting multiple fake scores with the * wildcard, e.g. using /scoreboard players remove * objective 1, when fake players exist on other objectives. I am not sure if there is a pattern to this behavior though.

[Server thread/ERROR]: Couldn't execute command for Somin: scoreboard players reset * advancement
java.util.ConcurrentModificationException: null
	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429) ~[?:1.8.0_25]
	at java.util.HashMap$KeyIterator.next(HashMap.java:1453) ~[?:1.8.0_25]
	at pb.b(SourceFile:308) ~[17w49a.jar:?]
	at pb.c(SourceFile:166) ~[17w49a.jar:?]
	at pb$$Lambda$469/52076202.run(Unknown Source) ~[?:?]
	at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:119) ~[brigadier-0.1.13.jar:?]
	at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:76) ~[brigadier-0.1.13.jar:?]
	at bn.a(SourceFile:184) [17w49a.jar:?]
	at rd.c(SourceFile:868) [17w49a.jar:?]
	at rd.a(SourceFile:855) [17w49a.jar:?]
	at ko.a(SourceFile:37) [17w49a.jar:?]
	at ko.a(SourceFile:9) [17w49a.jar:?]
	at hg$1.run(SourceFile:13) [17w49a.jar:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_25]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_25]
	at i.a(SourceFile:137) [17w49a.jar:?]
	at net.minecraft.server.MinecraftServer.w(SourceFile:636) [17w49a.jar:?]
	at net.minecraft.server.MinecraftServer.v(SourceFile:592) [17w49a.jar:?]
	at clf.v(SourceFile:152) [17w49a.jar:?]
	at net.minecraft.server.MinecraftServer.run(SourceFile:497) [17w49a.jar:?]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25]

Generated at Wed Aug 15 19:21:08 CDT 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.