forge icon indicating copy to clipboard operation
forge copied to clipboard

Multiple Bugs that make Forge MTG unplayable atm.

Open Nymra opened this issue 1 year ago • 7 comments

I play EDH games against three AI.

A summary of issues:

  1. Commander tax BUG sometimes commander tax explodes out of nowhere, making my commander gost ridiculous amounts of mana for casting, even when it has been casted only once this game. Could not find a pattern for this bug, but it seems it is related to even clicking on the commander in the command zone to check the cost, but not only that.

  2. Game Freezes on occasional situations Game just freezes in "waiting for opponent". happens on multiple occasions. the only occasion that I noticed happened repeatedly is when one AI is losing, but there are more cases for this

  3. "Undo" and "Cancel" bugs often when I use Undo and or cancel, a multitude of stuff can happen like:

  • command tax explosion (see 1)
  • one or more AIs drop out of the game (like if they conceded. all their cards disappear)
  • I drop out of the game (rare)

Nymra avatar Jun 26 '24 15:06 Nymra

"sometimes commander tax explodes out of nowhere"

Disable the Experimental Snapshot feature

Hanmac avatar Jun 26 '24 15:06 Hanmac

"sometimes commander tax explodes out of nowhere"

Disable the Experimental Snapshot feature

thank you, will try that!

Nymra avatar Jun 26 '24 15:06 Nymra

"sometimes commander tax explodes out of nowhere"

Disable the Experimental Snapshot feature

Do you mean "EXPERIMENTAL Undo restore" in Game Settings / Preferences? Because that I have already unchecked [ ] from the beginning, so the above still happens with this disabled.

Nymra avatar Jun 26 '24 16:06 Nymra

I just tried reproducing this "Commander tax bug" with Undo restore enabled and wasn't able to do so. Any other specifics?

tehdiplomat avatar Jul 02 '24 18:07 tehdiplomat

I just tried reproducing this "Commander tax bug" with Undo restore enabled and wasn't able to do so. Any other specifics?

sadly no :( I could not successfuly reproduce this myself. Just noticed it happen randomly in my games along the noted series of other bugs. It was the least common of these bugs tho, the game freezing is much more likely.

The only time that I could see it happen when I saw it spiked to 17W already and then every time I clicked on the commander and then cancelled it got 2 more cost.

Nymra avatar Jul 02 '24 18:07 Nymra

I just tried reproducing this "Commander tax bug" with Undo restore enabled and wasn't able to do so. Any other specifics?

I have some additional ideas:

  • I play partner commanders alot. in the last commander games with partner this bug happened every time
  • I "think" it happens when I do not have the mana to afford the commander and press cancel then.

In general I noticed that the game freeze seems to happen more often when I cannot afford the spell when I press "cancel". Had not time to try and reproduce the exact circumstances, tho, sorry.

Nymra avatar Jul 08 '24 14:07 Nymra

UPDATE:

I played lots of games with partner commanders now and in every game this happens:

  • I try to cast one of my partner commanders by clicking on the card in the command zone
  • I cannot afford the mana cost
  • the command tax goes up even without casting the commander (every time, sometimes even up to like 250 colorless mana after some clicks)
  • OR the game freezes

bascially I can only savely click on one of my commanders when I know I can afford casting them.

NOTE: this still also happened in games with single commanders IIRC, but rarely.

Nymra avatar Jul 08 '24 22:07 Nymra

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 Aug 08 '24 09:08 github-actions[bot]

Update:

I am now playing with the latest available Snapshot just downloaded today.

The game still freezes when I press "cancel" when I try to cast a spell that I cannot afford mana wise. LOG attached.

Last action I took was trying to cast my second Partner commander from the command zone, was not cast before. I dont have the mana for it but "cancel" button is not working and the game frozen in this state. This happened very often before.

forge.log

Nymra avatar Aug 08 '24 15:08 Nymra

@tehdiplomat does this help you find the NullPointerException?

Restoring game state with timestamp of :181
Game-0 > java.lang.NullPointerException
	at forge.game.GameSnapshot.copyGameState(GameSnapshot.java:372)
	at forge.game.GameSnapshot.assignGameState(GameSnapshot.java:79)
	at forge.game.GameSnapshot.restoreGameState(GameSnapshot.java:61)
	at forge.game.Game.restoreGameState(Game.java:198)
	at forge.game.GameActionUtil.rollbackAbility(GameActionUtil.java:873)
	at forge.player.HumanPlaySpellAbility.playAbility(HumanPlaySpellAbility.java:190)
	at forge.player.HumanPlay.playSpellAbility(HumanPlay.java:106)
	at forge.player.PlayerControllerHuman.playChosenSpellAbility(PlayerControllerHuman.java:1509)
	at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:1053)
	at forge.game.GameAction.startGame(GameAction.java:2151)
	at forge.game.Match.startGame(Match.java:90)
	at forge.gamemodes.match.HostedMatch.lambda$startGame$1(HostedMatch.java:270)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

