Page 202 of 487

Re: Bug Reports (snapshot builds)

PostPosted: 25 Jun 2014, 20:50
by drdev
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.

Re: Bug Reports (snapshot builds)

PostPosted: 25 Jun 2014, 22:15
by KrazyTheFox
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.

Re: Bug Reports (snapshot builds)

PostPosted: 27 Jun 2014, 00:26
by drdev
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.

Re: Bug Reports (snapshot builds)

PostPosted: 27 Jun 2014, 02:37
by timmermac
Can we get a snapshot build with this? I can't get eclipse to create one.

Re: Bug Reports (snapshot builds)

PostPosted: 27 Jun 2014, 14:44
by Chris H.
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

Re: Bug Reports (snapshot builds)

PostPosted: 27 Jun 2014, 15:28
by Fizanko
Thank you, i'm going to test this a lot with starting a new quest specially for it.

Re: Bug Reports (snapshot builds)

PostPosted: 27 Jun 2014, 20:27
by timmermac
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)

Re: Bug Reports (snapshot builds)

PostPosted: 27 Jun 2014, 20:48
by drdev
@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.

Re: Bug Reports (snapshot builds)

PostPosted: 28 Jun 2014, 00:49
by Fizanko
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

Re: Bug Reports (snapshot builds)

PostPosted: 28 Jun 2014, 07:21
by swordshine
r26473, my planeswalkers didn't refresh card stats when a loyalty counter was added.

Re: Bug Reports (snapshot builds)

PostPosted: 28 Jun 2014, 12:42
by Fizanko
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

Re: Bug Reports (snapshot builds)

PostPosted: 28 Jun 2014, 13:19
by drdev
swordshine wrote:r26473, my planeswalkers didn't refresh card stats when a loyalty counter was added.
Fixed in r26475.

Re: Bug Reports (snapshot builds)

PostPosted: 28 Jun 2014, 15:42
by Fizanko
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.

Re: Bug Reports (snapshot builds)

PostPosted: 29 Jun 2014, 01:48
by friarsol
r26479
AI Cast Due Respect on me, but when I played a Swamp, it appeared it was untapped, even though it was tapped.

Re: Bug Reports (snapshot builds)

PostPosted: 30 Jun 2014, 11:11
by swordshine
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.