It is currently 26 Aug 2025, 23:45
   
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 Marek14 » 04 Jun 2016, 17:42

When you activate the equip ability of Grafted Wargear and target the same creature (for example because it's Daru Spiritualist), its unattach ability shouldn't trigger since it never stopped being attached to that creature.

Gatherer ruling:
The “becomes unattached” ability triggers if (a) Grafted Wargear leaves the battlefield, (b) the equip ability moves it onto another creature, (c) another effect moves it onto another creature, (d) an effect causes it to become unattached, or (e) the creature leaves the battlefield.
Morphling has an amusing typo where its +1/-1 ability on stack claims that I will get the bonus, not the creature.
Marek14
Tester
 
Posts: 2773
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 303 times

Re: Bug Reports (snapshot builds)

Postby Bog Wraith » 05 Jun 2016, 16:48

1.5.53-SNAPSHOT-r31270


A.I. had 14 creatures on the attack when this crash occurred:

ConcurrentModificationException | Open
Code: Select all
Forge Version:    1.5.53-SNAPSHOT-r31270
Operating System: Mac OS X 10.10.5 x86_64
Java Version:     1.8.0_91 Oracle Corporation

java.util.ConcurrentModificationException
   at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429)
   at java.util.HashMap$KeyIterator.next(HashMap.java:1453)
   at java.util.AbstractCollection.addAll(AbstractCollection.java:343)
   at java.util.HashSet.<init>(HashSet.java:119)
   at forge.game.combat.CombatView.getAttackers(CombatView.java:61)
   at forge.screens.match.TargetingOverlay.addArcsForCard(TargetingOverlay.java:279)
   at forge.screens.match.TargetingOverlay.assembleArcs(TargetingOverlay.java:160)
   at forge.screens.match.TargetingOverlay.access$700(TargetingOverlay.java:57)
   at forge.screens.match.TargetingOverlay$OverlayPanel.paintComponent(TargetingOverlay.java:389)
   at javax.swing.JComponent.paint(JComponent.java:1056)
   at javax.swing.JComponent.paintChildren(JComponent.java:889)
   at javax.swing.JComponent.paint(JComponent.java:1065)
   at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
   at javax.swing.JComponent.paintChildren(JComponent.java:889)
   at javax.swing.JComponent.paint(JComponent.java:1065)
   at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
   at javax.swing.JComponent.paintChildren(JComponent.java:889)
   at javax.swing.JComponent.paint(JComponent.java:1065)
   at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
   at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
   at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
   at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
   at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
   at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
   at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
   at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
   at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
   at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
   at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
   at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
   at java.awt.EventQueue.access$500(EventQueue.java:97)
   at java.awt.EventQueue$3.run(EventQueue.java:709)
   at java.awt.EventQueue$3.run(EventQueue.java:703)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Attachments
Huge Battle Crash.jpg
'Twas in the bogs of Cannelbrae
My mate did meet an early grave
'Twas nothing left for us to save
In the peat-filled bogs of Cannelbrae.
User avatar
Bog Wraith
Global Mod 1 (Ret)
 
Posts: 1108
Joined: 28 May 2008, 22:40
Location: Shandalar
Has thanked: 425 times
Been thanked: 153 times

Re: Bug Reports (snapshot builds)

Postby Hanmac » 05 Jun 2016, 17:33

@Bog Wraith about that ConcurrentModificationException, many more get that one too, sometimes it does crash in nextEntry, sometimes it does nextNode (depending on the java version i think)
i do test if ConcurrentHashMap would solve this problem.

because the crash does happen internal of java when turning that HashMap into a HashSet.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Bog Wraith » 06 Jun 2016, 00:14

Hanmac wrote:@Bog Wraith about that ConcurrentModificationException, many more get that one too, sometimes it does crash in nextEntry, sometimes it does nextNode (depending on the java version i think)
i do test if ConcurrentHashMap would solve this problem.

