It is currently 11 Jun 2025, 00:08
   
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 Agetian » 20 Nov 2016, 04:53

fmartel wrote:Description: [After modifying lands for FullArt Lands, Started a game]

RuntimeException | Open
Code: Select all
Forge Version:    1.5.58-SNAPSHOT-r32572
Operating System: Windows 7 6.1 amd64
Java Version:     1.8.0_25 Oracle Corporation

java.lang.RuntimeException: TriggerFactory Parsing Error in registerTrigger() : Split length of TriggerDescription$ is not 2.
   at forge.game.trigger.TriggerHandler.parseParams(TriggerHandler.java:191)
   at forge.game.trigger.TriggerHandler.parseTrigger(TriggerHandler.java:145)
   at forge.game.card.CardFactory.readCardFace(CardFactory.java:446)
   at forge.game.card.CardFactory.readCard(CardFactory.java:406)
   at forge.game.card.CardFactory.getCard(CardFactory.java:254)
   at forge.game.card.CardFactory.getCard(CardFactory.java:249)
   at forge.game.card.Card.fromPaperCard(Card.java:6883)
   at forge.game.Match.preparePlayerLibrary(Match.java:193)
   at forge.game.Match.prepareAllZones(Match.java:257)
   at forge.game.Match.startGame(Match.java:83)
   at forge.match.HostedMatch$2.run(HostedMatch.java:220)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
I tried reproducing this but couldn't. Can you please post the exact steps you're taking to trigger this error? It would be very helpful if you posted your decklist before and after the modification, too.

- Agetian
Agetian
Programmer
 
Posts: 3487
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby Hanmac » 20 Nov 2016, 04:56

Agetian wrote:
fmartel wrote:Description: [After modifying lands for FullArt Lands, Started a game]

RuntimeException | Open
Code: Select all
Forge Version:    1.5.58-SNAPSHOT-r32572
Operating System: Windows 7 6.1 amd64
Java Version:     1.8.0_25 Oracle Corporation

java.lang.RuntimeException: TriggerFactory Parsing Error in registerTrigger() : Split length of TriggerDescription$ is not 2.
   at forge.game.trigger.TriggerHandler.parseParams(TriggerHandler.java:191)
   at forge.game.trigger.TriggerHandler.parseTrigger(TriggerHandler.java:145)
   at forge.game.card.CardFactory.readCardFace(CardFactory.java:446)
   at forge.game.card.CardFactory.readCard(CardFactory.java:406)
   at forge.game.card.CardFactory.getCard(CardFactory.java:254)
   at forge.game.card.CardFactory.getCard(CardFactory.java:249)
   at forge.game.card.Card.fromPaperCard(Card.java:6883)
   at forge.game.Match.preparePlayerLibrary(Match.java:193)
   at forge.game.Match.prepareAllZones(Match.java:257)
   at forge.game.Match.startGame(Match.java:83)
   at forge.match.HostedMatch$2.run(HostedMatch.java:220)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
I tried reproducing this but couldn't. Can you please post the exact steps you're taking to trigger this error?

- Agetian
A new line which shouldn't be there.
Fixed in r32575
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Hanmac » 20 Nov 2016, 20:36

hm i found a big problem that has something (all) to do with my Trigger Rewrites.

This is the Problem:

a Graft Creature, and then TWO creatures does enter the Battlefield at the same time. like with fabricate 2.

the first thing i noticed that the StackDescription was the same, and if i Apply the effect only one token gets all counters.

=> there is something wrong with he TriggeredObjects

after some looking:
==> While the Trigger does create new WrappedAbility Objects, the Ability Object stays the same when if its a Overwriting Ability
==> For most Trigger its not the problem, but if the Trigger uses TriggeredObjects they are overwritten.

===
@Anyone an idea what would be the best way to fix that?
i think the most easy way would be to clone the Overwriting Ability (and need to make AbilitySub Cloneable for that)

i also played with the test of storing the objects inside of the WrappedAbility instead of the RootAbility, but then i need a good way to get the WrappedAbility from inside a normal SpellAbility or inside of AbilityUtils.

