r30809: A hard crash (NPE) happens every time the AI tries to attack with
Tromokratis, it's impossible to continue playing after this NPE and the only way out is to restart Forge. Couldn't figure out a way to fix this (the attacking band appears to be null at the time it's queried, but I'm not sure how to best approach fixing this issue since I'm not very well-versed in combat code...).
- NullPointerException | Open
- Code: Select all
Forge Version: SVN
Operating System: Linux 3.8.0-26-generic amd64
Java Version: 1.7.0_51 Oracle Corporation
java.lang.NullPointerException
at forge.game.combat.CombatUtil.canAttackerBeBlockedWithAmount(CombatUtil.java:1017)
at forge.ai.AiAttackController.shouldAttack(AiAttackController.java:989)
at forge.ai.AiAttackController.declareAttackers(AiAttackController.java:818)
at forge.ai.AiController.declareAttackers(AiController.java:1228)
at forge.ai.PlayerControllerAi.declareAttackers(PlayerControllerAi.java:387)
at forge.game.phase.PhaseHandler.declareAttackersTurnBasedAction(PhaseHandler.java:474)
at forge.game.phase.PhaseHandler.onPhaseBegin(PhaseHandler.java:269)
at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:1000)
at forge.game.GameAction.startGame(GameAction.java:1479)
at forge.game.Match.startGame(Match.java:96)
at forge.match.HostedMatch$2.run(HostedMatch.java:220)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
EDIT: In r30810, I implemented a NPE prevention mechanism that at least makes the game stop hard-crashing in an unrecoverable way. However, the problem is not truly fixed, a better fix is necessary in that location. Please take a look if you think you know how to correct this.
- Agetian