ConcurrentModificationException SERVER - game error
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 940
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 160
Description
Happened at the start of a turn, the player lost connection and this popped up, not the first time it happened, but he used different decks
```
Error type: SERVER - game error
Client version: 1.4.55-V3 (build: 2024-12-16 20:14)
Java version: 1.8.0_201
Default charset: UTF-8
Game error occurred:
java.util.ConcurrentModificationException
Server version: 1.4.55-V3 (build: 2024-12-16 20:14)
Stack trace:
java.util.ArrayList$Itr.checkForComodification(ArrayList.java:911)
java.util.ArrayList$Itr.next(ArrayList.java:861)
mage.util.CardUtil.deepCopyList(CardUtil.java:1992)
mage.util.CardUtil.deepCopyObject(CardUtil.java:1944)
mage.abilities.TriggeredAbilities.(TriggeredAbilities.java:65)
mage.abilities.TriggeredAbilities.copy(TriggeredAbilities.java:318)
mage.game.GameState.(GameState.java:169)
mage.game.GameState.copy(GameState.java:289)
mage.game.GameStates.save(GameStates.java:23)
mage.game.GameImpl.saveState(GameImpl.java:808)
mage.game.GameImpl.bookmarkState(GameImpl.java:938)
mage.game.GameImpl.playPriority(GameImpl.java:1695)
mage.game.turn.Step.priority(Step.java:67)
mage.game.turn.Phase.playStep(Phase.java:205)
mage.game.turn.Phase.play(Phase.java:91)
mage.game.turn.Turn.play(Turn.java:137)
mage.game.GameImpl.playTurn(GameImpl.java:1153)
mage.game.GameImpl.play(GameImpl.java:1060)
mage.game.GameImpl.start(GameImpl.java:1036)
mage.server.game.GameWorker.call(GameWorker.java:35)
mage.server.game.GameWorker.call(GameWorker.java:16)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:750)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with mage.util.CardUtil.deepCopyList and mage.abilities.TriggeredAbilities, following the stack into GameState.copy and GameImpl.bookmarkState during priority handling. Reproduce the server game error if possible and trace the concurrent modification in the state-copy path. Done means the reported exception no longer occurs while saving game state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100