same Problems might happen for Targets -.-
an idea to fix that without breaking more?
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 20 Nov 2016, 22:04

What were you even trying to fix to begin with? It sounds like you messed up SpellAbilityStackInstance to not keep track of the appropriate instances. Maybe the tracking of restoring from that got messed up with whatever you changed?
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 » 21 Nov 2016, 02:50

Hm no the StackInstance does still work. Hm I try to Show it with a graphic:

If i use "OverwritingAbility" this does happen because it is not copied:

Stack
= Si1
== WA1
=== T (WrappedAbility does point to Trigger)
=== A (WrappedAbility does point to Ability)
= Si2
== WA2
=== T
=== A

WrappedAbility does point to the same Trigger Object, which isn't much of a problem. (It set TriggeredSA twice but good that it's not used often)

But because it does point to the same Ability inside, the moment when the Trigger does set the Triggering Object it does overwrite the previous one.
And WrappedAbility also has no own objects but point to the Ability ones.

===
In my changes with doing Keywords i did use OverwritingAbility to reduce the amount of SVars to be set, to prevent colliding.
(Hm if the amount of objects can be reduced too it would be fine too)


===
Edit:
I fixed this with making AbilitySub cloneable. might maybe not the best way in the end, but its the easiest way to do it without changing to much around.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Marek14 » 21 Nov 2016, 16:19

Description: Delayed trigger from Goryo's Vengeance

NullPointerException | Open
Code: Select all
Forge Version:    1.5.58-SNAPSHOT-r32588
Operating System: Windows 8.1 6.3 amd64
Java Version:     1.8.0_45 Oracle Corporation

java.lang.NullPointerException
   at forge.game.trigger.TriggerHandler.runSingleTrigger(TriggerHandler.java:560)
   at forge.game.trigger.TriggerHandler.runNonStaticTriggersForPlayer(TriggerHandler.java:425)
   at forge.game.trigger.TriggerHandler.runWaitingTrigger(TriggerHandler.java:358)
   at forge.game.trigger.TriggerHandler.runTrigger(TriggerHandler.java:280)
   at forge.game.phase.PhaseHandler.onPhaseBegin(PhaseHandler.java:382)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:977)
   at forge.game.GameAction.startGame(GameAction.java:1462)
   at forge.game.Match.startGame(Match.java:95)
   at forge.match.HostedMatch$2.run(HostedMatch.java:220)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Marek14
Tester
 
Posts: 2772
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 302 times

Re: Bug Reports (snapshot builds)

Postby fmartel » 21 Nov 2016, 19:14

