[confirmed]Moonlit Strider bad parameter & crash to desktop.
Report wrong Card behavior to get it fixed.
PLEASE ADD SAVEGAMES TO YOUR TOPIC !
PLEASE ADD SAVEGAMES TO YOUR TOPIC !
Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins
[confirmed]Moonlit Strider bad parameter & crash to desktop.
by etphonehome » 06 Oct 2021, 17:45
Another bad parameter alert and crash to desktop.
THX
THX
- Attachments
-
AUTOSAVE.rar
- (1.93 KiB) Downloaded 314 times
-
dump.rar
- (225 Bytes) Downloaded 361 times
Last edited by Aswan jaguar on 10 Oct 2021, 07:25, edited 4 times in total.
Reason: confirmed
Reason: confirmed
- etphonehome
- Posts: 307
- Joined: 21 May 2020, 12:50
- Has thanked: 281 times
- Been thanked: 46 times
Re: Another bad parameter alert and crash to desktop.
by Aswan jaguar » 07 Oct 2021, 13:36
AI doesn't like something in Moonlit Strider code, and it is not that it doesn't validate it's target. If there is another creature in AI's battlefield and AI has in hand Moonlit Strider and tries to cast it, crash.
---
Trying to squash some bugs and playtesting.
Trying to squash some bugs and playtesting.
-
Aswan jaguar - Super Tester Elite
- Posts: 8129
- Joined: 13 May 2010, 12:17
- Has thanked: 748 times
- Been thanked: 477 times
Re: [confirmed]Another bad parameter alert and crash to desk
by Korath » 07 Oct 2021, 17:01
The dump file in the attached rar isn't anything like the one in your screenshot.
-
Korath - DEVELOPER
- Posts: 3708
- Joined: 02 Jun 2013, 05:57
- Has thanked: 496 times
- Been thanked: 1108 times
Re: [confirmed]Another bad parameter alert and crash to desk
by etphonehome » 07 Oct 2021, 17:55
After this alert i think it gave another alert and crashed.
- etphonehome
- Posts: 307
- Joined: 21 May 2020, 12:50
- Has thanked: 281 times
- Been thanked: 46 times
Re: [confirmed]Another bad parameter alert and crash to desk
by drool66 » 07 Oct 2021, 18:01
It's my fault -
markup of is_this_dying(): "this should be checked only during EVENT_GRAVEYARD_FROM_PLAY to be realiable"
me: checks it during TRIGGER_LEAVE_PLAY
EDIT: Oh, ok. Moonlit Strider's EVENT_RESOLVE_ACTIVATION tries to pump ability using the parent as the source... on an ability that sacrifices the parent. That will give you a bad param. Fixed
markup of is_this_dying(): "this should be checked only during EVENT_GRAVEYARD_FROM_PLAY to be realiable"
me: checks it during TRIGGER_LEAVE_PLAY
EDIT: Oh, ok. Moonlit Strider's EVENT_RESOLVE_ACTIVATION tries to pump ability using the parent as the source... on an ability that sacrifices the parent. That will give you a bad param. Fixed
The latest images for Manalink will be here.
The latest Manalink installation directory will be here. Well, not quite, anymore. Check the latest patches.
The latest Manalink installation directory will be here. Well, not quite, anymore. Check the latest patches.
-
drool66 - Programmer
- Posts: 1185
- Joined: 25 Nov 2010, 22:38
- Has thanked: 187 times
- Been thanked: 280 times
Re: [fixed]Another bad parameter alert and crash to desktop.
by Aswan jaguar » 07 Oct 2021, 20:12
For me with below code if you didn't change anything else it dumps and crashes.
- error | Open
- bad parameters
get_card_instance(24254622, 24254622)
0: 0x025B2218
1: 0x025B8CCE
2: 0x025C91EB
3: 0x0043467C
4: 0x0043C147
5: 0x004399BD
6: 0x0047902C
7: 0x004946E9
8: 0x7C80B729
- Code: Select all
int card_moonlit_strider(int player, int card, event_t event){
/* CARD_ID_MOONLIT_STRIDER 7521
Moonlit Strider |3|W
Creature - Spirit 1/4
Sacrifice ~: Target creature you control gains protection from the color of your choice until end of turn.
Soulshift 3 (When this creature dies, you may return target Spirit card with converted mana cost 3 or less from your graveyard to your hand.)*/
if( ! IS_GAA_EVENT(event) ){
return soulshift(player, card, event, 3, 1);
}
target_definition_t td;
default_target_definition(player, card, &td, TYPE_CREATURE );
td.preferred_controller = td.allowed_controller = player;
card_instance_t *instance = get_card_instance( player, card );
if( event == EVENT_CAN_ACTIVATE || event == EVENT_ACTIVATE ){
return generic_activated_ability(player, card, event, GAA_CAN_TARGET | GAA_SACRIFICE_ME | GAA_LITERAL_PROMPT, MANACOST0, 0,
&td, "Select target creature you control.");
}
if( event == EVENT_RESOLVE_ACTIVATION ){
if( valid_target(&td) ){
pump_ability_until_eot(player, card, instance->targets[0].player, instance->targets[0].card,
0, 0, select_a_protection(player) | KEYWORD_RECALC_SET_COLOR, 0);
}
}
return 0;
}
---
Trying to squash some bugs and playtesting.
Trying to squash some bugs and playtesting.
-
Aswan jaguar - Super Tester Elite
- Posts: 8129
- Joined: 13 May 2010, 12:17
- Has thanked: 748 times
- Been thanked: 477 times
Re: [fixed]Another bad parameter alert and crash to desktop.
by drool66 » 07 Oct 2021, 20:37
You also have to make a change in leaves_play() - that's the part that's my fault. Try moving the lines:
- Code: Select all
if( is_this_dying(player, card) && check_for_death_trigger_removal(player, card) && can_be_suppressed )
return 0;
The latest images for Manalink will be here.
The latest Manalink installation directory will be here. Well, not quite, anymore. Check the latest patches.
The latest Manalink installation directory will be here. Well, not quite, anymore. Check the latest patches.
-
drool66 - Programmer
- Posts: 1185
- Joined: 25 Nov 2010, 22:38
- Has thanked: 187 times
- Been thanked: 280 times
Re: [fixed]Another bad parameter alert and crash to desktop.
by Korath » 07 Oct 2021, 21:01
Pretty sure the root problem here is that you can reactivate the strider an arbitrary number of times in response to its own soulshift trigger.
Why are you always triggering on TRIGGER_LEAVE_PLAY in legacy_effect_pump_ability_until_eot(), anyway, instead of just when the effect's configured to do something when the source or affected object leaves the bf?
Why are you always triggering on TRIGGER_LEAVE_PLAY in legacy_effect_pump_ability_until_eot(), anyway, instead of just when the effect's configured to do something when the source or affected object leaves the bf?
-
Korath - DEVELOPER
- Posts: 3708
- Joined: 02 Jun 2013, 05:57
- Has thanked: 496 times
- Been thanked: 1108 times
Re: [fixed]Another bad parameter alert and crash to desktop.
by drool66 » 08 Oct 2021, 00:11
Do you mean instead of this:Why are you always triggering on TRIGGER_LEAVE_PLAY in legacy_effect_pump_ability_until_eot(), anyway, instead of just when the effect's configured to do something when the source or affected object leaves the bf?
- Code: Select all
leaves_play(instance->targets[6].player, instance->targets[6].card, event, 0, 0);
if( event == EVENT_LEAVES_PLAY_ABILITY && ((instance->targets[3].player & PAUE_END_IF_SOURCE_UNTAP ) || (instance->targets[3].player & PAUE_END_IF_SOURCE_LEAVES_PLAY ))){
end_effect = 1;
}
- Code: Select all
if( ((instance->targets[3].player & PAUE_END_IF_SOURCE_UNTAP ) || (instance->targets[3].player & PAUE_END_IF_SOURCE_LEAVES_PLAY )) ){
leaves_play(instance->targets[6].player, instance->targets[6].card, event, 0, 0);
if( event == EVENT_LEAVES_PLAY_ABILITY ){
end_effect = 1;
}
}
The latest images for Manalink will be here.
The latest Manalink installation directory will be here. Well, not quite, anymore. Check the latest patches.
The latest Manalink installation directory will be here. Well, not quite, anymore. Check the latest patches.
-
drool66 - Programmer
- Posts: 1185
- Joined: 25 Nov 2010, 22:38
- Has thanked: 187 times
- Been thanked: 280 times
Re: [confirmed]Moonlit Strider bad parameter & crash to desk
by Aswan jaguar » 03 Apr 2022, 17:46
Any news on this?
---
Trying to squash some bugs and playtesting.
Trying to squash some bugs and playtesting.
-
Aswan jaguar - Super Tester Elite
- Posts: 8129
- Joined: 13 May 2010, 12:17
- Has thanked: 748 times
- Been thanked: 477 times
Re: [confirmed]Moonlit Strider bad parameter & crash to desk
by drool66 » 04 Apr 2022, 02:55
I'll commit the changes to legacy_effect_pump_ability_until_eot() soon. The others snuck in under my nose in d693305. I believe it's fixed.
The latest images for Manalink will be here.
The latest Manalink installation directory will be here. Well, not quite, anymore. Check the latest patches.
The latest Manalink installation directory will be here. Well, not quite, anymore. Check the latest patches.
-
drool66 - Programmer
- Posts: 1185
- Joined: 25 Nov 2010, 22:38
- Has thanked: 187 times
- Been thanked: 280 times
11 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 15 guests