Bug Reports (snapshot builds)
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Bug Reports (snapshot builds)
by Diogenes » 24 Sep 2013, 20:51
I'm not sure if this is the root cause of the excessive-cpu-use and RAM issue, but it is one way to trigger it. With a single creature on the opponent's side enchanted by a pacifism on my side of the battlefield, the cpu goes from 0% when idle immediately to 46% when I make targeting arcs visible (and stays steady.) It drops back to 0% as soon as I dismiss the targeting arcs.
edit: The issue does not seem to be greatly compounded by viewing two targeting arcs, cpu-use hovers between 42-48%, settling and bobbing between 44 and 45% on my system. However, using the "mouse-over only" option, cpu use rises to 60% instantly and for as long as I call up a targeting arc by hovering over the relevant cards.
edit 2: There also seems to be a memory leak while using mouse-over targeting arcs. RAM usage increases steadily, and does not fall back down after the hover is released. I've also confirmed that RAM usage climbs when targeting arcs are set to "on".
I'd appreciate it if someone else is willing to follow these repro steps, monitor their cpu and RAM use, and post their results:
1. Start a constructed match with dev mode on
2. Pass the mulligan process
3. Make sure that the targeting arc toggle is set to "off"
3. Before any player has priority, use developer options to add two Llanowar Augurs to play under the opponent's control
4. Using developer options, bring one Pacifism into play under your control, enchanting Augur A
5. Check cpu and memory usage once everything has resolved
6. Toggle targeting arc options to "mouse over"
7. Mouse over your Pacifism, and record your cpu use, check to see whether RAM use increases
8. Toggle targeting arc options to "on"
9. Observe cpu and RAM use
10. Using developer options, bring a second Pacifism into play under your control, enchanting Augur B
11. Observe cpu and RAM use
I know people will probably check on their own, but I figure this is a decent baseline procedure. Thanks!
edit: The issue does not seem to be greatly compounded by viewing two targeting arcs, cpu-use hovers between 42-48%, settling and bobbing between 44 and 45% on my system. However, using the "mouse-over only" option, cpu use rises to 60% instantly and for as long as I call up a targeting arc by hovering over the relevant cards.
edit 2: There also seems to be a memory leak while using mouse-over targeting arcs. RAM usage increases steadily, and does not fall back down after the hover is released. I've also confirmed that RAM usage climbs when targeting arcs are set to "on".
I'd appreciate it if someone else is willing to follow these repro steps, monitor their cpu and RAM use, and post their results:
1. Start a constructed match with dev mode on
2. Pass the mulligan process
3. Make sure that the targeting arc toggle is set to "off"
3. Before any player has priority, use developer options to add two Llanowar Augurs to play under the opponent's control
4. Using developer options, bring one Pacifism into play under your control, enchanting Augur A
5. Check cpu and memory usage once everything has resolved
6. Toggle targeting arc options to "mouse over"
7. Mouse over your Pacifism, and record your cpu use, check to see whether RAM use increases
8. Toggle targeting arc options to "on"
9. Observe cpu and RAM use
10. Using developer options, bring a second Pacifism into play under your control, enchanting Augur B
11. Observe cpu and RAM use
I know people will probably check on their own, but I figure this is a decent baseline procedure. Thanks!

Re: Bug Reports (snapshot builds)
by spr » 24 Sep 2013, 21:22
Targetting arcs hogging cpu has been around for quite a while, certainly at least for the last 3 months (when I joined), so may be even longer - I know of a least one previous post mentioning it. So I don't think it is the cause of recent memory issues although it can't help. Personally, I switch to the "mouse-hover" option but it will need to be addressed at some point.
Cheers,
Steve
Cheers,
Steve
Re: Bug Reports (snapshot builds)
by Diogenes » 24 Sep 2013, 21:30
I have edited my original post to reflect that RAM usage will constantly climb while targeting arcs are visible, even in the "always on" setting. The increase slows over time, but it does not stop. I think it's possible this might be how Timmermac got into the 900s.spr wrote:Targetting arcs hogging cpu has been around for quite a while, certainly at least for the last 3 months (when I joined), so may be even longer - I know of a least one previous post mentioning it. So I don't think it is the cause of recent memory issues although it can't help. Personally, I switch to the "mouse-hover" option but it will need to be addressed at some point.
Cheers,
Steve
Is there some structural reason why cards cannot be drawn on a battlefield other than their controller's? A bright outline showing that its not in its controller's field would be enough of a reminder, and it would clear up a lot of clutter when there are multiple debuffs like Pacifisms on the field.
Re: Bug Reports (snapshot builds)
by spr » 24 Sep 2013, 21:50
I think it is safe to say there are memory leaks. On my system I have watched the memory usage increase when I have nothing but the home screen open. Today I have had memory usage over 1G while trying to replicate this problem. Still no crashes though!Diogenes wrote:I have edited my original post to reflect that RAM usage will constantly climb while targeting arcs are visible, even in the "always on" setting. The increase slows over time, but it does not stop. I think it's possible this might be how Timmermac got into the 900s.

I will add a fix in the next 24 hours which may or may not solve the general slowing down/memory usage problem but should address viewtopic.php?f=52&t=6333&start=2430#p133105 and viewtopic.php?f=26&t=11813. My feeling is that these issues were always there and recent updates (such at the skinning update which may require some tuning - viewtopic.php?f=52&t=6333&start=2430#p132668) simply pushed them to the fore.
Cheers,
Steve
Re: Bug Reports (snapshot builds)
by Diogenes » 24 Sep 2013, 21:59
Sorry if I sounded a bit driven. ^_^ I was unaware that the cpu use of targeting arcs was known, and I haven't come up with much else on this issue yet.
Re: Bug Reports (snapshot builds)
by Agetian » 25 Sep 2013, 06:36
r23314 (I think this has been around for a while though): for some reason the card picture isn't shown while moving a card around in the hand area (it disappears when the move starts and reappears when the move is finished). This is minor, but thought I'd report it anyway (I'm slowly getting back to playing/developing Forge, by the way, will try to contribute a bit later). 
- Agetian

- Agetian
- Agetian
- Programmer
- Posts: 3486
- Joined: 14 Mar 2011, 05:58
- Has thanked: 683 times
- Been thanked: 569 times
Re: Bug Reports (snapshot builds)
by spr » 25 Sep 2013, 11:05
r23316 : addresses the OutOfMemoryError as described in http://www.cardforge.org/bugz/view.php?id=743.
I think this was a contributing factor to memory problems although I am not convinced it is the single cause of the sluggishness/memory issues people are experiencing. Unfortunately, I have not been able to replicate the behaviour so it is a little bit of a suck it and see approach at the moment.
Cheers,
Steve
I think this was a contributing factor to memory problems although I am not convinced it is the single cause of the sluggishness/memory issues people are experiencing. Unfortunately, I have not been able to replicate the behaviour so it is a little bit of a suck it and see approach at the moment.
Cheers,
Steve
Re: Bug Reports (snapshot builds)
by timmermac » 25 Sep 2013, 12:52
Except for one slight issue. This RAM usage increase is remaining in place even with targeting arcs turned completely off. I only noticed this after getting 1.4.8 Snapshot 15. It was not happening with 1.4.7Diogenes wrote:I have edited my original post to reflect that RAM usage will constantly climb while targeting arcs are visible, even in the "always on" setting. The increase slows over time, but it does not stop. I think it's possible this might be how Timmermac got into the 900s.spr wrote:Targetting arcs hogging cpu has been around for quite a while, certainly at least for the last 3 months (when I joined), so may be even longer - I know of a least one previous post mentioning it. So I don't think it is the cause of recent memory issues although it can't help. Personally, I switch to the "mouse-hover" option but it will need to be addressed at some point.
Cheers,
Steve
Is there some structural reason why cards cannot be drawn on a battlefield other than their controller's? A bright outline showing that its not in its controller's field would be enough of a reminder, and it would clear up a lot of clutter when there are multiple debuffs like Pacifisms on the field.
"I just woke up, haven't had coffee, let alone a pee in 7 days, and I find out you stole my ass and made a ...mini-me! Carter, I should be irked currently, yes?" - Jack O'Neill
Re: Bug Reports (snapshot builds)
by Mayerling » 26 Sep 2013, 23:04
Got this report when AI attacked me with a Great Sable Stag, White Knight, and Devout Lightcaster.
Description: [describe what you were doing when the crash occurred]
Description: [describe what you were doing when the crash occurred]
- ConcurrentModificationException | Open
- Code: Select all
Forge Version: 1.4.7-r23046M
Operating System: Windows 7 6.1 x86
Java Version: 1.7.0_25 Oracle Corporation
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
at java.util.ArrayList$Itr.next(Unknown Source)
at forge.game.combat.Combat.getAttackers(Combat.java:205)
at forge.gui.match.TargetingOverlay.assembleArcs(TargetingOverlay.java:238)
at forge.gui.match.TargetingOverlay.access$300(TargetingOverlay.java:52)
at forge.gui.match.TargetingOverlay$OverlayPanel.paintComponent(TargetingOverlay.java:345)
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.BufferStrategyPaintManager.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$1000(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)
- Mayerling
- Posts: 1
- Joined: 25 Sep 2013, 23:42
- Has thanked: 0 time
- Been thanked: 0 time
Re: Bug Reports (snapshot builds)
by RumbleBBU » 27 Sep 2013, 06:14
Two card-specific bug observations in the current SVN:
1) The AI doesn't lose control of his Ghazban Ogre, no matter how low his health drops. In the Green Castle, the Green Wizard starts with a Ghazban in play. In both games, I beat him to 0 life without taking virtually any damage at all myself, and he never lost his Ghazban during his upkeep - not even when my life was 25 and his was 2.
2) Lobotomy prompted me 3 times. Two times showing the AI player's hand, and once showing his library. It worked as expected though, exiling the all copies of the card I initially picked from his hand.
Neither of these problems was present in the ancient (last April?) version that I was using until recently.
1) The AI doesn't lose control of his Ghazban Ogre, no matter how low his health drops. In the Green Castle, the Green Wizard starts with a Ghazban in play. In both games, I beat him to 0 life without taking virtually any damage at all myself, and he never lost his Ghazban during his upkeep - not even when my life was 25 and his was 2.
2) Lobotomy prompted me 3 times. Two times showing the AI player's hand, and once showing his library. It worked as expected though, exiling the all copies of the card I initially picked from his hand.
Neither of these problems was present in the ancient (last April?) version that I was using until recently.
Re: Bug Reports (snapshot builds)
by RumbleBBU » 27 Sep 2013, 09:45
3) A third bug in the current SVN, a bit more serious than the previous two. The AI seems to have somehow lost its ability to target permanents! Example, excerpt from game log:
Makes the game a bit too easy...
- Code: Select all
Resolve stack: Disintegrate ability fizzles.
Add to stack: War Mage cast Disintegrate (50) targeting .
Makes the game a bit too easy...
Re: Bug Reports (snapshot builds)
by Hamletchickencrisis » 27 Sep 2013, 16:50
Description: Crashed after clicking on the last swamp to complete casting a Phyrexian Obliterator into play normally.