this is the line, i mean if it is linked, how can some of the objects be null? https://github.com/Card-Forge/forge/blob/508c0641eebae3513897e363896aa541188714bc/forge-game/src/main/java/forge/game/GameSnapshot.java#L371-L373

Hanmac avatar Aug 08 '24 15:08 Hanmac

here is the log from the other bug where the game just randomly freezes on "Waiting for an opponent..."

forge.log

Nymra avatar Aug 08 '24 20:08 Nymra

@tehdiplomat for this, looks like the Commander is null?

Game-0 > java.lang.NullPointerException
	at forge.game.player.PlayerView.updateCommanderCast(PlayerView.java:399)
	at forge.game.player.Player.incCommanderCast(Player.java:2810)
	at forge.game.GameSnapshot.assignGameState(GameSnapshot.java:93)
	at forge.game.GameSnapshot.makeCopy(GameSnapshot.java:52)
	at forge.game.GameSnapshot.makeCopy(GameSnapshot.java:38)
	at forge.game.Game.stashGameState(Game.java:188)
	at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:1029)
	at forge.game.GameAction.startGame(GameAction.java:2151)
	at forge.game.Match.startGame(Match.java:90)
	at forge.gamemodes.match.HostedMatch.lambda$startGame$1(HostedMatch.java:270)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Hanmac avatar Aug 08 '24 21:08 Hanmac

had the bug where the AI froze the game again. Log attached.

(4P EDH Game with 3 AI, last AI frozen on Endstep in their last turn, would have won the next turn if this helps. It somehow seems to happen more often in such scenarios lately instead of just mid game. Also seems to happen more oftne with the Angels are better whatever (All White) Precon Deck

forge.log

Nymra avatar Aug 12 '24 20:08 Nymra

@Nymra I would recommend disabling the experimental feature so you don't run into these problems.

tehdiplomat avatar Aug 12 '24 22:08 tehdiplomat

@Nymra I would recommend disabling the experimental feature so you don't run into these problems.

In the past I had the issue with the feature enabled and disabled. while of course there could be different reasons for the freeze then.

Nymra avatar Aug 12 '24 22:08 Nymra

That's been fixed. https://github.com/Card-Forge/forge/pull/5682

tehdiplomat avatar Aug 12 '24 22:08 tehdiplomat

Ok, so I have a fix for the bad references https://github.com/Card-Forge/forge/pull/5921 which was one of the crash logs above. (Where two paired cards aren't de-referenced properly). The other two crashlogs are the same, it's when melding two creatures, assumably when one of them is your commander.

@Nymra is that whats going on in your game? Are you (or an opponent) melding your commander?

tehdiplomat avatar Aug 13 '24 16:08 tehdiplomat

Ok, so I have a fix for the bad references #5921 which was one of the crash logs above. (Where two paired cards aren't de-referenced properly). The other two crashlogs are the same, it's when melding two creatures, assumably when one of them is your commander.

@Nymra is that whats going on in your game? Are you (or an opponent) melding your commander?

ah, that would explain the issue happens more often when I play against the Angel Precon where Bruna and Gisela are played and yes, they merge them. Note: the merge seems to work at times tho, meaning the game often proceeds with the merged Brisela creature. (had such a game just now, sadly the log is already overwritten it seems.

Question: how are the logs stored? in skyrim the older logs just are renamed, but with forge it seems the old logs just stay there and the forge.log is always overwritten?

Nymra avatar Aug 13 '24 16:08 Nymra