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 friarsol » 01 Jun 2014, 18:39
I just got two comodification errors when I generally NEVER get them. These were both during a Quest Tournament, but I'm not really sure that was related:
This one seemed more annoying than usual as even though I could continue playing the battlefield wasn't really updating the way it typically does (had to wait until something occurred in combat, before my battlefield redrew. I saw some checkins in relation to trying to fix this, which is why I thought it might be related to those, and not specifically something to do with the Quest Tournament.
- Comod | Open
- EDT > java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:859)
at java.util.ArrayList$Itr.next(ArrayList.java:831)
at forge.game.card.Card.getHiddenExtrinsicKeyword(Card.java:4610)
at forge.game.card.Card.getKeyword(Card.java:4317)
at forge.game.card.Card.getAmountOfKeyword(Card.java:5180)
at forge.game.card.Card.getNetAttack(Card.java:4013)
at forge.view.arcane.CardPanel.setText(CardPanel.java:627)
at forge.view.arcane.CardPanel.setCard(CardPanel.java:664)
at forge.view.arcane.PlayArea.updateCard(PlayArea.java:699)
at forge.view.arcane.PlayArea.updateSingleCard(PlayArea.java:359)
at forge.screens.match.CMatchUI.updateSingleCard(CMatchUI.java:384)
at forge.screens.match.CMatchUI.updateCards(CMatchUI.java:376)
at forge.GuiDesktop.updateCards(GuiDesktop.java:378)
at forge.control.FControlGameEventHandler$9.run(FControlGameEventHandler.java:225)
This one seemed more annoying than usual as even though I could continue playing the battlefield wasn't really updating the way it typically does (had to wait until something occurred in combat, before my battlefield redrew. I saw some checkins in relation to trying to fix this, which is why I thought it might be related to those, and not specifically something to do with the Quest Tournament.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Bug Reports (snapshot builds)
by drdev » 01 Jun 2014, 18:45
I've noticed the Android app is running slower during gameplay as it seems to lag as phases change. Did somebody recently make a change to add a longer delay on the game thread between phases? Or is it something that's unique to the app?
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Bug Reports (snapshot builds)
by KrazyTheFox » 01 Jun 2014, 19:34
I did attempt a fix, but right after I committed the changes (after thorough testing) it decided to come up again, so I reverted said changes. I know one instance of it was related to the newer creature card stacking I added, but I haven't managed to figure out how to replicate the bug reliably. I've disabled the creature stacking part of Forge until I (or someone else) figures out why the bug is happening.friarsol wrote:I just got two comodification errors when I generally NEVER get them. These were both during a Quest Tournament, but I'm not really sure that was related:
My observations so far:
- It's not a threading issue. The modification is happening from within a single thread.
- It does not happen early in a game.
- When creature stacking is not commented out (which it currently is), the error is thrown from line 215 in forge.view.arcane.PlayArea: "|| (panel.getCard().getNetAttack() != firstPanel.getCard().getNetAttack())"
I'm concerned that the persisting bug is the fault of the artifact/enchantment stacking, though the occurrence is far more rare and even harder to pin down. Once I finish up adding the tournament to quest mode I'll delve into hunting this bug down, but it's also in the code areas I'm not at all familiar with, so I'm not sure I'll be able to find it quickly. If it is a fault of artifact/enchantment stacking with certain cards, then it'll occur much more often with certain decks (and especially so during tournaments).
Game's running the same speed on my desktop and just as well as it was on my phone, both using the latest revision (r26126), though the Android version does slow down considerably when there's a lot of cards on the field.drdev wrote:I've noticed the Android app is running slower during gameplay as it seems to lag as phases change. Did somebody recently make a change to add a longer delay on the game thread between phases? Or is it something that's unique to the app?
-
KrazyTheFox - Programmer
- Posts: 725
- Joined: 18 Mar 2014, 23:51
- Has thanked: 66 times
- Been thanked: 226 times
Re: Bug Reports (snapshot builds)
by drdev » 01 Jun 2014, 19:52
In that case, I'll need to work on optimizing the rendering on the Android game. It's just something I hadn't noticed until just recently. Could it perhaps be partially due to the recent change I made to increase the heap size available to the app?
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Bug Reports (snapshot builds)
by KrazyTheFox » 01 Jun 2014, 19:54
It could be. Larger heaps do cause the garbage collector to take longer.drdev wrote:Could it perhaps be partially due to the recent change I made to increase the heap size available to the app?
-
KrazyTheFox - Programmer
- Posts: 725
- Joined: 18 Mar 2014, 23:51
- Has thanked: 66 times
- Been thanked: 226 times
Re: Bug Reports (snapshot builds)
by drdev » 01 Jun 2014, 20:03
In that case, is it possible to selectively increase the heap size only if the app needs it? My phone and apparently many other devices were working fine before that heap size increase, I only did it to prevent others being broken. I'd rather newer devices be able to run the game faster with the standard heap size.KrazyTheFox wrote:It could be. Larger heaps do cause the garbage collector to take longer.drdev wrote:Could it perhaps be partially due to the recent change I made to increase the heap size available to the app?
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Bug Reports (snapshot builds)
by KrazyTheFox » 01 Jun 2014, 20:51
It doesn't appear to be possible. From what I've been able to find on the matter it seems that optimizing memory usage is really the only way to go.drdev wrote:In that case, is it possible to selectively increase the heap size only if the app needs it?
-
KrazyTheFox - Programmer
- Posts: 725
- Joined: 18 Mar 2014, 23:51
- Has thanked: 66 times
- Been thanked: 226 times
Re: Bug Reports (snapshot builds)
by drdev » 01 Jun 2014, 22:19
I suppose another option is to publish two .apk files, one for newer devices and one for older devices with the difference being that flag. How hard would that be to update the pom.xml?KrazyTheFox wrote:It doesn't appear to be possible. From what I've been able to find on the matter it seems that optimizing memory usage is really the only way to go.drdev wrote:In that case, is it possible to selectively increase the heap size only if the app needs it?
Alternatively, is it possible to reduce or cap the heap size from with the Java code from its initial larger starting size.
EDIT: After doing some research, I've decided to remove the largeHeap setting. Most sites I read recommended avoiding its use at all costs. I'll just have to let people know that if they encounter an Out of Memory error they'll need to install 1.5.19.007. We can try to optimize memory usage a bit (probably something the desktop version could benefit from too) so hopefully that workaround won't be needed forever, but meanwhile I can always just do a special largeHeap build every now and then for those who need it.
EDIT 2: So I just did a publish without the largeHeap flag, and it still seems more sluggish than I remember. Could somebody more familiar with the memory usage of the core code maybe look into it and let me know if there's something there. Meanwhile I've reverted to using the largeHeap flag so as not to have to maintain two separate builds of the Alpha.
Last edited by drdev on 02 Jun 2014, 04:15, edited 1 time in total.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Bug Reports (snapshot builds)
by drdev » 02 Jun 2014, 04:14
So there's a bug in the logic that determines the P/T for creatures if there's global effects altering P/T. This has become more evident in the mobile game, where every single time I change phase or cast a spell, the display of all my creatures reverts to the base p/t values then back to the adjusted values, creating an annoying flicker effect. It's harder to notice in the desktop game, however I can reproduce it by starting to cast a spell then pressing Cancel when prompted to pay the mana cost.
This is particularly easy to reproduce using the Legolas 3 Quest Opponent deck which is full of elves that boost all other elves.
Does anybody have any idea what's going on such that the boost is lost then regained? It's really annoying, especially for the mobile game, so a fix would be appreciated.
Thanks.
-Dan
This is particularly easy to reproduce using the Legolas 3 Quest Opponent deck which is full of elves that boost all other elves.
Does anybody have any idea what's going on such that the boost is lost then regained? It's really annoying, especially for the mobile game, so a fix would be appreciated.
Thanks.
-Dan
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Bug Reports (snapshot builds)
by KrazyTheFox » 02 Jun 2014, 04:14
I don't think you can directly control that on Android.drdev wrote:Alternatively, is it possible to reduce or cap the heap size from with the Java code from its initial larger starting size
-
KrazyTheFox - Programmer
- Posts: 725
- Joined: 18 Mar 2014, 23:51
- Has thanked: 66 times
- Been thanked: 226 times
Re: Bug Reports (snapshot builds)
by horsekateer » 02 Jun 2014, 05:41
Description: Beginning of my upkeep in a 3 player commander game. Sacred Mesa's trigger about to go on the stack.
- NullPointerException | Open
- Code: Select all
Forge Version: 1.5.19-SNAPSHOT-r25992 (mixed revisions detected; please update from the root directory)
Operating System: Mac OS X 10.9.3 x86_64
Java Version: 1.7.0_55 Oracle Corporation
java.lang.NullPointerException
at forge.ai.ability.TokenAi.canPlayAI(TokenAi.java:194)
at forge.ai.SpellAbilityAi.canPlayAIWithSubs(SpellAbilityAi.java:23)
at forge.ai.AiController.canPlaySa(AiController.java:648)
at forge.ai.AiController.canPlayAndPayFor(AiController.java:635)
at forge.ai.AiController.chooseSpellAbilyToPlay(AiController.java:1164)
at forge.ai.AiController.getSpellAbilityToPlay(AiController.java:1145)
at forge.ai.AiController.choooseSpellAbilityToPlay(AiController.java:1096)
at forge.ai.PlayerControllerAi.chooseSpellAbilityToPlay(PlayerControllerAi.java:410)
at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:971)
at forge.game.GameAction.startGame(GameAction.java:1532)
at forge.game.Match.startGame(Match.java:81)
at forge.control.FControl$4.run(FControl.java:441)
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:745)
- horsekateer
- Posts: 55
- Joined: 03 Apr 2013, 21:58
- Has thanked: 7 times
- Been thanked: 0 time
Re: Bug Reports (snapshot builds)
by Necronpharia » 02 Jun 2014, 07:28
Description: When you cast the card "Verdeloth the Ancient" and pay its kicker costs, there won't spawn any tokens no matter how much you pay.
- General bug report | Open
- Code: Select all
Forge Version: 1.5.19-SNAPSHOT-r26027 (mixed revisions detected; please update from the root directory)
Operating System: Windows 7 6.1 x86
Java Version: 1.7.0_25 Oracle Corporation
- Necronpharia
- Posts: 1
- Joined: 02 Jun 2014, 07:14
- Has thanked: 0 time
- Been thanked: 0 time
Re: Bug Reports (snapshot builds)
by friarsol » 02 Jun 2014, 12:21
I'm not sure why you are calling it a bug exactly. But it's how layers work. Static effects are cleared, and then we go through and reapply them. I guess the problem is that somewhere along the way you are redrawing in the middle of those effects being applied. Probably the best way to handle the p/t flickering is just before we enter the function to set some type of boolean in the UI telling it not to redraw. And then when we're finished, turning it off so it does redraw.drdev wrote:Does anybody have any idea what's going on such that the boost is lost then regained? It's really annoying, especially for the mobile game, so a fix would be appreciated.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Bug Reports (snapshot builds)
by rikimbo » 03 Jun 2014, 00:35
When a Licid (I tested this with Leeching Licid) is in its alternate form (ie. when it is an enchantment), its image fails to load. It reverts to the default image. I poked around a bit, and it looks like the string key which is being passed to ImageCache.GetImage() is empty.
EDIT: This should be fixed now.
EDIT: This should be fixed now.
Last edited by rikimbo on 09 Jun 2014, 01:05, edited 1 time in total.
-
rikimbo - Posts: 52
- Joined: 25 Mar 2014, 14:15
- Location: Winnipeg
- Has thanked: 10 times
- Been thanked: 7 times
Re: Bug Reports (snapshot builds)
by rnitni » 03 Jun 2014, 16:31
Description: I open the spell shop the first time. Also, the second time I open the spell shop, I don't get an error, but just 2 Boosters to buy.
It also crashed the last two times I was ending a game with the same error.
I think this may be related to my current quest consisting only of 1 set (Limited Edition Beta, it's a quest I downloaded here made by Xyx IIRC). Adding another set solves the problem.
It also crashed the last two times I was ending a game with the same error.
I think this may be related to my current quest consisting only of 1 set (Limited Edition Beta, it's a quest I downloaded here made by Xyx IIRC). Adding another set solves the problem.
- IndexOutOfBoundsException | Open
- Code: Select all
Forge Version: 1.5.19-SNAPSHOT-r25992 (mixed revisions detected; please update from the root directory)
Operating System: Windows 7 6.1 amd64
Java Version: 1.7.0_51 Oracle Corporation
java.lang.IndexOutOfBoundsException: toIndex = 2
at java.util.ArrayList.subListRangeCheck(Unknown Source)
at java.util.ArrayList.subList(Unknown Source)
at forge.quest.QuestUtilCards.generateBoosterBoxesInShop(QuestUtilCards.java:608)
at forge.quest.QuestUtilCards.generateCardsInShop(QuestUtilCards.java:680)
at forge.quest.QuestUtilCards.getShopList(QuestUtilCards.java:704)
at forge.screens.deckeditor.controllers.CEditorQuestCardShop.update(CEditorQuestCardShop.java:563)
at forge.screens.deckeditor.CDeckEditorUI.setCurrentEditorController(CDeckEditorUI.java:275)
at forge.screens.deckeditor.CDeckEditorUI.setEditorController(CDeckEditorUI.java:112)
at forge.screens.home.quest.SSubmenuQuestUtil.showSpellShop(SSubmenuQuestUtil.java:261)
at forge.screens.home.quest.CSubmenuDuels$1.run(CSubmenuDuels.java:38)
at forge.toolbox.FLabel._doMouseAction(FLabel.java:289)
at forge.toolbox.FLabel.access$1300(FLabel.java:33)
at forge.toolbox.FLabel$6.onLeftClick(FLabel.java:327)
at forge.toolbox.FMouseAdapter.mouseReleased(FMouseAdapter.java:245)
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)
- rnitni
- Posts: 9
- Joined: 10 Aug 2011, 08:34
- Has thanked: 0 time
- Been thanked: 0 time
Who is online
Users browsing this forum: No registered users and 40 guests