You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to run some different games concurrently.
for (int t = 0; t < 50; t++) {
Thread thread = new Thread(() -> {
MultiplayerGameRunner gameRunner = new MultiplayerGameRunner();
gameRunner.addAgent(Player.class);
gameRunner.addAgent(Player.class);
gameRunner.simulate();
}
}
It gives this stacktrace. Exception in thread "Thread-396" java.util.ConcurrentModificationException
at java.base/java.util.HashMap.forEach(HashMap.java:1339)
at com.codingame.gameengine.module.entities.WorldState.diffFromOtherWorldState(WorldState.java:83)
at com.codingame.gameengine.module.entities.GraphicEntityModule.sendFrameData(GraphicEntityModule.java:187)
at com.codingame.gameengine.module.entities.GraphicEntityModule.onGameInit(GraphicEntityModule.java:326)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at com.codingame.gameengine.core.GameManager.start(GameManager.java:99)
at com.codingame.gameengine.core.RefereeMain.start(RefereeMain.java:49)
at com.codingame.gameengine.runner.RefereeAgent$1.run(RefereeAgent.java:58)
The text was updated successfully, but these errors were encountered:
Hi, I'm trying to run some different games concurrently.
It gives this stacktrace.
Exception in thread "Thread-396" java.util.ConcurrentModificationException
at java.base/java.util.HashMap.forEach(HashMap.java:1339)
at com.codingame.gameengine.module.entities.WorldState.diffFromOtherWorldState(WorldState.java:83)
at com.codingame.gameengine.module.entities.GraphicEntityModule.sendFrameData(GraphicEntityModule.java:187)
at com.codingame.gameengine.module.entities.GraphicEntityModule.onGameInit(GraphicEntityModule.java:326)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at com.codingame.gameengine.core.GameManager.start(GameManager.java:99)
at com.codingame.gameengine.core.RefereeMain.start(RefereeMain.java:49)
at com.codingame.gameengine.runner.RefereeAgent$1.run(RefereeAgent.java:58)
The text was updated successfully, but these errors were encountered: