It is currently 02 Nov 2025, 23:31
   
Text Size

Bug Reports (snapshot builds)

Post MTG Forge Related Programming Questions Here

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

Re: Bug Reports (snapshot builds)

Postby Yamazaki » 06 Dec 2013, 19:10

Description: I played in quest mode againdt Selesnya 2012. Ai attacked me with his cards. then window with crash report appears.

ConcurrentModificationException | Open
Code: Select all
Forge Version:    1.5.6-r${forge.revision}${forge.specialStatus} (mixed revisions detected; please update from the root directory)
Operating System: Windows 7 6.1 x86
Java Version:     1.7.0_45 Oracle Corporation

java.util.ConcurrentModificationException
   at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
   at java.util.ArrayList$Itr.next(Unknown Source)
   at com.google.common.collect.AbstractMapBasedMultimap$Itr.next(AbstractMapBasedMultimap.java:1150)
   at forge.game.combat.Combat.getAttackers(Combat.java:197)
   at forge.gui.match.TargetingOverlay.assembleArcs(TargetingOverlay.java:243)
   at forge.gui.match.TargetingOverlay.access$300(TargetingOverlay.java:52)
   at forge.gui.match.TargetingOverlay$OverlayPanel.paintComponent(TargetingOverlay.java:350)
   at javax.swing.JComponent.paint(Unknown Source)
   at javax.swing.JComponent.paintChildren(Unknown Source)
   at javax.swing.JComponent.paint(Unknown Source)
   at javax.swing.JLayeredPane.paint(Unknown Source)
   at javax.swing.JComponent.paintChildren(Unknown Source)
   at javax.swing.JComponent.paint(Unknown Source)
   at javax.swing.JLayeredPane.paint(Unknown Source)
   at javax.swing.JComponent.paintChildren(Unknown Source)
   at javax.swing.JComponent.paint(Unknown Source)
   at javax.swing.JComponent.paintToOffscreen(Unknown Source)
   at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
   at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
   at javax.swing.RepaintManager.paint(Unknown Source)
   at javax.swing.JComponent._paintImmediately(Unknown Source)
   at javax.swing.JComponent.paintImmediately(Unknown Source)
   at javax.swing.RepaintManager$3.run(Unknown Source)
   at javax.swing.RepaintManager$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
   at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
   at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
   at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
   at javax.swing.RepaintManager.access$1100(Unknown Source)
   at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
   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)
Yamazaki
 
Posts: 2
Joined: 06 Dec 2013, 19:07
Has thanked: 0 time
Been thanked: 0 time

Re: Bug Reports (snapshot builds)

Postby swordshine » 07 Dec 2013, 15:25

r23904
Description: When I cast Pithing Needle, the game crashed.
NullPointerException | Open
Code: Select all
java.lang.NullPointerException
   at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:192)
   at com.google.common.collect.Iterables.filter(Iterables.java:582)
   at forge.game.player.PlayerControllerHuman.chooseSinglePaperCard(PlayerControllerHuman.java:875)
   at forge.game.ability.effects.ChooseCardNameEffect.resolve(ChooseCardNameEffect.java:108)
   at forge.game.spellability.AbilitySub.resolve(AbilitySub.java:130)
   at forge.game.ability.AbilityUtils.resolveApiAbility(AbilityUtils.java:1112)
   at forge.game.ability.AbilityUtils.resolve(AbilityUtils.java:1094)
   at forge.game.spellability.HumanPlaySpellAbility.playAbility(HumanPlaySpellAbility.java:79)
   at forge.game.player.HumanPlay.playSpellAbilityNoStack(HumanPlay.java:244)
   at forge.game.player.PlayerControllerHuman.playSpellAbilityNoStack(PlayerControllerHuman.java:169)
   at forge.game.replacement.ReplacementHandler.executeReplacement(ReplacementHandler.java:251)
   at forge.game.replacement.ReplacementHandler.run(ReplacementHandler.java:158)
   at forge.game.replacement.ReplacementHandler.run(ReplacementHandler.java:78)
   at forge.game.GameAction.changeZone(GameAction.java:197)
   at forge.game.GameAction.moveTo(GameAction.java:410)
   at forge.game.GameAction.moveTo(GameAction.java:389)
   at forge.game.GameAction.moveToPlay(GameAction.java:541)
   at forge.game.GameAction.moveTo(GameAction.java:676)
   at forge.game.GameAction.moveTo(GameAction.java:655)
   at forge.game.spellability.SpellPermanent.resolve(SpellPermanent.java:371)
   at forge.game.zone.MagicStack.resolveStack(MagicStack.java:600)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:1021)
   at forge.game.GameAction.startGame(GameAction.java:1485)
   at forge.game.Match$1.run(Match.java:118)
   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)
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Bug Reports (snapshot builds)

Postby aacid » 07 Dec 2013, 16:38

Hi,

when I play Condescend to counter opponents spell, it resolves, I pay more mana than he can pay, then I Scry 2 but finally opponents spell is NOT countered.
aacid
 
Posts: 1
Joined: 07 Dec 2013, 16:35
Has thanked: 0 time
Been thanked: 0 time

