Page 1 of 1

[fixed]Scrapheap Scrounger crashes game on activate

PostPosted: 18 Oct 2017, 07:54
by drool66
Describe the Bug:
Scrapheap Scrounger crashes on resolution of its reanimate ability
Code: Select all
Assertion failed
functions/deck.c:1489
graveyard_ptr_mutable[player][position] == iid_draw_a_card
0: 0x0247CE18
1: 0x0247CF69
2: 0x024A6A7F
3: 0x023D7568
4: 0x020A710D
5: 0x024EC735
6: 0x024D745D
7: 0x024D74BF
8: 0x0249548E
9: 0x0249ABA9
10: 0x024EC735
11: 0x024D745D
12: 0x024D7BB3
13: 0x004344B2
14: 0x0043C147
15: 0x004399BD
16: 0x0047902C
17: 0x004946E9
18: 0x77458744
19: 0x77A5582D
20: 0x77A557FD
21: 0x00000000
Which card did behave improperly?
Scrapheap Scrounger

Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
Manalink dev 778ccb5 version - duel

What exactly should be the correct behavior/interaction?
No crash

Are any other cards possibly affected by this bug?
-

Re: Scrapheap Scrounger crashes game on activate

PostPosted: 20 Oct 2017, 13:59
by Aswan jaguar
The crash happens at most times not all and has to do something with it's position in graveyard it has to be on top of creatures not to crash but also another factor is true that I didn't find.
However when it doesn't crash:
a- it always vanishes the selected creature probably it replaces it with a Swamp.
b- and one time it vanished a creature and returned another to the battlefield not Scrapheap Scrounger.

Also the ability is highlighted in Rules Engine even if you don't have the appropriate mana to activate it.

Re: [part-confirmed]Scrapheap Scrounger crashes game on acti

PostPosted: 18 Mar 2020, 15:29
by Aswan jaguar
Aswan jaguar wrote:Also the ability is highlighted in Rules Engine even if you don't have the appropriate mana to activate it.
Fixed this in commit a160099.

Re: [part-confirmed]Scrapheap Scrounger crashes game on acti

PostPosted: 10 Oct 2020, 09:23
by Korath
Rules engine just records a position in a graveyard, and makes no effort whatsoever to ensure that the card that's there, and that it casts or exiles from the graveyard, is the same as the one that was there before it calls EVENT_PAY_FLASHBACK_COSTS.

And if you happen to have two copies of the card in your graveyard, gather_body_parts() makes no effort to make the correct one unpickable, it just disables the first card that happens to have the same csvid.

Also, this ability is letting you cast it from your graveyard, not putting it onto the battlefield from there.

But none of that's what crashing. The last loop in gather_body_parts() is reading past the end of its array.

Re: [fixed]Scrapheap Scrounger crashes game on activate

PostPosted: 12 Mar 2021, 00:13
by drool66
Fixed, uncommitted. Same issue as Headless Skab viewtopic.php?f=86&t=22458

Re: [fixed]Scrapheap Scrounger crashes game on activate

PostPosted: 13 Mar 2021, 12:23
by Aswan jaguar
The crash on activation has been fixed but still has issue if you select the bottom card to exile then Scrapheap Scrounger stays in grave.
Maybe the first point of what Korath says above can direct you to the problem.

Edit: the same issue reported here for Skaab Ruinator and Korath explains the bug better:
viewtopic.php?f=86&t=16411&p=199455&hilit=Skaab+Ruinator#p199455

Re: [still bug]Scrapheap Scrounger crashes game on activate

PostPosted: 13 Mar 2021, 22:47
by drool66
Fixed this in d395956