because the crash does happen internal of java when turning that HashMap into a HashSet.
I'm not a coder so what you're telling me is not anything I can understand, but I will help if I can when it comes to reporting bugs & testing them when they're fixed as I've done in the past. I especially like testing the latest snapshots as it helps to get the next public release ready for prime time users & it affords us the chance to play & learn with the latest sets & cards before the next version is ready.
'Twas in the bogs of Cannelbrae
My mate did meet an early grave
'Twas nothing left for us to save
In the peat-filled bogs of Cannelbrae.
User avatar
Bog Wraith
Global Mod 1 (Ret)
 
Posts: 1108
Joined: 28 May 2008, 22:40
Location: Shandalar
Has thanked: 425 times
Been thanked: 153 times

Re: Bug Reports (snapshot builds)

Postby Hanmac » 06 Jun 2016, 14:41

@Bog Wraith: its just that what i think was the problem.
as for now it seems it did fix it.

but now (i need to check if that was the problem) i get:
"AI Attack declaration invalid"
when the AI does have two Silent Arbiter. but i need to investigate more where the problem is or if i was the culprit.

===

PS: i am currently trying to implement Hedonist's Trove.
for that i found two things with "may be played"

first with "AddHiddenKeyword$ May be played"
second with "MayPlay$ True"
both are used with "Mode$ Continuous"

which one is the correct way? or is there a difference?
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 06 Jun 2016, 17:10

Hanmac wrote:PS: i am currently trying to implement Hedonist's Trove.
for that i found two things with "may be played"

first with "AddHiddenKeyword$ May be played"
second with "MayPlay$ True"
both are used with "Mode$ Continuous"

which one is the correct way? or is there a difference?
The problem with Hedonist's Trove is that Forge doesn't really track which effect was used to cast things.

The "may be played" keyword is the 'simple' version, and the 'MayPlay' handler is the more complex one. You'd probably need to use the MayPlay version, with some type of restriction so when attempting to cast the card the tracking takes places. Not only does the Trove need to know when things it exiled were cast, it also needs to know if they were cast through this effect. This probably cascades a fair amount into when cards have multiple "MayPlay" effects, the creator of the effect is recorded, and the user has to choose which "May Play" effect they are playing via.
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 Hanmac » 06 Jun 2016, 17:24

@friarsol: thanks good to know, i will experiment with it and try to add the creator of the effect to the host card.

if you are interested, that is my current state of the card, its not tested yet. My idea was to catch the Played event when something does hit the Stack from exile while remembered.

Code: Select all
Name:Hedonist's Trove
ManaCost:5 B B
Types:Enchantment

T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile all cards from target opponent's graveyard.
SVar:TrigExile:AB$ ChangeZoneAll | Cost$ 0 | ValidTgts$ Opponent | TgtPrompt$ Select target Opponent | Origin$ Graveyard | Destination$ Exile | ChangeType$ Card | IsCurse$ True | RememberChanged$ True


S:Mode$ Continuous | MayPlay$ True | Affected$ Land.IsRemembered | AffectedZone$ Exile | Description$ ou may play land cards exiled with CARDNAME.

S:Mode$ Continuous | MayPlay$ True | Affected$ Card.nonLand+IsRemembered | AffectedZone$ Exile | CheckSVar$ X | SVarCompare$ EG0 | Description$ You may play cards exiled with CARDNAME.

T:Mode$ ChangesZone | Origin$ Exile | Destination$ Stack | Static$ True | ValidCard$ Card.nonLand+IsRemembered | Execute$ DBTrigSpellPlayed

T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | ExcludedDestinations$ Stack | Static$ True | ValidCard$ Card.IsRemembered | Execute$ DBForget

SVar:DBTrigSpellPlayed:DB$ StoreSVar | SVar$ X | Type$ CountSVar | Expression$ X/Plus.1 | SubAbility$ DBForget

SVar:DBForget:DB$ Pump | Defined$ TriggeredCard | ForgetObjects$ TriggeredCard
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Static$ True | ValidCard$ Card.Self | Execute$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True

