It is currently 13 Sep 2025, 15:30
   
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 drdev » 25 Jun 2014, 20:50

You know, on closer look at the callstack, this concurrent issue really boils down to the same bug as the flicker issue with P/T that I recently fixed for the mobile game. That means I've probably actually fixed the concurrent issue already for the mobile game, and if I apply a similer fix to the desktop game, I can probably fix the concurrent issue there as well.

The problem is that we're calling card.getNetAttack() from paint code, whereas it should be called from a GameEventCardStatChanged handler to cache off an attack value that can then be used by the paint code until another stat changed event is handled. That's how I fixed the issue for the mobile game.

I'll look into fixing this tonight.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Bug Reports (snapshot builds)

Postby KrazyTheFox » 25 Jun 2014, 22:15

Another thing to look at in the future would be reducing calculation times for static effects. Every single time something happens, the game recalculates the entire board, which is where a lot of the late-game lag comes from (especially on the Android version). The game code itself is still very unfamiliar to me, but it seems like there ought to be a way to trigger recalculations only when something needs recalculation. Then, instead of sending a card changed event every time something changes on the board (which is multiple times per update with static effects), it'd just send one.

I'd like to work on this myself, but I'm out of development time for the next couple of months with this move. If nobody else has picked it up, I probably will when I have time again.
User avatar
KrazyTheFox
Programmer
 
Posts: 725
Joined: 18 Mar 2014, 23:51
Has thanked: 66 times
Been thanked: 226 times

Re: Bug Reports (snapshot builds)

Postby drdev » 27 Jun 2014, 00:26

I just committed a fix (r26446) that will hopefully prevent the concurrent modification issue going forward as well as prevent the P/T Overlay flickering. If anyone still encounters it or encounters any issues with the P/T overlay not updating, please let me know.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Bug Reports (snapshot builds)

Postby timmermac » 27 Jun 2014, 02:37

Can we get a snapshot build with this? I can't get eclipse to create one.
"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
User avatar
timmermac
Tester
 
Posts: 1512
Joined: 17 May 2010, 20:36
Has thanked: 18 times
Been thanked: 95 times

Re: Bug Reports (snapshot builds)

Postby Chris H. » 27 Jun 2014, 14:44

timmermac wrote:Can we get a snapshot build with this? I can't get eclipse to create one.
 
New snapshot made at rev 26458

forge-gui-desktop-1.5.21-20140627.144229-2.tar.bz2

forge-gui-desktop-1.5.21-20140627.144229-2-osx.tar.bz2
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Bug Reports (snapshot builds)

Postby Fizanko » 27 Jun 2014, 15:28

Thank you, i'm going to test this a lot with starting a new quest specially for it.
probably outdated by now so you should avoid : Innistrad world for Forge (updated 17/11/2014)
Duel Decks for Forge - Forge custom decks (updated 25/10/2014)
User avatar
Fizanko
Tester
 
Posts: 780
Joined: 07 Feb 2014, 11:24
Has thanked: 155 times
Been thanked: 94 times

Re: Bug Reports (snapshot builds)

Postby timmermac » 27 Jun 2014, 20:27

Description: drawing 2nd card from Rites of Flourishing on 33rd turn of game 3 of match against Tweedledum using snapshot released this morning.

ConcurrentModificationException | Open
Code: Select all
Forge Version:    1.5.21-SNAPSHOT-r26456 (mixed revisions detected; please update from the root directory)
Operating System: Windows 7 6.1 x86
Java Version:     1.7.0_51 Oracle Corporation

java.util.ConcurrentModificationException
   at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
   at java.util.ArrayList$Itr.next(Unknown Source)
   at forge.game.card.Card.getHiddenExtrinsicKeyword(Card.java:4662)
   at forge.game.card.Card.getKeyword(Card.java:4369)
   at forge.game.card.Card.hasStartOfKeyword(Card.java:5154)
   at forge.game.zone.PlayerZone$AlienCardsActivationFilter.apply(PlayerZone.java:45)
   at forge.game.zone.PlayerZone$AlienCardsActivationFilter.apply(PlayerZone.java:41)
   at com.google.common.collect.Iterators$7.computeNext(Iterators.java:647)
   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.Iterators.addAll(Iterators.java:356)
   at com.google.common.collect.Lists.newArrayList(Lists.java:147)
   at com.google.common.collect.Lists.newArrayList(Lists.java:129)
   at forge.game.zone.PlayerZone.getCardsPlayerCanActivate(PlayerZone.java:132)
   at forge.game.player.Player.getCardsActivableInExternalZones(Player.java:1487)
   at forge.toolbox.special.PlayerDetailsPanel.updateZones(PlayerDetailsPanel.java:130)
   at forge.screens.match.CMatchUI.updateZones(CMatchUI.java:354)
   at forge.GuiDesktop.updateZones(GuiDesktop.java:377)
   at forge.control.FControlGameEventHandler$8.run(FControlGameEventHandler.java:173)
   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)
