It is currently 21 May 2025, 23:24
   
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 Max mtg » 07 Jul 2013, 22:59

friarsol wrote:r22480
Draws don't seem to resolve properly, and don't error.

I thought I noticed another issue in the code where Game Draws weren't ignored during the games played to see if a match is over, but with this issue, I can't actually test that out.
r22486 - added game loop exit for when check for SBA leads to game loss (rules 704.5a-c)
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 Bundy » 08 Jul 2013, 09:23

Forge 1.4.3 - SNAPSHOT-r22476

I enchant Palaside Giant with Indestructibility. A few turns later i cast Terminus. Indestructibility stays on the battlefield still enchanting the giant on the bottom of my library.
Just to see what would happen i put the giant back into my hand with the dev panel. When i played it again Indestructibility was attached to it.
Last edited by Bundy on 08 Jul 2013, 15:41, edited 1 time in total.
Bundy
 
Posts: 348
Joined: 17 Dec 2010, 17:32
Location: The netherlands
Has thanked: 23 times
Been thanked: 3 times

Re: Bug Reports (snapshot builds)

Postby jsv » 08 Jul 2013, 10:30

r22489. When a creature with "can block any number of creatures" (Guardian of the Gateless, Avatar of Hope) blocks, you are prompted to select damage allocation order as many times as there are attackers. Then you are asked to allocate damage as many times.

And this still happens from time to time when winning a quest match (after pressing the "Great!" button):
UncheckedExecutionException | Open
Code: Select all
Forge Version:    1.4.3-SNAPSHOT-r22489
Operating System: Windows 7 6.1 amd64
Java Version:     1.7.0_25 Oracle Corporation

com.google.common.util.concurrent.UncheckedExecutionException: java.awt.color.CMMException: Invalid image format
   at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2263)
   at com.google.common.cache.LocalCache.get(LocalCache.java:4000)
   at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4004)
   at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4874)
   at forge.ImageCache.getImage(ImageCache.java:203)
   at forge.ImageCache.scaleImage(ImageCache.java:153)
   at forge.ImageCache.getIcon(ImageCache.java:131)
   at forge.gui.home.quest.PnlEvent.<init>(PnlEvent.java:53)
   at forge.gui.home.quest.CSubmenuDuels.update(CSubmenuDuels.java:119)
   at forge.gui.match.QuestWinLose.actionOnQuit(QuestWinLose.java:292)
   at forge.gui.match.ControlWinLose$3.actionPerformed(ControlWinLose.java:63)
   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.AWTEventMulticaster.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)
Caused by: java.awt.color.CMMException: Invalid image format
   at sun.java2d.cmm.kcms.CMM.checkStatus(Unknown Source)
   at sun.java2d.cmm.kcms.CMM.createTransform(Unknown Source)
   at java.awt.image.ColorConvertOp.filter(Unknown Source)
   at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(Unknown Source)
   at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native Method)
   at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(Unknown Source)
   at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(Unknown Source)
   at javax.imageio.ImageIO.read(Unknown Source)
   at javax.imageio.ImageIO.read(Unknown Source)
   at forge.ImageLoader._findFile(ImageLoader.java:88)
   at forge.ImageLoader.load(ImageLoader.java:52)
   at forge.ImageLoader.load(ImageLoader.java:16)
   at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3599)
   at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2379)
   at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2342)
   at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2257)
   ... 47 more
jsv
 
Posts: 53
Joined: 29 May 2013, 03:20
Has thanked: 3 times
Been thanked: 6 times

Re: Bug Reports (snapshot builds)

Postby swordshine » 08 Jul 2013, 14:51

Effects in the command zone don't disappear at the end of turn. I've tested Zameck Guildmage.
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Bug Reports (snapshot builds)

Postby Max mtg » 08 Jul 2013, 18:46

Ai plays Tormentor Exarch with no other creatures on board on its side:
NullPointerException | Open
Code: Select all
Forge Version:    SVN
Operating System: Windows 7 6.1 amd64
Java Version:     1.7.0_21 Oracle Corporation

