#Cannot invoke "Object.getClass()" because "o" is null when casting Valiant Changeling

10 messages · Page 1 of 1 (latest)

broken estuary
#

Attempted to cast Valiant Changeling, changed my mind and hit cancel but the buttons became unresponsive. I can't cancel or continue casting. Dev Mode options to roll back the phase or generate mana or win game or exile the offending card from my hand or anything else won't return control/priority. Looks like the game is toast (and of course I didn't save lol)

Restoring game state with timestamp of :55 Game-19 > java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "o" is null at forge.game.GameSnapshot.assignGameState(GameSnapshot.java:116) at forge.game.GameSnapshot.restoreGameState(GameSnapshot.java:65) at forge.game.Game.restoreGameState(Game.java:202) at forge.game.GameActionUtil.rollbackAbility(GameActionUtil.java:937) at forge.player.HumanPlaySpellAbility.playAbility(HumanPlaySpellAbility.java:179) at forge.player.HumanPlay.playSpellAbility(HumanPlay.java:92) at forge.player.PlayerControllerHuman.playChosenSpellAbility(PlayerControllerHuman.java:1591) at forge.game.phase.PhaseHandler.mainLoopStep(PhaseHandler.java:1083) at forge.game.phase.PhaseHandler.mainGameLoop(PhaseHandler.java:1039) at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:1033) at forge.game.GameAction.startGame(GameAction.java:2380) at forge.game.Match.startGame(Match.java:92) at forge.gamemodes.match.HostedMatch.lambda$startGame$2(HostedMatch.java:278) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614) at java.base/java.lang.Thread.run(Thread.java:1474)

broken estuary
#

I kinda feel like, as a Dev tool, "Win Game" shouldn't require the player to have priority (at least not when playing against AI).
Or at least there should be a Dev tool to clear the stack. And maybe stack/actions or even game state history should be included when saving a game state.

In my case right now, saving / loading the game state doesn't clear the stuck action nor anything on the stack. Adding things to the stack with Dev tools doesn't change anything and setting the opponent's life to 0 doesn't end the game. I think all of these things should be cleared or editable when saving/loading a game state, otherwise loading a saved game state carries over too much information from whatever the previous state was and that kinda defeats the purpose of saving/loading a game state.

wraith frigate
#

That's why we call that preference experimental

#

[[Valiant changeling]]

signal remnantBOT
wraith frigate
#

Did you get a screenshot?

broken estuary
#

I considered getting a screenshot but I'm not sure it would have helped and by the time I'd decided it was probably agood idea anyway I'd already messed up the game state more by trying to use dev tools to see if I could fix it.
It was just stuck there with the prompt to pay the casting cost for the Valiant Changeling. I couldn't pay, couldn't cancel, the buttons would click but not respond to anything.
I don't think it's a bug in the card itself, and I played it in a later match (after restarting the game) with no issue. Haven't tried cancelling casting Valiant Changeling yet. My guess is that the "cancel" button relies on the engine saving the game's state when you start casting a spell, and that state didn't save this time for whatever reason (hence o = null on assignGameState).
(Also not sure what preference you refer to as experimental? You mean heaving the dev options enabled?)

coral coyote
broken estuary
#

Ooooh, I did turn that on in Forge-GUI-Desktop, did not know if it extended to Adventure (Forge-GUI-Mobile). That would definitely be a potential cause.
(I just assumed it was unrelated to "Undo" because there's no "Undo" option I can find in Adventure mode and in particular this happened when cancelling so cancellation of a spell seemed like an appropriate place for the game to attempt to save a state anyway.)

wraith frigate
#

Do you know if you had any thing in play that had to track a game object?