It is currently 17 May 2025, 15:36
   
Text Size

Bug Reports (snapshot builds)

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Bug Reports (snapshot builds)

Postby Agetian » 05 Sep 2014, 05:41

r27216: Here's an easy-to-reproduce and serious bug that can lock up the game completely: if, in your Main phase, you click a spell card [with at least some mana cost, i.e. non-land] in your hand (to start casting a spell) and then accidentally hit E ("end turn") when you're prompted to pay mana, the game will first show "Cannot pass priority at this time" and will then get permanently locked up in the "Waiting for opponent..." state. Nothing helps except quitting Forge (or at least restarting the match by agreeing to concede).

- Agetian
Agetian
Programmer
 
Posts: 3486
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby drdev » 05 Sep 2014, 13:47

Agetian wrote:r27216: Here's an easy-to-reproduce and serious bug that can lock up the game completely: if, in your Main phase, you click a spell card [with at least some mana cost, i.e. non-land] in your hand (to start casting a spell) and then accidentally hit E ("end turn") when you're prompted to pay mana, the game will first show "Cannot pass priority at this time" and will then get permanently locked up in the "Waiting for opponent..." state. Nothing helps except quitting Forge (or at least restarting the match by agreeing to concede).

- Agetian
Fixed in r27218.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 05 Sep 2014, 21:54

Did something change with optional Triggered Abilities that cost mana? Previously with these abilities we would just provide the mana cost with the "option" to hit cancel to cancel out. Since paying mana is always optional, this streamlines the need for me to say "Yes" to the option, before tapping my lands. This seems to slow me a fair amount, especially when I have a payment trigger every turn (from say a Pyre Zombie in my graveyard). What's the deal with this change? Anyone know?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Bug Reports (snapshot builds)

Postby KrazyTheFox » 08 Sep 2014, 03:28

Drana, Kalastria Bloodchief correctly reduces its target's toughness, but does not gain any power.
User avatar
KrazyTheFox
Programmer
 
Posts: 725
Joined: 18 Mar 2014, 23:51
Has thanked: 66 times
Been thanked: 226 times

Re: Bug Reports (snapshot builds)

Postby Thesaguy » 08 Sep 2014, 15:18

I got this bug report:

Description: [describe what you were doing when the crash occurred]

ConcurrentModificationException | Open
Code: Select all
Forge Version:    1.5.25-r27161Mu (mixed revisions detected; please update from the root directory)
Operating System: Windows 7 6.1 x86
Java Version:     1.7.0_67 Oracle Corporation