java.lang.NullPointerException
   at forge.card.ability.effects.CharmEffect.chainAbilities(CharmEffect.java:97)
   at forge.card.ability.effects.CharmEffect.makeChoices(CharmEffect.java:88)
   at forge.card.trigger.TriggerHandler.runSingleTrigger(TriggerHandler.java:381)
   at forge.card.trigger.TriggerHandler.runNonStaticTriggersForPlayer(TriggerHandler.java:262)
   at forge.card.trigger.TriggerHandler.runWaitingTrigger(TriggerHandler.java:227)
   at forge.card.trigger.TriggerHandler.runWaitingTriggers(TriggerHandler.java:182)
   at forge.game.zone.MagicStack.unfreezeStack(MagicStack.java:212)
   at forge.game.zone.MagicStack.finishResolving(MagicStack.java:591)
   at forge.game.zone.MagicStack.resolveStack(MagicStack.java:532)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:912)
   at forge.game.GameAction.startGame(GameAction.java:1533)
   at forge.game.Match$1.run(Match.java:102)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Looks like CharmAi.chooseOptionsAi has returned null

Repro: give AI enough mana, add Tormentor Exarch to its hand.
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 xbon » 08 Jul 2013, 20:51

Description: Opponent attacked with 3 creatures, would've finished the game.

NullPointerException | Open
Code: Select all
Forge Version:    r22508
Operating System: Windows 8 6.2 x86
Java Version:     1.7.0_25 Oracle Corporation

java.lang.NullPointerException
   at forge.card.ability.effects.DiscardEffect.resolve(DiscardEffect.java:99)
   at forge.card.ability.AbilityApiBased.resolve(AbilityApiBased.java:62)
   at forge.card.ability.AbilityUtils.resolveApiAbility(AbilityUtils.java:1049)
   at forge.card.ability.AbilityUtils.resolve(AbilityUtils.java:1031)
   at forge.game.ai.ComputerUtil.playNoStack(ComputerUtil.java:309)
   at forge.card.trigger.WrappedAbility.resolve(WrappedAbility.java:363)
   at forge.card.ability.AbilityUtils.resolveApiAbility(AbilityUtils.java:1049)
   at forge.card.ability.AbilityUtils.resolve(AbilityUtils.java:1031)
   at forge.game.zone.MagicStack.resolveStack(MagicStack.java:526)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:912)
   at forge.game.GameAction.startGame(GameAction.java:1533)
   at forge.game.Match$1.run(Match.java:109)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
xbon
 
Posts: 124
Joined: 04 Jun 2013, 22:52
Has thanked: 18 times
Been thanked: 2 times

Re: Bug Reports (snapshot builds)

Postby Sloth » 08 Jul 2013, 20:53

Bundy wrote:Forge 1.4.3 - SNAPSHOT-r22476

I enchant Palaside Giant with Indestructibility. A few turns later i cast Terminus. Indestructibility stays on the battlefield still enchanting the giant on the bottom of my library.
Just to see what would happen i put the giant back into my hand with the dev panel. When i played it again Indestructibility was attached to it.
Fixed! Thanks Bundy.

swordshine wrote:I cast Cloudshift on a token, that token can come back from the Exile zone.
swordshine wrote:Effects in the command zone don't disappear at the end of turn. I've tested Zameck Guildmage.
Fixed! Thanks swordshine.

Max mtg wrote:Ai plays Tormentor Exarch with no other creatures on board on its side:
NullPointerException | Open
Code: Select all
Forge Version:    SVN
Operating System: Windows 7 6.1 amd64
Java Version:     1.7.0_21 Oracle Corporation

