Page 19 of 32

Re: Developing Bugs

PostPosted: 23 May 2013, 05:55
by Max mtg
AI played Yamivaya Ants, they were gaining age counters each upkeep, after they obtained 3 counters, they got buried

Re: Developing Bugs

PostPosted: 23 May 2013, 07:27
by Sloth
Max mtg wrote:AI played Yamivaya Ants, they were gaining age counters each upkeep, after they obtained 3 counters, they got buried
That is to be expected with Cumulative Upkeep. Where's the bug?

Re: Developing Bugs

PostPosted: 23 May 2013, 08:42
by Max mtg
Sloth wrote:That is to be expected with Cumulative Upkeep. Where's the bug?
Looks like I've mixed up these age counters with time ones. :( As if a card without suspend started to get counters designed for suspended cards.

Not a bug.

Re: Developing Bugs

PostPosted: 23 May 2013, 16:40
by Sloth
RedDeckWins wrote:This is my first attempt a significant change to the rules engine. Someone please look at it. The patch is to make the "cast for free" portion of suspend happen via a trigger. This will fix a bug with a few cards such as Fungal Behemoth, as well as make the trigger stiflable like it should be.

https://dl.dropboxusercontent.com/u/129 ... gers.patch
You forgot to convert cards that gain suspend from effects: Epochrasite and Delay.

Re: Developing Bugs

PostPosted: 23 May 2013, 16:49
by Sloth
There are a few bugs related to hitting enter very fast:
1. This error pops up a lot (but doesn't do anything bad):
| Open
java.lang.RuntimeException: Trying to unlock input which is not locked! Do check when your threads terminate!
at forge.control.input.InputQueue.unlock(InputQueue.java:203)
at forge.control.input.InputQueue$1.run(InputQueue.java:223)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


2. When i control a card with an "At the beginning of your upkeep," trigger (for example Agent of Masks) it sometimes triggers twice in one upkeep. The opponents suspended card even triggered four times during one upkeep.

Re: Developing Bugs

PostPosted: 23 May 2013, 21:33
by moomarc
Sloth wrote:2. When i control a card with an "At the beginning of your upkeep," trigger (for example Agent of Masks) it sometimes triggers twice in one upkeep. The opponents suspended card even triggered four times during one upkeep.
Is it possible that this one has something to do with my additions in PhaseHandler for Paradox Haze? I wasn't sure if it needed to freeze/unfreeze the stack so left it and it seemed to work.

Re: Developing Bugs

PostPosted: 23 May 2013, 22:10
by RedDeckWins
Sloth wrote:
RedDeckWins wrote:This is my first attempt a significant change to the rules engine. Someone please look at it. The patch is to make the "cast for free" portion of suspend happen via a trigger. This will fix a bug with a few cards such as Fungal Behemoth, as well as make the trigger stiflable like it should be.

https://dl.dropboxusercontent.com/u/129 ... gers.patch
You forgot to convert cards that gain suspend from effects: Epochrasite and Delay.
K, I'll fix that up. Good catch.

Re: Developing Bugs

PostPosted: 23 May 2013, 23:43
by RedDeckWins
While fixing this up I encountered another issue I am a little unsure of how to deal with. Why does CardFactoryUtil remove Intrinsic Keywords for a lot of the abilities (champion, suspend, cycling, etc)? Right now this is affecting the engines ability to detect withoutSuspend (for example, for Delay). I believe this flaw has always existed for suspend and was not introduced by me.

Re: Developing Bugs

PostPosted: 24 May 2013, 09:48
by Max mtg
Sloth wrote:There are a few bugs related to hitting enter very fast:
I've just managed to skip my upkeep by repeatedly pressing Enter.

Would have to pay echo cost if the game worked correctly.

I'll take a look at this family of problems.

Re: Developing Bugs

PostPosted: 24 May 2013, 15:22
by swordshine
Description: This exception comes out quite frequently when I start an AI vs. AI game

RuntimeException | Open
Code: Select all
Forge Version:    SVN
Operating System: Windows XP 5.1 x86
Java Version:     1.7.0_17 Oracle Corporation

java.lang.RuntimeException: ComputerUtil : payManaCost() cost was not paid for Nightmare. Didn't find what to pay for 1
   at forge.game.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:178)
   at forge.game.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:55)
   at forge.card.cost.CostPartMana.payAI(CostPartMana.java:160)
   at forge.card.cost.CostPayment.payComputerCosts(CostPayment.java:190)
   at forge.game.ai.ComputerUtil.handlePlayingSpellAbility(ComputerUtil.java:119)
   at forge.game.ai.AiController.playSpellAbilities(AiController.java:899)
   at forge.game.ai.AiController.onPriorityRecieved(AiController.java:847)
   at forge.game.ai.AiInputCommon$1.run(AiInputCommon.java:73)
   at forge.control.input.InputQueue$1.run(InputQueue.java:222)
   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:722)

