{"action":"created","issue":{"url":"https://api.github.com/repos/CodinGame/codingame-game-engine/issues/15","repository_url":"https://api.github.com/repos/CodinGame/codingame-game-engine","labels_url":"https://api.github.com/repos/CodinGame/codingame-game-engine/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/CodinGame/codingame-game-engine/issues/15/comments","events_url":"https://api.github.com/repos/CodinGame/codingame-game-engine/issues/15/events","html_url":"https://github.com/CodinGame/codingame-game-engine/issues/15","id":394955799,"node_id":"MDU6SXNzdWUzOTQ5NTU3OTk=","number":15,"title":"Unable to run code concurrently.","user":{"login":"nikitinalexx","id":4941736,"node_id":"MDQ6VXNlcjQ5NDE3MzY=","avatar_url":"https://avatars1.githubusercontent.com/u/4941736?v=4","gravatar_id":"","url":"https://api.github.com/users/nikitinalexx","html_url":"https://github.com/nikitinalexx","followers_url":"https://api.github.com/users/nikitinalexx/followers","following_url":"https://api.github.com/users/nikitinalexx/following{/other_user}","gists_url":"https://api.github.com/users/nikitinalexx/gists{/gist_id}","starred_url":"https://api.github.com/users/nikitinalexx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikitinalexx/subscriptions","organizations_url":"https://api.github.com/users/nikitinalexx/orgs","repos_url":"https://api.github.com/users/nikitinalexx/repos","events_url":"https://api.github.com/users/nikitinalexx/events{/privacy}","received_events_url":"https://api.github.com/users/nikitinalexx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-31T09:58:41Z","updated_at":"2018-12-31T17:38:55Z","closed_at":null,"author_association":"NONE","body":"Hi, I'm trying to run some different games concurrently.\r\n```\r\nfor (int t = 0; t < 50; t++) {\r\n            Thread thread = new Thread(() -> {\r\n                  MultiplayerGameRunner gameRunner = new MultiplayerGameRunner();\r\n                  gameRunner.addAgent(Player.class);\r\n                  gameRunner.addAgent(Player.class);\r\n                  gameRunner.simulate();\r\n            }\r\n}\r\n```\r\n\r\nIt gives this stacktrace.\r\n**Exception in thread \"Thread-396\" java.util.ConcurrentModificationException\r\n\tat java.base/java.util.HashMap.forEach(HashMap.java:1339)\r\n\tat com.codingame.gameengine.module.entities.WorldState.diffFromOtherWorldState(WorldState.java:83)\r\n\tat com.codingame.gameengine.module.entities.GraphicEntityModule.sendFrameData(GraphicEntityModule.java:187)\r\n\tat com.codingame.gameengine.module.entities.GraphicEntityModule.onGameInit(GraphicEntityModule.java:326)\r\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1540)\r\n\tat com.codingame.gameengine.core.GameManager.start(GameManager.java:99)\r\n\tat com.codingame.gameengine.core.RefereeMain.start(RefereeMain.java:49)\r\n\tat com.codingame.gameengine.runner.RefereeAgent$1.run(RefereeAgent.java:58)**"},"comment":{"url":"https://api.github.com/repos/CodinGame/codingame-game-engine/issues/comments/450672969","html_url":"https://github.com/CodinGame/codingame-game-engine/issues/15#issuecomment-450672969","issue_url":"https://api.github.com/repos/CodinGame/codingame-game-engine/issues/15","id":450672969,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDY3Mjk2OQ==","user":{"login":"nikitinalexx","id":4941736,"node_id":"MDQ6VXNlcjQ5NDE3MzY=","avatar_url":"https://avatars1.githubusercontent.com/u/4941736?v=4","gravatar_id":"","url":"https://api.github.com/users/nikitinalexx","html_url":"https://github.com/nikitinalexx","followers_url":"https://api.github.com/users/nikitinalexx/followers","following_url":"https://api.github.com/users/nikitinalexx/following{/other_user}","gists_url":"https://api.github.com/users/nikitinalexx/gists{/gist_id}","starred_url":"https://api.github.com/users/nikitinalexx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikitinalexx/subscriptions","organizations_url":"https://api.github.com/users/nikitinalexx/orgs","repos_url":"https://api.github.com/users/nikitinalexx/repos","events_url":"https://api.github.com/users/nikitinalexx/events{/privacy}","received_events_url":"https://api.github.com/users/nikitinalexx/received_events","type":"User","site_admin":false},"created_at":"2018-12-31T17:38:55Z","updated_at":"2018-12-31T17:38:55Z","author_association":"NONE","body":"It says 2.5"}}
{"actor":{"display_login":"nikitinalexx"}}