java.lang.NullPointerException
   at forge.card.ability.effects.CharmEffect.chainAbilities(CharmEffect.java:97)
   at forge.card.ability.effects.CharmEffect.makeChoices(CharmEffect.java:88)
   at forge.card.trigger.TriggerHandler.runSingleTrigger(TriggerHandler.java:381)
   at forge.card.trigger.TriggerHandler.runNonStaticTriggersForPlayer(TriggerHandler.java:262)
   at forge.card.trigger.TriggerHandler.runWaitingTrigger(TriggerHandler.java:227)
   at forge.card.trigger.TriggerHandler.runWaitingTriggers(TriggerHandler.java:182)
   at forge.game.zone.MagicStack.unfreezeStack(MagicStack.java:212)
   at forge.game.zone.MagicStack.finishResolving(MagicStack.java:591)
   at forge.game.zone.MagicStack.resolveStack(MagicStack.java:532)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:912)
   at forge.game.GameAction.startGame(GameAction.java:1533)
   at forge.game.Match$1.run(Match.java:102)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Looks like CharmAi.chooseOptionsAi has returned null

Repro: give AI enough mana, add Tormentor Exarch to its hand.
Fixed! Thanks Max.

xbon wrote:Description: Opponent attacked with 3 creatures, would've finished the game.
There must have been a trigger causing a discard. What was it?
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Bug Reports (snapshot builds)

Postby swordshine » 09 Jul 2013, 00:24

r22510 "moveToLibrary now redirects to changeZone." I think Personal Tutor, Lim-Dul's Vault (ChangeZone | Origin$ Library | Destination$ Library) are broken again.
Here's my fix.
Code: Select all
### Eclipse Workspace Patch 1.0
#P trunk
Index: src/main/java/forge/game/GameAction.java
===================================================================
--- src/main/java/forge/game/GameAction.java   (revision 22514)
+++ src/main/java/forge/game/GameAction.java   (working copy)
@@ -211,10 +211,6 @@
         if (suppress) {
             game.getTriggerHandler().suppressMode(TriggerType.ChangesZone);
         }
-       
-        // "enter the battlefield as a copy" - apply code here
-        // but how to query for input here and continue later while the callers assume synchronous result?
-        zoneTo.add(copied, position);
 
         if (zoneFrom != null) {
             if (fromBattlefield && c.isCreature() && game.getCombat() != null) {
@@ -223,9 +219,16 @@
                 game.getCombat().removeFromCombat(c);
                 
             }
+            if (zoneFrom.is(ZoneType.Library) && zoneFrom == zoneTo && position.equals(zoneFrom.size()) && position != 0) {
+                position--;
+            }
             zoneFrom.remove(c);
         }
-       
+
+        // "enter the battlefield as a copy" - apply code here
+        // but how to query for input here and continue later while the callers assume synchronous result?
+        zoneTo.add(copied, position);
+
         // Need to apply any static effects to produce correct triggers
         checkStaticAbilities();
         

When searching a card in the library and put it on the top, the previous code will add the card on the top first and then remove it. Please review.
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Bug Reports (snapshot builds)

Postby xbon » 09 Jul 2013, 02:16

xbon wrote:Description: Opponent attacked with 3 creatures, would've finished the game.
There must have been a trigger causing a discard. What was it?[/quote]


Sorry; I'll read through the error next time so I can know what to look for, I accidently hit the exit instead of close so i couldn't provide specifics.
xbon
 
Posts: 124
Joined: 04 Jun 2013, 22:52
Has thanked: 18 times
Been thanked: 2 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 09 Jul 2013, 03:45

r22515
Are some triggers broken for anyone else? When I cast Inner-Flame Acolyte without Evoke, I target the Acolyte as it etbs but then as the trigger finishes resolving, it asks me to target again (for the same ETB ability?). This trigger never is able to leave the stack and makes the game unable to be finished.

This was working yesterday around 22488
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 swordshine » 09 Jul 2013, 04:55

friarsol wrote:r22515
Are some triggers broken for anyone else? When I cast Inner-Flame Acolyte without Evoke, I target the Acolyte as it etbs but then as the trigger finishes resolving, it asks me to target again (for the same ETB ability?). This trigger never is able to leave the stack and makes the game unable to be finished.

This was working yesterday around 22488
I think this is caused by r22513 deleting "HumanPlay.playSpellAbilityNoStack(getActivatingPlayer(), sa, true);". The default in PlayerControllerHuman is "HumanPlay.playSpellAbilityNoStack(getActivatingPlayer(), sa, false);".
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Bug Reports (snapshot builds)