Re: Developing Bugs

PostPosted: 25 May 2013, 18:45
by Max mtg
Sloth wrote:There are a few bugs related to hitting enter very fast:
1. This error pops up a lot (but doesn't do anything bad):
| Open
java.lang.RuntimeException: Trying to unlock input which is not locked! Do check when your threads terminate!
at forge.control.input.InputQueue.unlock(InputQueue.java:203)
at forge.control.input.InputQueue$1.run(InputQueue.java:223)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


2. When i control a card with an "At the beginning of your upkeep," trigger (for example Agent of Masks) it sometimes triggers twice in one upkeep. The opponents suspended card even triggered four times during one upkeep.
Try to reproduce any of these now. (r21673+)

Re: Developing Bugs

PostPosted: 25 May 2013, 19:37
by Sloth
This one does still happen (r21673):
| Open
java.lang.RuntimeException: Trying to unlock input which is not locked! Do check when your threads terminate!
at forge.control.input.InputQueue.unlock(InputQueue.java:203)
at forge.control.input.InputQueue$1.run(InputQueue.java:223)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
)

Re: Developing Bugs

PostPosted: 25 May 2013, 20:20
by Max mtg
Try with 21678 or newer.
It could have been passPriority that had locked UI.

Re: Developing Bugs

PostPosted: 25 May 2013, 21:47
by Sloth
Max mtg wrote:Try with 21678 or newer.
It could have been passPriority that had locked UI.
I played some games with r21679 and did not get the "input locked" error. Thanks Max.

But i had this error duo pop up again (had them a few days ago too). They did freeze the game.

ArrayIndexOutOfBoundsException | Open
Code: Select all
Forge Version:    SVN
Operating System: Windows 7 6.1 amd64
Java Version:     1.6.0_38 Sun Microsystems Inc.

java.lang.ArrayIndexOutOfBoundsException: -1
   at java.util.ArrayList.add(Unknown Source)
   at forge.Card.addSpellAbility(Card.java:2515)
   at forge.game.GameActionUtil.grantBasicLandsManaAbilities(GameActionUtil.java:697)
   at forge.game.GameAction.checkStaticAbilities(GameAction.java:897)
   at forge.game.GameAction.checkStateEffects(GameAction.java:930)
   at forge.card.mana.ManaPool.add(ManaPool.java:89)
   at forge.card.spellability.AbilityManaPart.produceMana(AbilityManaPart.java:125)
   at forge.card.ability.effects.ManaEffect.resolve(ManaEffect.java:169)
   at forge.card.ability.AbilityApiBased.resolve(AbilityApiBased.java:62)
   at forge.card.ability.AbilityUtils.resolveApiAbility(AbilityUtils.java:1057)
   at forge.card.ability.AbilityUtils.resolve(AbilityUtils.java:1034)
   at forge.game.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:164)
   at forge.game.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:55)
   at forge.card.cost.CostPartMana.payAI(CostPartMana.java:160)
   at forge.card.cost.CostPayment.payComputerCosts(CostPayment.java:190)
   at forge.game.ai.ComputerUtil.handlePlayingSpellAbility(ComputerUtil.java:119)
   at forge.game.ai.AiController.playSpellAbilities(AiController.java:899)
   at forge.game.ai.AiController.onPriorityRecieved(AiController.java:847)
   at forge.game.ai.AiInputCommon$1.run(AiInputCommon.java:73)
   at forge.control.input.InputQueue$1.run(InputQueue.java:222)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