"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
User avatar
timmermac
Tester
 
Posts: 1512
Joined: 17 May 2010, 20:36
Has thanked: 18 times
Been thanked: 95 times

Re: Bug Reports (snapshot builds)

Postby drdev » 27 Jun 2014, 20:48

@timmermac - that stack trace is different than the one I addressed with the P/T overlay fix. So I guess we really need to dig into the actual keyword code to truly fix these issues. Might be nice to optimize keywords while were at it to not just loop over a list of strings anymore and use faster lookup methods like enum flags or HashSets.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Bug Reports (snapshot builds)

Postby Fizanko » 28 Jun 2014, 00:49

New snapshot made at rev 26458

forge-gui-desktop-1.5.21-20140627.144229-2.tar.bz2
As said previously, today i have started a new quest in Main World using that build, and so far i have played 24 duels up to 10/14 :
Image

And not a single concurrent error (or any other errors) !

So as Timmermac reported it didn't fixed them all, but i think it very likely removed several of them, as i don't remember having been able to play in 1.19 and 1.20 near to 25 quest duels in a row without going into a concurrent error at least 2 or 3 times.

Maybe it's just luck, i'll see once i will be reaching 50 matches.


edit : make that 30 matches without a single concurrent (or any) error !
Image
probably outdated by now so you should avoid : Innistrad world for Forge (updated 17/11/2014)
Duel Decks for Forge - Forge custom decks (updated 25/10/2014)
User avatar
Fizanko
Tester
 
Posts: 780
Joined: 07 Feb 2014, 11:24
Has thanked: 155 times
Been thanked: 94 times

Re: Bug Reports (snapshot builds)

Postby swordshine » 28 Jun 2014, 07:21

r26473, my planeswalkers didn't refresh card stats when a loyalty counter was added.
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Bug Reports (snapshot builds)

Postby Fizanko » 28 Jun 2014, 12:42

It was too good, 35th duel and finally the dreaded concurrent modification error strikes back, so it was just some luck if i didn't got it earlier.

It was on the AI turn, my Boros Battleshaper allowed me to select who can attack or not, but as the AI only had Black Knight as valid attacker and due to its protection against white, i didn't choose anything.
I played and didn't targetted exactly the same way (as the AI had only Black Knight as attacker valid) on a couple of previous turns without error so i guess it's indeed unrelated to the card used.

Image

I clicked continue to capture the log in case and forgot to press Report, so i couldn't get the error message.
But i guess it's the same as all the previous reported ones anyways.

Now the big difference is that i could continue to play and this time the visual display correctly refreshed (i guess that has to do with drdev fix as in the half hundred of concurrent error i got in 1.5.19 and 1.5.20 the display refresh was always broken) so at least good news is that it is still playable after the error
probably outdated by now so you should avoid : Innistrad world for Forge (updated 17/11/2014)
Duel Decks for Forge - Forge custom decks (updated 25/10/2014)
User avatar
Fizanko
Tester
 
Posts: 780
Joined: 07 Feb 2014, 11:24
Has thanked: 155 times
Been thanked: 94 times

Re: Bug Reports (snapshot builds)

Postby drdev » 28 Jun 2014, 13:19

swordshine wrote:r26473, my planeswalkers didn't refresh card stats when a loyalty counter was added.
Fixed in r26475.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Bug Reports (snapshot builds)

Postby Fizanko » 28 Jun 2014, 15:42

same snapshot as up there
In Sorin vs Tibalt, playing as Tibalt i used Blazing Salvo on the AI Vampire Nighthawk

Image

And it did absolutely nothing, despite as shown in the screenshot the log mention dealing 3 damages to it and 5 damages to the AI


edit : and 50th match in that quest started to test that snapshot
Image

And on those 50 duels, only 1 concurrent error, while previous i would have got between 5 and 10
So unless i've been really lucky at not triggering the bad code, it looks like the situation regarding that nasty error has been improved a lot.
probably outdated by now so you should avoid : Innistrad world for Forge (updated 17/11/2014)
Duel Decks for Forge - Forge custom decks (updated 25/10/2014)
User avatar
Fizanko
Tester
 
Posts: 780
Joined: 07 Feb 2014, 11:24
Has thanked: 155 times
Been thanked: 94 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 29 Jun 2014, 01:48

r26479
AI Cast Due Respect on me, but when I played a Swamp, it appeared it was untapped, even though it was tapped.
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 » 30 Jun 2014, 11:11

Essence of the Wild is broken, probably another bug in clone effect.
When Essence of the Wild is in play, I cast a Clone and apply Clone's own replacement effect first, the Clone and every other creature you control enters the battlefield as a blank card.
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 37 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 37 users online :: 0 registered, 0 hidden and 37 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 37 guests

Login Form