It is currently 22 May 2025, 03:22
   
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 friarsol » 10 Jul 2013, 03:02

r22529

AI attacked with a 2/3 and a 3/3 Blind Creeper. I cast Righteous Blow targeting the Blind Creeper. It became a 2/2 because of it's ability, and then died. After combat, the AI cast Ghouldraiser returning the Blind Creeper to his hand, and then cast the Blind Creeper, which came into play tapped. So something is weird with LKI.

AI also had Vengeful Dead in play the whole time, which triggered when the Creeper died originally.
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 » 10 Jul 2013, 13:40

Description: Activated Serum Powder during Mulligan step

IllegalStateException | Open
Code: Select all

java.lang.IllegalStateException: forge.game.GameAction.moveTo may not be accessed from the event dispatch thread.
   at forge.FThreads.assertExecutedByEdt(FThreads.java:64)
   at forge.game.GameAction.moveTo(GameAction.java:378)
   at forge.game.GameAction.moveTo(GameAction.java:374)
   at forge.game.GameAction.exile(GameAction.java:661)
   at forge.gui.input.InputConfirmMulligan.onCardSelected(InputConfirmMulligan.java:116)
   at forge.gui.input.InputBase.selectCard(InputBase.java:71)
   at forge.gui.InputProxy.selectCard(InputProxy.java:122)
   at forge.gui.match.nonsingleton.CHand.cardclickAction(CHand.java:117)
   at forge.gui.match.nonsingleton.CHand.access$0(CHand.java:111)
   at forge.gui.match.nonsingleton.CHand$1.mousePressed(CHand.java:55)
   at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:280)
   at java.awt.Component.processMouseEvent(Component.java:6502)
   at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
   at java.awt.Component.processEvent(Component.java:6270)
   at java.awt.Container.processEvent(Container.java:2229)
   at java.awt.Component.dispatchEventImpl(Component.java:4861)
   at java.awt.Container.dispatchEventImpl(Container.java:2287)
   at java.awt.Component.dispatchEvent(Component.java:4687)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4489)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
   at java.awt.Container.dispatchEventImpl(Container.java:2273)
   at java.awt.Window.dispatchEventImpl(Window.java:2719)
   at java.awt.Component.dispatchEvent(Component.java:4687)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
   at java.awt.EventQueue.access$200(EventQueue.java:103)
   at java.awt.EventQueue$3.run(EventQueue.java:688)
   at java.awt.EventQueue$3.run(EventQueue.java:686)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
   at java.awt.EventQueue$4.run(EventQueue.java:702)
   at java.awt.EventQueue$4.run(EventQueue.java:700)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
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 » 11 Jul 2013, 06:27

swordshine wrote:Description: Activated Serum Powder during Mulligan step
Now exiles are performed from non-edt thread.
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 friarsol » 11 Jul 2013, 23:10

r22546

Tragic Slip (all Morbid?) is currently broken.

1. Cast two creatures with toughness of 2.
2. Cast Shock on the first one.
3. Cast Tragic Slip on the other.

Expected: 2nd Creature should die when it gets -13/-13.
Actual: 2nd Creature gets -1/-1 instead.

Edit: This repro does not work with tokens. Which means that the entered graveyard check for nontokens is broken. I'm guessing this is related to LKI changes, but I don't have anything to really back that up.

Edit2: This is the code I'm most suspicious of (in Zone.add()), but I don't know enough about what the changes were trying to achieve to know how to fix it.

Code: Select all
final Zone oldZone = game.getZoneOf(c);
// if any tokens come to battlefield, consider they are from stack. Plain "null" cannot be a key of EnumMap
final ZoneType zt = oldZone == null ? ZoneType.Stack : oldZone.getZoneType();
cardsAddedThisTurn.add(zt, c);
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 Max mtg » 12 Jul 2013, 02:42

The quoted code adds cards entering this zone from other zones to multimap keyed by old zone type. This multimap is used to find out 'cards that entered the battlefiled this turn'
There were 2 arrays previously, one filled with cards other one with zones.
Last edited by Max mtg on 12 Jul 2013, 02:47, edited 1 time in total.
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 friarsol » 12 Jul 2013, 02:46

Max mtg wrote:The quoted code adds cards entering this zone from other zones to multimap keyed by old zone type. This multimap is used to find out 'cards that entered the battlefiled this turn'
Well, "final Zone oldZone = game.getZoneOf(c);" is returning null when a card goes from battlefield to graveyard. So something in that changelist is broken.
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 Max mtg » 12 Jul 2013, 05:10