ArrayIndexOutOfBoundsException | Open
Code: Select all
Forge Version:    SVN
Operating System: Windows 7 6.1 amd64
Java Version:     1.6.0_38 Sun Microsystems Inc.

java.lang.ArrayIndexOutOfBoundsException: -1
   at java.util.ArrayList.fastRemove(Unknown Source)
   at java.util.ArrayList.remove(Unknown Source)
   at forge.Card.removeSpellAbility(Card.java:2534)
   at forge.game.GameActionUtil.grantBasicLandsManaAbilities(GameActionUtil.java:684)
   at forge.game.GameAction.checkStaticAbilities(GameAction.java:897)
   at forge.game.GameAction.checkStateEffects(GameAction.java:930)
   at forge.card.mana.ManaPool.add(ManaPool.java:89)
   at forge.card.spellability.AbilityManaPart.produceMana(AbilityManaPart.java:125)
   at forge.card.ability.effects.ManaEffect.resolve(ManaEffect.java:169)
   at forge.card.ability.AbilityApiBased.resolve(AbilityApiBased.java:62)
   at forge.card.ability.AbilityUtils.resolveApiAbility(AbilityUtils.java:1057)
   at forge.card.ability.AbilityUtils.resolve(AbilityUtils.java:1034)
   at forge.game.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:164)
   at forge.game.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:55)
   at forge.card.cost.CostPartMana.payAI(CostPartMana.java:160)
   at forge.card.cost.CostPayment.payComputerCosts(CostPayment.java:190)
   at forge.game.ai.ComputerUtil.handlePlayingSpellAbility(ComputerUtil.java:119)
   at forge.game.ai.AiController.playSpellAbilities(AiController.java:899)
   at forge.game.ai.AiController.onPriorityRecieved(AiController.java:847)
   at forge.game.ai.AiInputCommon$1.run(AiInputCommon.java:73)
   at forge.control.input.InputQueue$1.run(InputQueue.java:222)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)



Later i had this error (which caused no problem):

NullPointerException | Open
Code: Select all
Forge Version:    SVN
Operating System: Windows 7 6.1 amd64
Java Version:     1.6.0_38 Sun Microsystems Inc.

java.lang.NullPointerException
   at forge.control.input.InputBase.stop(InputBase.java:65)
   at forge.control.input.InputSelectManyBase.onOk(InputSelectManyBase.java:84)
   at forge.control.input.InputSyncronizedBase.selectButtonOK(InputSyncronizedBase.java:46)
   at forge.gui.InputProxy.selectButtonOK(InputProxy.java:96)
   at forge.gui.match.controllers.CMessage$2.actionPerformed(CMessage.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.AbstractButton.doClick(Unknown Source)
   at javax.swing.AbstractButton.doClick(Unknown Source)
   at forge.gui.toolbox.FButton$1.keyPressed(FButton.java:87)
   at java.awt.Component.processKeyEvent(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$400(Unknown Source)
   at java.awt.EventQueue$2.run(Unknown Source)
   at java.awt.EventQueue$2.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
   at java.security.AccessControlContext$1.doIntersectionPrivilege(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.AccessControlContext$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: Developing Bugs

PostPosted: 25 May 2013, 22:06
by Max mtg
the first couple is bit out of scope of my current work. ATM I have no idea how to fix them.

The last one belongs to the code that I have already changed locally - it won't happen again after my next commit (there might be a different one though ;) )