java.util.ConcurrentModificationException
   at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
   at java.util.ArrayList$Itr.next(Unknown Source)
   at forge.game.card.Card.getHiddenExtrinsicKeyword(Card.java:4811)
   at forge.game.card.Card.getKeyword(Card.java:4424)
   at forge.game.card.Card.getAmountOfKeyword(Card.java:5381)
   at forge.game.card.Card.getNetAttack(Card.java:4120)
   at forge.screens.match.controllers.CCombat.combatantToString(CCombat.java:139)
   at forge.screens.match.controllers.CCombat.getCombatDescription(CCombat.java:106)
   at forge.screens.match.controllers.CCombat.update(CCombat.java:49)
   at forge.screens.match.CMatchUI.showCombat(CMatchUI.java:305)
   at forge.GuiDesktop.showCombat(GuiDesktop.java:383)
   at forge.control.FControlGameEventHandler$2.run(FControlGameEventHandler.java:63)
   at java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.awt.EventQueue.access$200(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
Thesaguy
 
Posts: 31
Joined: 07 Oct 2010, 19:37
Has thanked: 3 times
Been thanked: 8 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 08 Sep 2014, 18:09

r27258: When there are two or more planeswalkers on the opponent's field and I cast a direct damage spell, I get a prompt if I want to redirect the said damage to each of the planeswalkers (in a sequence). However, if I say "yes", the interface allows me to directly click the exact planeswalker that I want to redirect the damage to, so prompting for each planeswalker beforehand seems superfluous (and somewhat irritating) in the context of being able to just visually target after clicking "yes". Perhaps there should be one prompt just saying "Would you like to redirect damage to a planeswalker"?..

- Agetian
Agetian
Programmer
 
Posts: 3486
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 09 Sep 2014, 02:02

It seems like copied tokens either aren't getting their ManaCost set properly, or the LKI isn't tracking it appropriately. I had this situation come up in a Momir Basic game this afternoon which prevented me from getting an Emrakul. :(

In Play: Soldevi Adnate, Ebony Rhino (a copied token, I can repro this via Rite of Replication on an Ebony Rhino in play since using Momir to repro is unlikely).

Tapping the Adnate and sacrifice the Copied Rhino, expecting to get 7 Black mana. Instead I get 0.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Bug Reports (snapshot builds)

Postby KrazyTheFox » 09 Sep 2014, 02:24

friarsol wrote:It seems like copied tokens either aren't getting their ManaCost set properly, or the LKI isn't tracking it appropriately. I had this situation come up in a Momir Basic game this afternoon which prevented me from getting an Emrakul. :(

In Play: Soldevi Adnate, Ebony Rhino (a copied token, I can repro this via Rite of Replication on an Ebony Rhino in play since using Momir to repro is unlikely).

Tapping the Adnate and sacrifice the Copied Rhino, expecting to get 7 Black mana. Instead I get 0.
The good news is I think I found your bug. On line 632 of forge.game.card.CardFactory:
Code: Select all
// TODO - most tokens mana cost is 0, this needs to be fixed
// c.setManaCost(manaCost);
c.addColor(manaCost);
c.setToken(true);
I looked through the history briefly and found this TODO is well over a year old. It looks as though this should be a relatively simple fix, but I'm going to bed in just a minute and don't have the time to test anything if I were to fix it now.
User avatar
KrazyTheFox
Programmer
 
Posts: 725
Joined: 18 Mar 2014, 23:51
Has thanked: 66 times
Been thanked: 226 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 09 Sep 2014, 02:35

KrazyTheFox wrote:
The good news is I think I found your bug. On line 632 of forge.game.card.CardFactory:
Code: Select all
// TODO - most tokens mana cost is 0, this needs to be fixed
// c.setManaCost(manaCost);
c.addColor(manaCost);
c.setToken(true);
I looked through the history briefly and found this TODO is well over a year old. It looks as though this should be a relatively simple fix, but I'm going to bed in just a minute and don't have the time to test anything if I were to fix it now.
AH that's silly. I figured it was an LKI thing. I'll uncomment and commit if it seems to fix it.

Edit: Ah no.. This isn't going through the Token effect, it's going through the CopyPermanent effect. I think this is more likely a token/LKI issue.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Bug Reports (snapshot builds)

Postby KrazyTheFox » 09 Sep 2014, 03:12

friarsol wrote:Edit: Ah no.. This isn't going through the Token effect, it's going through the CopyPermanent effect. I think this is more likely a token/LKI issue.
Did a little more debugging and you're right in that I was looking in the wrong place. However, it does appear that the copied token has the mana cost correctly set (though I can't be sure since I'm so unfamiliar with this code). Hopefully that narrows it down a bit.
User avatar
KrazyTheFox
Programmer
 
Posts: 725
Joined: 18 Mar 2014, 23:51
Has thanked: 66 times
Been thanked: 226 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 11 Sep 2014, 09:14

r27279: This NPE appeared every time after an AI vs. AI duel was over in a quest draft tournament (did not stop me from proceeding further, was just irritating):

NullPointerException | Open
Code: Select all
Forge Version:    1.5.26-SNAPSHOT-r27279u
Operating System: Linux 3.8.0-26-generic amd64
Java Version:     1.7.0_51 Oracle Corporation

java.lang.NullPointerException
   at forge.control.FControlGameEventHandler$6$1.run(FControlGameEventHandler.java:147)
   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)
I attempted to fix this in r27288, please check.

- Agetian
Agetian
Programmer
 
Posts: 3486
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby Fizanko » 13 Sep 2014, 22:53

Just noticed in latest snapshot, some boosters have strange text, by example a M15 and Dragon Maze :
ImageImage

Noticed Dragon Maze "fat pack" has it too
probably outdated by now so you should avoid : Innistrad world for Forge (updated 17/11/2014)
Duel Decks for Forge - Forge custom decks (updated 25/10/2014)
User avatar
Fizanko
Tester
 
Posts: 780
Joined: 07 Feb 2014, 11:24
Has thanked: 155 times
Been thanked: 94 times

Re: Bug Reports (snapshot builds)

Postby Fizanko » 13 Sep 2014, 23:21

Image

I played Llanowar Elite and selected the kicker version, and as soon as i selected the kicker version, this error appeared :

NullPointerException | Open
Code: Select all
Forge Version:    1.5.28-SNAPSHOT-r27348
Operating System: Windows XP 5.1 x86
Java Version:     1.7.0_10 Oracle Corporation

java.lang.NullPointerException
   at forge.game.spellability.SpellAbilityRestriction.checkZoneRestrictions(SpellAbilityRestriction.java:200)
   at forge.game.spellability.AbilityActivated.isPossible(AbilityActivated.java:126)
   at forge.ai.ComputerUtilMana$ManaProducingCard.<init>(ComputerUtilMana.java:115)
   at forge.ai.ComputerUtilMana.sortManaAbilities(ComputerUtilMana.java:139)
   at forge.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:357)
   at forge.ai.ComputerUtilMana.canPayManaCost(ComputerUtilMana.java:46)
   at forge.match.input.InputPayMana$4.evaluate(InputPayMana.java:388)
   at forge.match.input.InputPayMana$4.evaluate(InputPayMana.java:385)
   at forge.util.Evaluator.run(Evaluator.java:8)
   at forge.game.player.Player.runWithController(Player.java:3087)
   at forge.match.input.InputPayMana.runAsAi(InputPayMana.java:346)
   at forge.match.input.InputPayMana.updateMessage(InputPayMana.java:391)
   at forge.match.input.InputPayMana$5.run(InputPayMana.java:418)
   at forge.FThreads.invokeInEdtNowOrLater(FThreads.java:33)
   at forge.match.input.InputPayMana.onStateChanged(InputPayMana.java:415)
   at forge.match.input.InputPayMana.showMessage(InputPayMana.java:406)
   at forge.match.input.InputBase.showMessageInitial(InputBase.java:99)
   at forge.match.input.InputProxy$2.run(InputProxy.java:92)
   at java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.awt.EventQueue.access$200(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
I clicked on the cancel button, tried to replay it with Kicker and same error.
In previous duels the card played correctly when kicked, so i think it may be something else on the battlefield (see screenshot) that may have triggered this.

edit : now that i think about it, it may be possible i didn't had enough mana to pay the 8 for the kicking.
Elvish Mystic had Presence of Gond attached
Penumbra Bobcat had Bladed Pinions attached
probably outdated by now so you should avoid : Innistrad world for Forge (updated 17/11/2014)
Duel Decks for Forge - Forge custom decks (updated 25/10/2014)
User avatar
Fizanko
Tester
 
Posts: 780
Joined: 07 Feb 2014, 11:24
Has thanked: 155 times
Been thanked: 94 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 13 Sep 2014, 23:49

Fizanko wrote:Just noticed in latest snapshot, some boosters have strange text, by example a M15 and Dragon Maze :
Noticed Dragon Maze "fat pack" has it too
Yea I guess we don't really have a description field for Boosters. This field is just being filled by the booster definition. Certain boosters like (as you noticed) M15 and Dragon's Maze are oddly structured. For M15 for example, there's a whole bunch of cards that are technically in the set, but don't actually show up in boosters. Similarly, DGM has a specific land slot and all lands in the set show up in that slot instead of their normal rarity slot.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Bug Reports (snapshot builds)

Postby KrazyTheFox » 14 Sep 2014, 01:47

Fizanko wrote:Image

I played Llanowar Elite and selected the kicker version, and as soon as i selected the kicker version, this error appeared :

NullPointerException | Open
Code: Select all
Forge Version:    1.5.28-SNAPSHOT-r27348
Operating System: Windows XP 5.1 x86
Java Version:     1.7.0_10 Oracle Corporation

java.lang.NullPointerException
   at forge.game.spellability.SpellAbilityRestriction.checkZoneRestrictions(SpellAbilityRestriction.java:200)
   at forge.game.spellability.AbilityActivated.isPossible(AbilityActivated.java:126)
   at forge.ai.ComputerUtilMana$ManaProducingCard.<init>(ComputerUtilMana.java:115)
   at forge.ai.ComputerUtilMana.sortManaAbilities(ComputerUtilMana.java:139)
   at forge.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:357)
   at forge.ai.ComputerUtilMana.canPayManaCost(ComputerUtilMana.java:46)
   at forge.match.input.InputPayMana$4.evaluate(InputPayMana.java:388)
   at forge.match.input.InputPayMana$4.evaluate(InputPayMana.java:385)
   at forge.util.Evaluator.run(Evaluator.java:8)
   at forge.game.player.Player.runWithController(Player.java:3087)
   at forge.match.input.InputPayMana.runAsAi(InputPayMana.java:346)
   at forge.match.input.InputPayMana.updateMessage(InputPayMana.java:391)
   at forge.match.input.InputPayMana$5.run(InputPayMana.java:418)
   at forge.FThreads.invokeInEdtNowOrLater(FThreads.java:33)
   at forge.match.input.InputPayMana.onStateChanged(InputPayMana.java:415)
   at forge.match.input.InputPayMana.showMessage(InputPayMana.java:406)
   at forge.match.input.InputBase.showMessageInitial(InputBase.java:99)
   at forge.match.input.InputProxy$2.run(InputProxy.java:92)
   at java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.awt.EventQueue.access$200(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
I clicked on the cancel button, tried to replay it with Kicker and same error.
In previous duels the card played correctly when kicked, so i think it may be something else on the battlefield (see screenshot) that may have triggered this.

edit : now that i think about it, it may be possible i didn't had enough mana to pay the 8 for the kicking.
Elvish Mystic had Presence of Gond attached
Penumbra Bobcat had Bladed Pinions attached
This appears to be caused by auras being attached (and equipment?) to permanents with mana abilities. It would appear that's true for the Elvish Mystic in your post. The following setup will always cause the game to crash with the same error:
Untitled-1.jpg


NPE | Open
Game-0 > java.lang.NullPointerException
at forge.game.spellability.SpellAbilityRestriction.checkZoneRestrictions(SpellAbilityRestriction.java:200)
at forge.game.spellability.AbilityActivated.isPossible(AbilityActivated.java:126)
at forge.ai.ComputerUtilMana$ManaProducingCard.<init>(ComputerUtilMana.java:115)
at forge.ai.ComputerUtilMana.sortManaAbilities(ComputerUtilMana.java:139)
at forge.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:357)
at forge.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:50)
at forge.ai.PlayerControllerAi.payManaCost(PlayerControllerAi.java:798)
at forge.game.player.PlayerController.payManaCost(PlayerController.java:274)
at forge.game.cost.CostPartMana.payAsDecided(CostPartMana.java:133)
at forge.game.cost.CostPayment.payComputerCosts(CostPayment.java:176)
at forge.ai.ComputerUtil.handlePlayingSpellAbility(ComputerUtil.java:104)
at forge.ai.PlayerControllerAi.playChosenSpellAbility(PlayerControllerAi.java:425)
at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:1020)
at forge.game.GameAction.startGame(GameAction.java:1559)
at forge.game.Match.startGame(Match.java:81)
at forge.control.FControl$4.run(FControl.java:450)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
User avatar
KrazyTheFox
Programmer
 
Posts: 725
Joined: 18 Mar 2014, 23:51
Has thanked: 66 times
Been thanked: 226 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 39 guests


Who is online

In total there are 39 users online :: 0 registered, 0 hidden and 39 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 39 guests

Login Form