It is currently 23 May 2025, 23:34
   
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 » 04 Apr 2013, 03:48

Max mtg wrote:Stack descriptions should become correct with no extra efforts (if stack UI does fetch the text on redraw).

So if you haven't done anything yet, I'd write that code. But looks like you have - let's wait for your implementation then
Yep, I expected it not to need anything else on a redraw, but when I was debugging the other day, it seemed like somehow whatever SpellAbility was being referenced still had the old Target, even though the Target is clearly replaced on spell resolution.
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 » 04 Apr 2013, 05:22

20771 - introduces 'game age' to reflect lifecycle of GameState object { BEFORE_MULLIGAN, MULLIGAN, PLAY, GAMEOVER } (the name of state is already taken, so I called it age)
see if that helps to deal with the recent trace from previous page (exceptions after 1st game in a match)
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 » 04 Apr 2013, 06:24

friarsol wrote:
Max mtg wrote:Stack descriptions should become correct with no extra efforts (if stack UI does fetch the text on redraw).
Yep, I expected it not to need anything else on a redraw, but when I was debugging the other day, it seemed like somehow whatever SpellAbility was being referenced still had the old Target, even though the Target is clearly replaced on spell resolution.
The stackDescription of a SpellAbilityStackInstance is a locked in String when it is created.
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 » 04 Apr 2013, 06:53

friarsol wrote:r20767
Sometimes when I declare an attack the next phase Input Box loses focus, so I can't just press space to continue through combat quickly.

Buyback is currently broken it looks like it's prompting twice for the same value. I cast Capsize with Buyback on a creature. I pay 4 U U. And then I'm prompted to pay another 3 mana.

Knollspine Invocation does not work currently. I announce X as 5, planning on discarding a Flame Spirit in my hand. I pay my 5 mana (correct) but when I need to discard it won't let me discard the Spirit, and instead the only thing I can discard is a Land. Also, the prompt to discard the card has been removed, which may lead to User Experience issues of accidentally discarding the wrong card. Additionally, now that I have no cards in my hand that have a CMC of 0 I can't even activate it.

Also, I'm still not sure about this new Announce dialog. It seems weird that when I type '11' I'm brought to '10' even though in the old dialog I could just type 11 and press enter. Plus if I want to choose X to be > 20 I have to scroll all the way to the bottom of the dialog, select other amount, and then just type what I want. Why can't we just type what you want to begin with?
1. happens when you click creatures to attack opponent, got focus returning to OK.
2. fixed 20776
3. It's not mine and never worked properly. Try to activate it when you have no cards with CMC=0 in hand - if will fail on canPlay check for discard part of cost.
4. Its previous edition was wierd. You were unable to proceed playing with mouse only and passing priority by pressing numpad ENTER with right thumb of the same hand and had to find digits on keyboard, press them and then enter - that's too many actions.
I have seen that. Reduced the list to 0/1 through 9, that gets 'other amount' option closer to you, and still allows to choose the most common values with mouse only.
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 Max mtg » 04 Apr 2013, 06:54

Sloth wrote:The stackDescription of a SpellAbilityStackInstance is a locked in String when it is created.
How difficult will it be to change that?
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 Max mtg » 04 Apr 2013, 07:14

friarsol wrote:Also, the prompt to discard the card has been removed, which may lead to User Experience issues of accidentally discarding the wrong card.
You'd better check that before writing.
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 » 04 Apr 2013, 11:07

Max mtg wrote:
Sloth wrote:The stackDescription of a SpellAbilityStackInstance is a locked in String when it is created.
How difficult will it be to change that?
It's easy to change just replace the following function in SpellAbilityStackInstance:

Code: Select all
    public final String getStackDescription() {
        return this.stackDescription;
    }
with:

Code: Select all
    public final String getStackDescription() {
        return this.ability.getStackDescription();
    }
But this could slow down the game a little bit, when a spell is on the stack.
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 » 04 Apr 2013, 12:23

Sloth wrote:It's easy to change just replace the following function in SpellAbilityStackInstance:

Code: Select all
    public final String getStackDescription() {
        return this.stackDescription;
    }
with:

Code: Select all
    public final String getStackDescription() {
        return this.ability.getStackDescription();
    }
But this could slow down the game a little bit, when a spell is on the stack.
Ahhh thanks Sloth. I had forgotten about that. I'm not sure if this.ability.getStackDesc() will actually work, because the Ability may not be quite right (if the same ability exists multiple times on the stack). But StackInstance string is definitely something that can be updated when a Target changes anyway. I'll take a look tonight.
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 » 04 Apr 2013, 12:36

Description:When I cast Comet Storm

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

java.lang.NumberFormatException: For input string: ""
   at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
   at java.lang.Integer.parseInt(Integer.java:504)
   at java.lang.Integer.parseInt(Integer.java:527)
   at forge.card.cardfactory.CardFactoryUtil.xCount(CardFactoryUtil.java:1113)
   at forge.card.ability.SpellAbilityEffect.getStackDescriptionWithSubs(SpellAbilityEffect.java:87)
   at forge.card.ability.SpellApiBased.getStackDescription(SpellApiBased.java:39)
   at forge.card.spellability.HumanPlaySpellAbility.enusureAbilityHasDescription(HumanPlaySpellAbility.java:178)
   at forge.card.spellability.HumanPlaySpellAbility.fillRequirements(HumanPlaySpellAbility.java:109)
   at forge.game.player.HumanPlayer.playSpellAbility(HumanPlayer.java:142)
   at forge.game.player.HumanPlayer.playSpellAbility(HumanPlayer.java:82)
   at forge.control.input.InputPassPriority$1.run(InputPassPriority.java:89)
   at forge.FThreads$1.run(FThreads.java:102)
   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)
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Bug Reports (snapshot builds)

Postby PowerClaws » 04 Apr 2013, 12:38

Description: I was playing a quest in the Ravnica world, i was using a GW selesnya deck, my opponent was also selesnya, id played several matches, and i noticed the game starting to slow down, then, the opponent played an enchantment (Fists Of Ironwood)when the game crashed with this error.
(Also, this was yesterday's version, ill update and see if it happens again)

ConcurrentModificationException | Open
Code: Select all
Forge Version:    1.3.12-SNAPSHOT-r20726
Operating System: Windows 7 6.1 amd64
Java Version:     1.7.0_11 Oracle Corporation

java.util.ConcurrentModificationException
   at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
   at java.util.ArrayList$ListItr.set(Unknown Source)
   at java.util.Collections.sort(Unknown Source)
   at forge.Card.getUnhiddenKeyword(Card.java:4879)
   at forge.Card.getKeyword(Card.java:4759)
   at forge.Card.getAmountOfKeyword(Card.java:5932)
   at forge.Card.getNetAttack(Card.java:4386)
   at forge.view.arcane.CardPanel.setText(CardPanel.java:615)
   at forge.view.arcane.CardPanel.setCard(CardPanel.java:653)
   at forge.view.arcane.PlayArea.setupPlayZone(PlayArea.java:591)
   at forge.view.arcane.PlayArea$1.run(PlayArea.java:516)
   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)
PowerClaws
 
Posts: 131
Joined: 30 Jan 2012, 11:33
Has thanked: 28 times
Been thanked: 8 times

Re: Bug Reports (snapshot builds)

Postby Max mtg » 04 Apr 2013, 12:52

@swordshine - fixed/
@Powerclaws - Card's keyword list was changed (by effect running in a parallel thread) while the playarea was being drawn. I have added that to my TODO list in signature
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 Diogenes » 04 Apr 2013, 13:23

Kiln Fiend's ability triggers and resolves from the stack, but the Kiln Fiend fails to get +3/+0. [Edit: Ninja'd by the daily, matter of minutes.]

Also, the Momir Avatar has never worked for me (payment and discard work fine, but you get no creature on resolution of the ability.) I figured this was known/reported, but a search says it hasn't been. Sorry if it's old news.

A crash pops up sometimes (not always) after an attacking Goblin Guide causes the top card of the defender's library to be revealed, upon dismissing the window which reveals the card. I have not been able to repro this with the AI attacking me, but it's fairly frequent when I attack the AI. The crashes I'm getting today slightly differ from yesterday's, but I'll update if I see variation again.