- OutOfMemoryError | Open
- Code: Select all
Forge Version: 1.5.0-r23327
Operating System: Windows 7 6.1 x86
Java Version: 1.7.0_40 Oracle Corporation
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Unknown Source)
at com.mortennobel.imagescaling.ResampleOp.doFilter(ResampleOp.java:150)
at com.mortennobel.imagescaling.AdvancedResizeOp.filter(AdvancedResizeOp.java:81)
at forge.ImageCache.scaleImage(ImageCache.java:200)
at forge.ImageCache.getImage(ImageCache.java:112)
at forge.view.arcane.CardPanel.setCard(CardPanel.java:664)
at forge.view.arcane.PlayArea.updateCard(PlayArea.java:641)
at forge.view.arcane.PlayArea.recalculateCardPanels(PlayArea.java:579)
at forge.view.arcane.PlayArea.setupPlayZone(PlayArea.java:528)
at forge.gui.match.CMatchUI.updateZones(CMatchUI.java:339)
at forge.control.FControlGameEventHandler$8.run(FControlGameEventHandler.java:207)
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)

- Any graphical glitches or slowdown prior to the error? No
- How many cards were on display? See screenshot
- Can you replicate it? Yes
- How much memory in your PC? 16GB
- Did you have any other apps open and if so how many? Firefox
- How long had Forge been open?about 15 minutes including time playing it
- Hamletchickencrisis
- Posts: 89
- Joined: 04 Dec 2009, 11:01
- Has thanked: 4 times
- Been thanked: 0 time
Re: Bug Reports (snapshot builds)
by spr » 28 Sep 2013, 06:44
Oh well.Hamletchickencrisis wrote:Description: Crashed after clicking on the last swamp to complete casting a Phyrexian Obliterator into play normally.

