forge icon indicating copy to clipboard operation
forge copied to clipboard

java.lang.NullPointerException

Open TheLastNarwhal opened this issue 2 years ago • 4 comments

Describe the bug Ran into this issue, don't really know why it happened or what exactly triggered it, but I'll try to describe the events as best I can.

I have Prosper on the field, alongside Passionate Archaeologist and Hedron Detonator. I cast Praetor's Grasp targeting Opponent , exiling Liquimetal Torque from their library. I then cast the Liquimetal Torque. Several triggers go on the stack and it looks like this:

  1. Prosper treasure ability
  2. Prosper damage ability (from Passionate Archaeologist) targeting Opponent 1
  3. Liquimetal Torque

The treasure ability resolves, which then triggers Hedron Detonator. I target Opponent 2 who only has a single life. The ability resolves and then the npe occurs.

Game-0 > java.lang.NullPointerException: Cannot invoke "forge.game.spellability.SpellAbilityStackInstance.setActivatingPlayer(forge.game.player.Player)" because "si" is null at forge.game.Game.onPlayerLost(Game.java:846) at forge.game.GameAction.checkGameOverCondition(GameAction.java:1732) at forge.game.GameAction.checkStateEffects(GameAction.java:1255) at forge.game.phase.PhaseHandler.checkStateBasedEffects(PhaseHandler.java:1157) at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:1047) at forge.game.GameAction.startGame(GameAction.java:2114) at forge.game.Match.startGame(Match.java:90) at forge.gamemodes.match.HostedMatch$2.run(HostedMatch.java:255) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840)

Desktop (please complete the following information):

  • OS: Kubuntu 22.04
  • Version: forge-gui-desktop-1.6.60-SNAPSHOT-12-14

TheLastNarwhal avatar Dec 17 '23 05:12 TheLastNarwhal

This usually happens because some AI misplay happened during the game But something gets left behind in that case, so the stack needs better cleanup after

tool4ever avatar Dec 20 '23 20:12 tool4ever

This issue has not been updated in a while and has now been marked as stale. Stale messages will be auto closed.

github-actions[bot] avatar Jan 20 '24 09:01 github-actions[bot]