T:Mode$ Phase | Phase$ Cleanup | Execute$ TrigReset | Static$ True
SVar:TrigReset:DB$ StoreSVar | SVar$ X | Type$ Number | Expression$ 0
SVar:X:Number$0

SVar:Picture:http://www.wizards.com/global/images/magic/general/hedonists_trove.jpg
Oracle:When Hedonist's Trove enters the battlefield, exile all cards from target opponent's graveyard.\nYou may play land cards exiled with Hedonist's Trove.\nYou may cast nonland cards exiled with Hedonist's Trove. You can't cast more than one spell this way each turn.
PS: i didn't know if you tried it before, but did you take a look at Madness spells with xCost with getting Replicate from Djinn Illuminatus?

out.setMadness(in.isMadness());

only works for Pyromancer's Goggles works, but Replicate from Djinn Illuminatus does fizzle ...
a long investigation with debug output did show that the x-values where not set when the spell is copied though Replicate.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 06 Jun 2016, 18:24

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 friarsol » 06 Jun 2016, 19:06

Hanmac wrote:PS: i didn't know if you tried it before, but did you take a look at Madness spells with xCost with getting Replicate from Djinn Illuminatus?

out.setMadness(in.isMadness());

only works for Pyromancer's Goggles works, but Replicate from Djinn Illuminatus does fizzle ...
a long investigation with debug output did show that the x-values where not set when the spell is copied though Replicate.
You seem to be assuming that Madness is the issue, while it looks like Djinn Illuminatus is.

AB$ CopySpellAbility | Cost$ 0 | Defined$ SourceFirstSpell | Amount$ %d", magnitude)
It definitely should be copying the spell that's cast, not "SourceFirstSpell".
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 Marek14 » 07 Jun 2016, 06:51

Marek14
Tester
 
Posts: 2773
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 303 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 07 Jun 2016, 08:13

Marek14 wrote:Around half of investigate cards lacks TokenAltImage command to use all six images:

Bygone Bishop, Confirm Suspicions, Daring Sleuth, Declaration in Stone, Expose Evil, Jace's Scrutiny, Magnifying Glass, Ongoing Investigation, Tamiyo's Journal, Tireless Tracker, Trail of Evidence, Ulvenwald Mysteries
Fixed (r31275).

- Agetian
Agetian
Programmer
 
Posts: 3489
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: Bug Reports (snapshot builds)

Postby Hanmac » 07 Jun 2016, 08:44

@friarsol: i managed to fix it after a long go.
the SpellAbilityStackInstance did had the X value, but not the Card.
so i changed that the Copy in the factory does try to copy the x Value from the StackInstance if possible.

i tested it and it does work so far.

===
about the investigate, i would still have it liked more if there would be an Action/Effect where that stuff is bundled, but its okay if it works. (until new cards will broke it)
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Marek14 » 07 Jun 2016, 10:12

AI cast False Peace on itself (a strange decision by itself), but the bug is that AI skipped combat on that turn -- False Peace says that the affected player skips combat on his NEXT turn.
Marek14
Tester
 
Posts: 2773
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 303 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 07 Jun 2016, 12:33

Hanmac wrote:@friarsol: i managed to fix it after a long go.
the SpellAbilityStackInstance did had the X value, but not the Card.
so i changed that the Copy in the factory does try to copy the x Value from the StackInstance if possible.

i tested it and it does work so far.

===
about the investigate, i would still have it liked more if there would be an Action/Effect where that stuff is bundled, but its okay if it works. (until new cards will broke it)
Probably the "correct" fix was making replicate a true trigger like Cascade.

That's not how we've done things in the past, especially when it's not doing anything out of the ordinary. It's literally just creating a token. Effects should be kept very generic, a one shot effect we never see again isn't very useful.
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 Marek14 » 07 Jun 2016, 12:52

Endless Whispers causes creatures to trigger twice.
Marek14
Tester
 
Posts: 2773
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 303 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 29 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 29 users online :: 0 registered, 0 hidden and 29 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 29 guests

Login Form