BUG - AI - Fatal Error: Combat Stall
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 940
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 160
Description
`FATAL 2025-06-05 09:40:34,164 GameWorker system error [cee160c4-93d2-4c8b-b89e-79d5f85ddc09 - Commander Free For All; T32.FCD; active: Computer 3; stack: 0]: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 =>[GAME cee160c4-93d2-4c8b-b89e-79d5f85ddc09] GameWorker.call
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at mage.game.combat.CombatGroup.attackerDamage(CombatGroup.java:483)
at mage.game.combat.CombatGroup.assignDamageToAttackers(CombatGroup.java:198)
at mage.game.turn.CombatDamageStep.beginStep(CombatDamageStep.java:60)
at mage.game.turn.Phase.prePriority(Phase.java:189)
at mage.game.turn.Phase.playStep(Phase.java:203)
at mage.game.turn.Phase.play(Phase.java:91)
at mage.game.turn.Turn.play(Turn.java:129)
at mage.game.GameImpl.playTurn(GameImpl.java:1157)
at mage.game.GameImpl.play(GameImpl.java:1064)
at mage.game.GameImpl.start(GameImpl.java:1040)
at mage.server.game.GameWorker.call(GameWorker.java:35)
at mage.server.game.GameWorker.call(GameWorker.java:16)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)`
[Image](https://puu.sh/KuP1b/be8be8f5e0.jpg)
Computer 3 swung with board and two [[Dragonhawk, Fate's Tempest]]
Rograkh blocked both with [[Dead-Iron Sledge]] and [[Vanguard's Shield]], destroying both Dragonhawks.
AI proceeded to detonate.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in mage/game/combat/CombatGroup.java at attackerDamage (line 483) and assignDamageToAttackers (line 198), then follow the CombatDamageStep call at mage/game/turn/CombatDamageStep.java:60. Reproduce the reported block involving two Dragonhawks and two equipment cards, and verify that the combat sequence completes without the IndexOutOfBoundsException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100