Re: Bug Reports (snapshot builds)

Postby drdev » 07 Dec 2013, 16:49

aacid wrote:Hi,

when I play Condescend to counter opponents spell, it resolves, I pay more mana than he can pay, then I Scry 2 but finally opponents spell is NOT countered.
What version of Forge are you running? This sounds like an issue I recently fixed that would be available in the latest snapshot or if you update your source.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Bug Reports (snapshot builds)

Postby Max mtg » 07 Dec 2013, 23:13

swordshine wrote:r23904
Description: When I cast Pithing Needle, the game crashed.
fixed with 23917
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Bug Reports (snapshot builds)

Postby Yamazaki » 09 Dec 2013, 09:03

Description: In Constructed mode I chose my deck, then Random 1 for AI, and that reveals
RuntimeException | Open
Code: Select all
Forge Version:    1.5.6-r${forge.revision}${forge.specialStatus} (mixed revisions detected; please update from the root directory)
Operating System: Windows 7 6.1 x86
Java Version:     1.7.0_45 Oracle Corporation

java.lang.RuntimeException: Generate2ColorDeck : get2ColorDeck -- looped too much -- Cr12
   at forge.deck.generation.DeckGeneratorBase.addSome(DeckGeneratorBase.java:118)
   at forge.deck.generation.DeckGeneratorBase.addCmcAdjusted(DeckGeneratorBase.java:233)
   at forge.deck.generation.DeckGeneratorBase.addCreaturesAndSpells(DeckGeneratorBase.java:98)
   at forge.deck.generation.DeckGeneratorMonoColor.getDeck(DeckGeneratorMonoColor.java:83)
   at forge.gui.deckchooser.DeckgenUtil.buildColorDeck(DeckgenUtil.java:80)
   at forge.gui.deckchooser.FDeckChooser.getDeck(FDeckChooser.java:242)
   at forge.gui.deckchooser.FDeckChooser.getPlayer(FDeckChooser.java:268)
   at forge.gui.home.sanctioned.CSubmenuConstructed.startGame(CSubmenuConstructed.java:121)
   at forge.gui.home.sanctioned.CSubmenuConstructed.access$100(CSubmenuConstructed.java:33)
   at forge.gui.home.sanctioned.CSubmenuConstructed$2.actionPerformed(CSubmenuConstructed.java:90)
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
   at java.awt.Component.processMouseEvent(Unknown Source)
   at javax.swing.JComponent.processMouseEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(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.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue$4.run(Unknown Source)
   at java.awt.EventQueue$4.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)
Yamazaki
 
Posts: 2
Joined: 06 Dec 2013, 19:07
Has thanked: 0 time
Been thanked: 0 time

Re: Bug Reports (snapshot builds)

Postby oskarolw » 10 Dec 2013, 09:18

r23933

Description: Trying to cast undercity informer, I had payed the 2 colorless mana already but only had a green left in pool, I pressed space which I assume is the auto button and then got this crash.

IllegalStateException | Open
Code: Select all
Forge Version:    SVN
Operating System: Windows 7 6.1 x86
Java Version:     1.7.0_45 Oracle Corporation

java.lang.IllegalStateException: forge.game.GameAction.moveTo may not be accessed from the event dispatch thread.
   at forge.FThreads.assertExecutedByEdt(FThreads.java:29)
   at forge.game.GameAction.moveTo(GameAction.java:394)
   at forge.game.GameAction.moveTo(GameAction.java:390)
   at forge.game.GameAction.moveToGraveyard(GameAction.java:511)
   at forge.game.GameAction.sacrificeDestroy(GameAction.java:1375)
   at forge.game.GameAction.sacrifice(GameAction.java:1218)
   at forge.game.cost.CostSacrifice.doPayment(CostSacrifice.java:178)
   at forge.game.cost.CostPartWithList.executePayment(CostPartWithList.java:96)
   at forge.game.cost.CostPartWithList.executePayment(CostPartWithList.java:108)
   at forge.game.cost.CostPartWithList.payAI(CostPartWithList.java:125)
   at forge.game.cost.CostPayment.payComputerCosts(CostPayment.java:190)
   at forge.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:212)
   at forge.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:58)
   at forge.gui.input.InputPayMana$2.run(InputPayMana.java:294)
   at forge.game.player.Player.runWithController(Player.java:2955)
   at forge.gui.input.InputPayMana.runAsAi(InputPayMana.java:283)
   at forge.gui.input.InputPayMana.onOk(InputPayMana.java:297)
   at forge.gui.input.InputBase.selectButtonOK(InputBase.java:70)
   at forge.gui.InputProxy.selectButtonOK(InputProxy.java:83)
   at forge.gui.match.controllers.CPrompt$2.actionPerformed(CPrompt.java:61)
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.plaf.basic.BasicButtonListener$Actions.actionPerformed(Unknown Source)
   at javax.swing.SwingUtilities.notifyAction(Unknown Source)
   at javax.swing.JComponent.processKeyBinding(Unknown Source)
   at javax.swing.JComponent.processKeyBindings(Unknown Source)
   at javax.swing.JComponent.processKeyEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(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.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue$4.run(Unknown Source)
   at java.awt.EventQueue$4.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)