Description: [In commander, Attacking AI with (4*) Spawnwrithe, (1*) Bloodspore Thrinax. one of the Spawnwrithe (#88) is equip with Sword of the Animist. Sword trigger works. AI Assigned Lead Golem to block #88, Gustcloak Runner to block the Thrinax, Vodalian Mage to block Spawnwrithe (940), Arcbound Stigner to block #783. Crash comes at CD phase]

NullPointerException | Open
Code: Select all
Forge Version:    1.5.58-SNAPSHOT-r32588
Operating System: Windows 7 6.1 amd64
Java Version:     1.8.0_25 Oracle Corporation

java.lang.NullPointerException
   at forge.game.trigger.TriggerHandler.runSingleTrigger(TriggerHandler.java:560)
   at forge.game.trigger.TriggerHandler.runNonStaticTriggersForPlayer(TriggerHandler.java:416)
   at forge.game.trigger.TriggerHandler.runWaitingTrigger(TriggerHandler.java:362)
   at forge.game.trigger.TriggerHandler.runWaitingTriggers(TriggerHandler.java:307)
   at forge.game.GameAction.checkStateEffects(GameAction.java:872)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:907)
   at forge.game.GameAction.startGame(GameAction.java:1462)
   at forge.game.Match.startGame(Match.java:95)
   at forge.match.HostedMatch$2.run(HostedMatch.java:220)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
fmartel
 
Posts: 281
Joined: 31 Dec 2013, 19:27
Location: Québec City
Has thanked: 8 times
Been thanked: 4 times

Re: Bug Reports (snapshot builds)

Postby RollingMan » 24 Nov 2016, 16:51

Description: Casting Nourishing Shoal using alternate cost (exiling Worldspine Wurm from hand), splicing Desperate Ritual x2 onto it using floating red mana. Error happened during resolution of spell. Started with 13 life and 4 red mana, ended with 24 life and 3 red mana, so the lifegain and one of the rituals seems to have resolved, while the second ritual did not.

Don't judge my love of Grishoalbrand! :oops: :mrgreen:

NullPointerException | Open
Code: Select all
Forge Version:    1.5.58-SNAPSHOT-r-1
Operating System: Windows 7 6.1 amd64
Java Version:     1.8.0_111 Oracle Corporation

java.lang.NullPointerException
   at forge.game.ability.effects.ManaEffect.resolve(ManaEffect.java:37)
   at forge.game.spellability.AbilitySub.resolve(AbilitySub.java:119)
   at forge.game.ability.AbilityUtils.resolveApiAbility(AbilityUtils.java:1295)
   at forge.game.ability.AbilityUtils.resolveSubAbilities(AbilityUtils.java:1288)
   at forge.game.ability.AbilityUtils.resolveApiAbility(AbilityUtils.java:1302)
   at forge.game.ability.AbilityUtils.resolveSubAbilities(AbilityUtils.java:1288)
   at forge.game.ability.AbilityUtils.resolveApiAbility(AbilityUtils.java:1302)
   at forge.game.ability.AbilityUtils.resolve(AbilityUtils.java:1276)
   at forge.game.zone.MagicStack.resolveStack(MagicStack.java:521)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:980)
   at forge.game.GameAction.startGame(GameAction.java:1462)
   at forge.game.Match.startGame(Match.java:95)
   at forge.match.HostedMatch$2.run(HostedMatch.java:220)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
RollingMan
 
Posts: 6
Joined: 21 Feb 2016, 10:00
Has thanked: 0 time
Been thanked: 0 time

Re: Bug Reports (snapshot builds)

Postby leshrac » 24 Nov 2016, 20:46

r32590:
There is no Miracle trigger any more (at least for Terminus, most likely for every card with Miracle). Instead you just get asked to pay the Miracle casting cost after you draw it.
leshrac
 
Posts: 33
Joined: 31 Dec 2014, 00:05
Has thanked: 2 times
Been thanked: 0 time

Re: Bug Reports (snapshot builds)

Postby Hanmac » 24 Nov 2016, 21:10

leshrac wrote:r32590:
There is no Miracle trigger any more (at least for Terminus, most likely for every card with Miracle). Instead you just get asked to pay the Miracle casting cost after you draw it.
i did rewrote Miracle to make it understandable for the AI
for that i make the trigger Static because of the ruling:

702.93a Miracle is a static ability linked to a triggered ability (see rule 603.11). “Miracle [cost]” means “You may reveal this card from your hand as you draw it if it’s the first card you’ve drawn this turn. When you reveal this card this way, you may cast it by paying [cost] rather than its mana cost.”
does't it say that its static?

it might be not 100% perfect, but its better than it was before.