Then it's a question of "How a card could be added to zone without calling Zone.add(final Card c, final Integer index)?"
That method explicitly sets card's zone to 'this' - the one it is being added to
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 » 12 Jul 2013, 08:56

friarsol wrote:
Code: Select all
final Zone oldZone = game.getZoneOf(c);
// if any tokens come to battlefield, consider they are from stack. Plain "null" cannot be a key of EnumMap
final ZoneType zt = oldZone == null ? ZoneType.Stack : oldZone.getZoneType();
cardsAddedThisTurn.add(zt, c);
This code doesn't work anymore because the cards get removed from the old zone before being added to the new one (since r22519).

EDIT: Fixed.
Last edited by Sloth on 12 Jul 2013, 09:38, edited 1 time in total.
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 Max mtg » 12 Jul 2013, 09:01

game.getZoneOf(Card) redirects to Card.getZone() which reads a field from the Card class.
This field should not be updated except for when card is added to a zone.

So the code above should work.
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 Agetian » 12 Jul 2013, 10:11

Stack description for Devour in Shadow is wrong - instead of showing the parameters of its target it shows up as if it's targeting itself (it says e.g. "Destroy Devour in Shadow. Human loses 0 life." instead of saying "Destroy <such-and-such creature>. Human loses <that creature's toughness> life."

- 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 Bundy » 12 Jul 2013, 11:05

Forge 1.4.3 - SNAPSHOT-r22534

I see some post of cards changing zone above, so maybe already fixed?
Description: Using the ultimate ability of Karn Liberated. Game can't continue, so i don't know what cards are returning to play.

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

java.lang.NullPointerException
   at forge.game.GameAction.changeZone(GameAction.java:222)
   at forge.game.GameAction.moveTo(GameAction.java:395)
   at forge.game.GameAction.moveTo(GameAction.java:374)
   at forge.card.ability.effects.RestartGameEffect.resolve(RestartGameEffect.java:85)
   at forge.card.ability.AbilityApiBased.resolve(AbilityApiBased.java:62)
   at forge.card.ability.AbilityUtils.resolveApiAbility(AbilityUtils.java:1065)
   at forge.card.ability.AbilityUtils.resolve(AbilityUtils.java:1047)
   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:1489)
   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)
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 Sloth » 12 Jul 2013, 11:30

Bundy wrote:Forge 1.4.3 - SNAPSHOT-r22534

I see some post of cards changing zone above, so maybe already fixed?
Description: Using the ultimate ability of Karn Liberated. Game can't continue, so i don't know what cards are returning to play.

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

java.lang.NullPointerException
   at forge.game.GameAction.changeZone(GameAction.java:222)
   at forge.game.GameAction.moveTo(GameAction.java:395)
   at forge.game.GameAction.moveTo(GameAction.java:374)
   at forge.card.ability.effects.RestartGameEffect.resolve(RestartGameEffect.java:85)
   at forge.card.ability.AbilityApiBased.resolve(AbilityApiBased.java:62)
   at forge.card.ability.AbilityUtils.resolveApiAbility(AbilityUtils.java:1065)
   at forge.card.ability.AbilityUtils.resolve(AbilityUtils.java:1047)
   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:1489)
   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)
Fixed! Thanks Bundy.

Max mtg wrote:game.getZoneOf(Card) redirects to Card.getZone() which reads a field from the Card class.
This field should not be updated except for when card is added to a zone.

So the code above should work.
This didn't work because the card added was created like this: "copied = CardFactory.copyCard(c)" and copyCard didn't copy the currentZone variable.

So if you don't like my changes you can revert them and add copying of currentZone to copyCard.
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 friarsol » 12 Jul 2013, 12:21

Sloth wrote:
Max mtg wrote:game.getZoneOf(Card) redirects to Card.getZone() which reads a field from the Card class.
This field should not be updated except for when card is added to a zone.

So the code above should work.
This didn't work because the card added was created like this: "copied = CardFactory.copyCard(c)" and copyCard didn't copy the currentZone variable.

So if you don't like my changes you can revert them and add copying of currentZone to copyCard.
I tried that last night, and it didn't seem to work for me. YMMV.
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 Max mtg » 12 Jul 2013, 12:52

I cannot revert anything now. I have no keyboard :)

Maybe you could just add the currentZone to fields copied by copyCard ? :)
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 » 12 Jul 2013, 13:40

friarsol wrote:I tried that last night, and it didn't seem to work for me. YMMV.
r22554 - My mileage varied.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 14 guests


Who is online

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

Login Form