Page 172 of 487

Re: Bug Reports (snapshot builds)

PostPosted: 06 Dec 2013, 19:10
by Yamazaki
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)

Re: Bug Reports (snapshot builds)

PostPosted: 07 Dec 2013, 15:25
by swordshine
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)

Re: Bug Reports (snapshot builds)

PostPosted: 07 Dec 2013, 16:38
by aacid
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.

Re: Bug Reports (snapshot builds)

PostPosted: 07 Dec 2013, 16:49
by drdev
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.

Re: Bug Reports (snapshot builds)

PostPosted: 07 Dec 2013, 23:13
by Max mtg
swordshine wrote:r23904
Description: When I cast Pithing Needle, the game crashed.
fixed with 23917

Re: Bug Reports (snapshot builds)

PostPosted: 09 Dec 2013, 09:03
by Yamazaki
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)

Re: Bug Reports (snapshot builds)

PostPosted: 10 Dec 2013, 09:18
by oskarolw
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)

Re: Bug Reports (snapshot builds)

PostPosted: 10 Dec 2013, 19:02
by Max mtg
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.

Re: Bug Reports (snapshot builds)

PostPosted: 11 Dec 2013, 00:23
by drdev
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.

Re: Bug Reports (snapshot builds)

PostPosted: 12 Dec 2013, 05:05
by swordshine
Varolz, the Scar-Striped is broken. StaticAbilityContinuous.java line 419 should be updated.

Re: Bug Reports (snapshot builds)

PostPosted: 12 Dec 2013, 11:55
by drdev
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?

Re: Bug Reports (snapshot builds)

PostPosted: 12 Dec 2013, 12:31
by Max mtg
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 )

Re: Bug Reports (snapshot builds)

PostPosted: 12 Dec 2013, 12:57
by drdev
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();
         }
      });
   }
});

Re: Bug Reports (snapshot builds)

PostPosted: 12 Dec 2013, 13:12
by Max mtg
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.

Re: Bug Reports (snapshot builds)

PostPosted: 13 Dec 2013, 01:00
by drdev
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.