imo the Reveal might need to be add to the trigger. (but the AI should not reveal if it doesn't plan to cast it)

but i currently have other places i need to work over.
(like the thing with Splice Into and the Cumulative Upkeep Cost)
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 25 Nov 2016, 04:47

Hanmac wrote:
702.93a Miracle is a static ability linked to a triggered ability (see rule 603.11). “Miracle [cost]” means “You may reveal this card from your hand as you draw it if it’s the first card you’ve drawn this turn. When you reveal this card this way, you may cast it by paying [cost] rather than its mana cost.”
does't it say that its static?
Umm actually not quite, as far as I understand. It's a bit tricky, but from what I've read here:
http://www.mtgthesource.com/forums/show ... r-in-depth
And here:
http://mtgsalvation.gamepedia.com/Miracle (the "Rulings" subsection)
the "you may reveal this card" part of the Miracle is static, while the "you may play the spell for its miracle cost" part is triggered (and thus needs to go on a stack as a trigger). That first link particularly demonstrates the Terminus case. Once again, the entire interaction of a "static ability linked to a triggered ability" (which Miracle happens to be) is a little bit tricky, so if I'm missing something or misunderstanding something here, further input from someone well acquainted with the relevant portion of MTG rules is welcome. :D

- Agetian
Agetian
Programmer
 
Posts: 3487
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby Hanmac » 25 Nov 2016, 06:03

@Agetian: okay so its a bit more trickier than i thought :/

okay first: the Drawn-Trigger should be static, but it should have a Reveal Effect (with "Miracle$ True" or "Miracle$ Cost")

then there should be a new non-static Trigger with Revealed (doesn't exist yet) with then get the Play Effect.

and then there need to be some logic in RevealAi to check for the Miracle Cost and if the AI does want to play it.

===
i will look at the Weekend if i can do something like that.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby leshrac » 25 Nov 2016, 17:29

I think the last post got it right, that should be how Miracle works. It didn't work perfect in older versions either, one thing i can remember: Terminus was still castable with Miracle cost with Gaddock Teeg on the board, that should not be possible.

Another bug, probably older:

r32590: The trigger from Bridge from Below should check on resolution if it is still in the graveyard, and only then you should get the zombie token. That doesn't happen, you get the zombies even if it got exiled with the trigger on the stack.
leshrac
 
Posts: 33
Joined: 31 Dec 2014, 00:05
Has thanked: 2 times
Been thanked: 0 time

Re: Bug Reports (snapshot builds)

Postby Hanmac » 26 Nov 2016, 14:06

RollingMan wrote:Description: Casting Nourishing Shoal using alternate cost (exiling Worldspine Wurm from hand), splicing Desperate Ritual x2 onto it using floating red mana. Error happened during resolution of spell. Started with 13 life and 4 red mana, ended with 24 life and 3 red mana, so the lifegain and one of the rituals seems to have resolved, while the second ritual did not.

Don't judge my love of Grishoalbrand! :oops: :mrgreen:

NullPointerException | Open
Code: Select all
Forge Version:    1.5.58-SNAPSHOT-r-1
Operating System: Windows 7 6.1 amd64
Java Version:     1.8.0_111 Oracle Corporation

java.lang.NullPointerException
   at forge.game.ability.effects.ManaEffect.resolve(ManaEffect.java:37)
   at forge.game.spellability.AbilitySub.resolve(AbilitySub.java:119)
   at forge.game.ability.AbilityUtils.resolveApiAbility(AbilityUtils.java:1295)
   at forge.game.ability.AbilityUtils.resolveSubAbilities(AbilityUtils.java:1288)
   at forge.game.ability.AbilityUtils.resolveApiAbility(AbilityUtils.java:1302)
   at forge.game.ability.AbilityUtils.resolveSubAbilities(AbilityUtils.java:1288)
   at forge.game.ability.AbilityUtils.resolveApiAbility(AbilityUtils.java:1302)
   at forge.game.ability.AbilityUtils.resolve(AbilityUtils.java:1276)
   at forge.game.zone.MagicStack.resolveStack(MagicStack.java:521)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:980)
   at forge.game.GameAction.startGame(GameAction.java:1462)
   at forge.game.Match.startGame(Match.java:95)
   at forge.match.HostedMatch$2.run(HostedMatch.java:220)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
fixed in r32602. while rewriting i make a problem with the last of the Spliced abilities. now it works again.

===

IMO we should rewrite some of the Spliced logic,
Currently its to difficult to select which cards do you want to splice into it.

what i would like is such a "Choose Cards" selection where you can also Order it how you want it. (it shouldn't make such a big difference, but it can be important for some tiny cases)

I need to see how the code can be changed that way.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby fmartel » 27 Nov 2016, 18:35

Game froze after killing opponent with Sword of Body and Mind
fmartel
 
Posts: 281
Joined: 31 Dec 2013, 19:27
Location: Québec City
Has thanked: 8 times
Been thanked: 4 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: Google [Bot] and 20 guests


Who is online

In total there are 21 users online :: 1 registered, 0 hidden and 20 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: Google [Bot] and 20 guests

Login Form