Cheers,
Steve
Re: Bug Reports (snapshot builds)
by andrewd13 » 29 Sep 2013, 09:34
Description: Playing the "Indestructible" built-in deck vs. a random opponent, he cast Thousand-Year Elixir. Can't remember the details, but there was 2 Stuffy Doll in play for each of us, and he had an Arcbound Worker in play, I had Phylactery Lich.
- IndexOutOfBoundsException | Open
- Code: Select all
Forge Version: 1.4.8-SNAPSHOT-r23285
Operating System: Mac OS X 10.7.5 x86_64
Java Version: 1.7.0_25 Oracle Corporation
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:604)
at java.util.ArrayList.get(ArrayList.java:382)
at forge.Card.getHiddenExtrinsicKeyword(Card.java:4597)
at forge.Card.getKeyword(Card.java:4305)
at forge.Card.getAmountOfKeyword(Card.java:5147)
at forge.Card.getNetAttack(Card.java:4005)
at forge.view.arcane.CardPanel.setText(CardPanel.java:625)
at forge.view.arcane.CardPanel.setCard(CardPanel.java:665)
at forge.view.arcane.PlayArea.updateCard(PlayArea.java:641)
at forge.view.arcane.PlayArea.recalculateCardPanels(PlayArea.java:579)
at forge.view.arcane.PlayArea.setupPlayZone(PlayArea.java:528)
at forge.gui.match.CMatchUI.updateZones(CMatchUI.java:339)
at forge.control.FControlGameEventHandler$8.run(FControlGameEventHandler.java:207)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
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)
- andrewd13
- Posts: 17
- Joined: 29 Jul 2013, 15:43
- Has thanked: 0 time
- Been thanked: 0 time
Re: Bug Reports (snapshot builds)
by andrewd13 » 29 Sep 2013, 11:15
Second one, AI had Benalish Trapper, I had Lorescale Coatl, the AI was about to attack.
- NullPointerException | Open
- Code: Select all
Forge Version: 1.4.8-SNAPSHOT-r23285
Operating System: Mac OS X 10.7.5 x86_64
Java Version: 1.7.0_25 Oracle Corporation
java.lang.NullPointerException
at forge.game.combat.CombatUtil.canBlock(CombatUtil.java:523)
at forge.card.ability.ai.PumpAiBase.isUsefulPumpKeyword(PumpAiBase.java:236)
at forge.card.ability.ai.PumpAiBase.containsUsefulKeyword(PumpAiBase.java:32)
at forge.card.ability.ai.PumpAiBase.shouldPumpCard(PumpAiBase.java:409)
at forge.card.ability.ai.PumpAiBase$3.apply(PumpAiBase.java:493)
at forge.card.ability.ai.PumpAiBase$3.apply(PumpAiBase.java:490)
at com.google.common.collect.Iterators$7.computeNext(Iterators.java:702)
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
at com.google.common.collect.Lists.newArrayList(Lists.java:144)
at com.google.common.collect.Lists.newArrayList(Lists.java:125)
at forge.CardLists.filter(CardLists.java:232)
at forge.card.ability.ai.PumpAiBase.getPumpCreatures(PumpAiBase.java:490)
at forge.card.ability.ai.PumpAi.pumpTgtAI(PumpAi.java:224)
at forge.card.ability.ai.PumpAi.canPlayAI(PumpAi.java:174)
at forge.card.ability.SpellAbilityAi.canPlayAIWithSubs(SpellAbilityAi.java:23)
at forge.card.ability.SpellApiBased.canPlayAI(SpellApiBased.java:49)
at forge.game.ai.AiController.canPlayAndPayFor(AiController.java:478)
at forge.game.ai.AiController.chooseSpellAbilyToPlay(AiController.java:462)
at forge.game.ai.AiController.getSpellAbilityToPlay(AiController.java:826)
at forge.game.ai.AiController.playSpellAbilities(AiController.java:800)
at forge.game.ai.AiController.onPriorityRecieved(AiController.java:746)
at forge.game.player.PlayerControllerAi.takePriority(PlayerControllerAi.java:354)
at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:960)
at forge.game.GameAction.startGame(GameAction.java:1544)
at forge.game.Match$1.run(Match.java:103)
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:724)
- andrewd13
- Posts: 17
- Joined: 29 Jul 2013, 15:43
- Has thanked: 0 time
- Been thanked: 0 time
Who is online
Users browsing this forum: No registered users and 33 guests