oskarolw
 
Posts: 39
Joined: 06 Jul 2012, 08:51
Has thanked: 0 time
Been thanked: 2 times

Re: Bug Reports (snapshot builds)

Postby Max mtg » 10 Dec 2013, 19:02

oskarolw wrote:r23933
Description: Trying to cast undercity informer, I had payed the 2 colorless mana already but only had a green left in pool, I pressed space which I assume is the auto button and then got this crash.
Quite expected, because any actions changing game state are not supposed to be executed from UI thread.
I suggest that auto-payment feature removed.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Bug Reports (snapshot builds)

Postby drdev » 11 Dec 2013, 00:23

Max that's a bit of an overreaction. The Auto button works fine in most cases. I just need to investigate why it isn't in this one case.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Bug Reports (snapshot builds)

Postby swordshine » 12 Dec 2013, 05:05

Varolz, the Scar-Striped is broken. StaticAbilityContinuous.java line 419 should be updated.
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Bug Reports (snapshot builds)

Postby drdev » 12 Dec 2013, 11:55

Max mtg wrote:
oskarolw wrote:r23933
Description: Trying to cast undercity informer, I had payed the 2 colorless mana already but only had a green left in pool, I pressed space which I assume is the auto button and then got this crash.
Quite expected, because any actions changing game state are not supposed to be executed from UI thread.
I suggest that auto-payment feature removed.
I fixed this issue by having the Auto button run its logic in the Game thread using ThreadUtil.invokeInGameThreadAndWait, a new function I added. Is that solution acceptable?
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Bug Reports (snapshot builds)

Postby Max mtg » 12 Dec 2013, 12:31

drdev wrote:I fixed this issue by having the Auto button run its logic in the Game thread using ThreadUtil.invokeInGameThreadAndWait, a new function I added. Is that solution acceptable?
Nope, you are locking GUI thread while you wait for Game thread to perform actions. If during that calculations game needs any input from human player (which is unlikely but still possible while our hardcoded calls to GUi aren't eliminated), you'll end up in a deadlock.

use game.getAction().invoke(runnable) instead. (in the same fashion as activateManaAbility handles mana ability activation, where runnable )
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Bug Reports (snapshot builds)

Postby drdev » 12 Dec 2013, 12:57

Max mtg wrote:
drdev wrote:I fixed this issue by having the Auto button run its logic in the Game thread using ThreadUtil.invokeInGameThreadAndWait, a new function I added. Is that solution acceptable?
Nope, you are locking GUI thread while you wait for Game thread to perform actions. If during that calculations game needs any input from human player (which is unlikely but still possible while our hardcoded calls to GUi aren't eliminated), you'll end up in a deadlock.

use game.getAction().invoke(runnable) instead. (in the same fashion as activateManaAbility handles mana ability activation, where runnable )
Alright, how's this:

Code: Select all
//must run in game thread as certain payment actions can only be automated there
game.getAction().invoke(new Runnable() {
   @Override
   public void run() {
      runAsAi(proc);
      //call showMessage in GUI thread after mana cost paid
      FThreads.invokeInEdtLater(new Runnable() {
         @Override
         public void run() {
            InputPayMana.this.showMessage();
         }
      });
   }
});
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Bug Reports (snapshot builds)

Postby Max mtg » 12 Dec 2013, 13:12

drdev wrote:
Max mtg wrote:
drdev wrote:I fixed this issue by having the Auto button run its logic in the Game thread using ThreadUtil.invokeInGameThreadAndWait, a new function I added. Is that solution acceptable?
Nope, you are locking GUI thread while you wait for Game thread to perform actions. If during that calculations game needs any input from human player (which is unlikely but still possible while our hardcoded calls to GUi aren't eliminated), you'll end up in a deadlock.

use game.getAction().invoke(runnable) instead. (in the same fashion as activateManaAbility handles mana ability activation, where runnable )
Alright, how's this:
That's fine.
And if you want to dismiss the input right after mana was paid, try to call onStateChanged()
Code: Select all
//must run in game thread as certain payment actions can only be automated there
game.getAction().invoke(new Runnable() {
   @Override
   public void run() {
      runAsAi(proc);
      onStateChanged()
   }
});
Add: ah, showMessage calls this onStateChanged anyway, so no big difference.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Bug Reports (snapshot builds)

Postby drdev » 13 Dec 2013, 01:00

Max mtg wrote:That's fine.
And if you want to dismiss the input right after mana was paid, try to call onStateChanged()
Code: Select all
//must run in game thread as certain payment actions can only be automated there
game.getAction().invoke(new Runnable() {
   @Override
   public void run() {
      runAsAi(proc);
      onStateChanged()
   }
});
Add: ah, showMessage calls this onStateChanged anyway, so no big difference.
Calling onStateChanged is cleaner, so I changed it to do that. Thanks.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 56 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 56 users online :: 0 registered, 0 hidden and 56 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 56 guests

Login Form