Postby jsv » 09 Jul 2013, 05:32

swordshine wrote:I think this is caused by r22513 deleting "HumanPlay.playSpellAbilityNoStack(getActivatingPlayer(), sa, true);". The default in PlayerControllerHuman is "HumanPlay.playSpellAbilityNoStack(getActivatingPlayer(), sa, false);".
My conclusion as well (even if I'm a bit slow at coming to it :) ).
jsv
 
Posts: 53
Joined: 29 May 2013, 03:20
Has thanked: 3 times
Been thanked: 6 times

Re: Bug Reports (snapshot builds)

Postby Max mtg » 09 Jul 2013, 05:59

jsv wrote:
swordshine wrote:I think this is caused by r22513 deleting "HumanPlay.playSpellAbilityNoStack(getActivatingPlayer(), sa, true);". The default in PlayerControllerHuman is "HumanPlay.playSpellAbilityNoStack(getActivatingPlayer(), sa, false);".
My conclusion as well (even if I'm a bit slow at coming to it :) ).
Yes, that's my mistake.

Please see if 22518 fixes the problem.

I have added doTrigger(true, aiPlayer) to a method from PlayerControllerAI class. The returned result is not checked.
I expect tihs way AI will be able to set up ability targets when this is allowed.

As for HumanPlayer implementation, that's quite simple: the parameter is passed directly to method in HumanPlaySpellAbility
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 Sloth » 09 Jul 2013, 06:29

swordshine wrote:r22510 "moveToLibrary now redirects to changeZone." I think Personal Tutor, Lim-Dul's Vault (ChangeZone | Origin$ Library | Destination$ Library) are broken again.
Here's my fix.
Code: Select all
### Eclipse Workspace Patch 1.0
#P trunk
Index: src/main/java/forge/game/GameAction.java
===================================================================
--- src/main/java/forge/game/GameAction.java   (revision 22514)
+++ src/main/java/forge/game/GameAction.java   (working copy)
@@ -211,10 +211,6 @@
         if (suppress) {
             game.getTriggerHandler().suppressMode(TriggerType.ChangesZone);
         }
-       
-        // "enter the battlefield as a copy" - apply code here
-        // but how to query for input here and continue later while the callers assume synchronous result?
-        zoneTo.add(copied, position);
 
         if (zoneFrom != null) {
             if (fromBattlefield && c.isCreature() && game.getCombat() != null) {
@@ -223,9 +219,16 @@
                 game.getCombat().removeFromCombat(c);
                 
             }
+            if (zoneFrom.is(ZoneType.Library) && zoneFrom == zoneTo && position.equals(zoneFrom.size()) && position != 0) {
+                position--;
+            }
             zoneFrom.remove(c);
         }
-       
+
+        // "enter the battlefield as a copy" - apply code here
+        // but how to query for input here and continue later while the callers assume synchronous result?
+        zoneTo.add(copied, position);
+
         // Need to apply any static effects to produce correct triggers
         checkStaticAbilities();
         

When searching a card in the library and put it on the top, the previous code will add the card on the top first and then remove it. Please review.
Yes, that seems necessary. I didn't realize that changeZone had another order than moveToLibrary. Thanks swordshine.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Bug Reports (snapshot builds)

Postby Bundy » 09 Jul 2013, 21:53

Forge 1.4.3 - SNAPSHOT-r22500

I use Kiki-Jiki, Mirror Breaker to copy Meadowboon. When the token is sacrificed at the end of the turn, the ability of Meadowboon triggers twice.
When Meadowboon gets sacrificed for the evoke cost, when it dies or returns to my hand it only triggers once like it should.
Bundy
 
Posts: 348
Joined: 17 Dec 2010, 17:32
Location: The netherlands
Has thanked: 23 times
Been thanked: 3 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 20 guests


Who is online

In total there are 20 users online :: 0 registered, 0 hidden and 20 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 20 guests

Login Form