Edit: I got the exact same crash (seen below) after playing an Inquisition of Kozilek on an opponent with no cards under 3 cmc in hand.

Goblin Guide crash | Open
Code: Select all
Forge Version:    1.3.12-SNAPSHOT-r20789
Operating System: Windows Vista 6.0 x86
Java Version:     1.7.0_17 Oracle Corporation

java.lang.ClassCastException
   at javax.swing.LayoutComparator.compare(Unknown Source)
   at javax.swing.LayoutComparator.compare(Unknown Source)
   at java.util.Arrays.mergeSort(Unknown Source)
   at java.util.Arrays.legacyMergeSort(Unknown Source)
   at java.util.Arrays.sort(Unknown Source)
   at java.util.Collections.sort(Unknown Source)
   at javax.swing.SortingFocusTraversalPolicy.enumerateAndSortCycle(Unknown Source)
   at javax.swing.SortingFocusTraversalPolicy.getFocusTraversalCycle(Unknown Source)
   at javax.swing.SortingFocusTraversalPolicy.getFirstComponent(Unknown Source)
   at javax.swing.LayoutFocusTraversalPolicy.getFirstComponent(Unknown Source)
   at javax.swing.SortingFocusTraversalPolicy.getDefaultComponent(Unknown Source)
   at java.awt.FocusTraversalPolicy.getInitialComponent(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.SequencedEvent.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.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)
On today's build, I'm getting the following crash on the "You Win" screen:

You Win screen NPE | Open
Code: Select all
Forge Version:    1.3.12-SNAPSHOT-r20789
Operating System: Windows Vista 6.0 x86
Java Version:     1.7.0_17 Oracle Corporation

java.lang.NullPointerException
   at forge.card.cardfactory.CardFactoryUtil.xCount(CardFactoryUtil.java:1371)
   at forge.card.ability.AbilityUtils.xCount(AbilityUtils.java:1269)
   at forge.card.ability.AbilityUtils.calculateAmount(AbilityUtils.java:347)
   at forge.card.staticability.StaticAbility.checkConditions(StaticAbility.java:559)
   at forge.card.staticability.StaticAbility.applyAbility(StaticAbility.java:239)
   at forge.game.GameAction.checkStaticAbilities(GameAction.java:889)
   at forge.card.trigger.TriggerHandler.runWaitingTriggers(TriggerHandler.java:184)
   at forge.game.zone.MagicStack.unfreezeStack(MagicStack.java:204)
   at forge.game.GameAction.checkStateEffects(GameAction.java:1081)
   at forge.game.phase.PhaseHandler.handleBeginPhase(PhaseHandler.java:349)
   at forge.gui.InputProxy$1.run(InputProxy.java:61)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Diogenes
 
Posts: 201
Joined: 12 Jul 2012, 00:54
Has thanked: 39 times
Been thanked: 23 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 04 Apr 2013, 15:19

Hey Sloth,

Looks like the ActivationPhase for Dazzling Beauty is wrong. Was Trap Runner coming to? Or you leaving that up to swordshine or moomarc?
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 Sloth » 04 Apr 2013, 18:47

friarsol wrote:Hey Sloth,

Looks like the ActivationPhase for Dazzling Beauty is wrong.
Fixed! Thanks sol.

friarsol wrote:Was Trap Runner coming to? Or you leaving that up to swordshine or moomarc?
For swordshine or moomarc. 8)
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 Sloth » 04 Apr 2013, 19:22

I got the following error during paying mana (after tapping my 5th land):
| Open
java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
at java.util.AbstractList$Itr.next(Unknown Source)
at forge.Card.getType(Card.java:3970)
at forge.Card.typeContains(Card.java:5416)
at forge.Card.isLand(Card.java:5279)
at forge.view.arcane.PlayArea$RowType.isGoodFor(PlayArea.java:608)
at forge.view.arcane.PlayArea.positionAllCards(PlayArea.java:272)
at forge.view.arcane.PlayArea.doLayout(PlayArea.java:256)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validate(Unknown Source)
at javax.swing.RepaintManager.validateInvalidComponents(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$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.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)

Everything worked as expected though.
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