[fixed] Temple Altisaur? Bad parameters
Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins
[fixed] Temple Altisaur? Bad parameters
by Wally » 14 Oct 2020, 05:07
Describe the Bug:
Bad parameters generated, last action was casting Temple Altisaur, several paramaters windows opened, play was able to continue after closing them
Which card behaved improperly?
Temple Altisaur ?
Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
version 8-2020 a62926f, duel
bad parameters
get_card_instance(0, -1)
0: 0x0253E188
1: 0x024F2B3E
2: 0x025370CE
3: 0x0254E415
4: 0x0252B97D
5: 0x0252BA27
6: 0x025333F7
7: 0x02533364
8: 0x0212809C
9: 0x0254E415
10: 0x0252B97D
11: 0x0252C4BE
12: 0x00435A13
13: 0x004770E3
14: 0x004B361F
15: 0x0043CD3D
16: 0x004399BD
17: 0x0047902C
18: 0x004946E9
19: 0x76D06359
20: 0x76EF7C24
21: 0x76EF7BF4
Bad parameters generated, last action was casting Temple Altisaur, several paramaters windows opened, play was able to continue after closing them
Which card behaved improperly?
Temple Altisaur ?
Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
version 8-2020 a62926f, duel
bad parameters
get_card_instance(0, -1)
0: 0x0253E188
1: 0x024F2B3E
2: 0x025370CE
3: 0x0254E415
4: 0x0252B97D
5: 0x0252BA27
6: 0x025333F7
7: 0x02533364
8: 0x0212809C
9: 0x0254E415
10: 0x0252B97D
11: 0x0252C4BE
12: 0x00435A13
13: 0x004770E3
14: 0x004B361F
15: 0x0043CD3D
16: 0x004399BD
17: 0x0047902C
18: 0x004946E9
19: 0x76D06359
20: 0x76EF7C24
21: 0x76EF7BF4
- Attachments
-
AUTOSAVE.zip
- (3.78 KiB) Downloaded 135 times
Last edited by drool66 on 17 Oct 2020, 16:24, edited 2 times in total.
Reason: fixed
Reason: fixed
- Wally
- Posts: 234
- Joined: 05 Mar 2009, 04:39
- Location: Australia
- Has thanked: 2 times
- Been thanked: 17 times
Re: Temple Altisaur? Bad parameters
by drool66 » 16 Oct 2020, 21:02
Hard to tell since the error chain appears inconsistently and the dump is unhelpful in the current dev, but it does seem to be linked to Temple Altisaur. The card uses the conventional method for these type of events, but I did add a check for affected_card_controller > -1 && affected_card > -1, plus damage->damage_target_player > -1 && damage->damage_target_card > -1; will push soon
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] Temple Altisaur? Bad parameters
by Korath » 16 Oct 2020, 21:31
affected_card_controller/affected_card aren't going to be a problem. (And the check that they're a damage card is redundant; EVENT_PREVENT_DAMAGE is only dispatched for those.) What's likely crashing is the has_subtype() call when the damage card is attached to a player - and, indeed, I can reliably crash by Shock'ing myself with a Temple Altisaur on the bf. Check damage->damage_target_card != -1 instead.
...You are keeping the .dbg file for your release builds, right? There isn't any point in asking people to post dumps otherwise.
...You are keeping the .dbg file for your release builds, right? There isn't any point in asking people to post dumps otherwise.
-
Korath - DEVELOPER
- Posts: 3708
- Joined: 02 Jun 2013, 05:57
- Has thanked: 496 times
- Been thanked: 1108 times
Re: [confirmed] Temple Altisaur? Bad parameters
by drool66 » 16 Oct 2020, 22:50
Yep! Figured the has_subtype() damage_target_player/card out later & edited my post. Everything seems to run smoothly now.
EDIT: Would it make sense to add a "if( card < 0 ) return 0;" to the top of has_subtype(), or do you think it would be better to leave as is so that we are more sure to code our cards better?
EDIT: Would it make sense to add a "if( card < 0 ) return 0;" to the top of has_subtype(), or do you think it would be better to leave as is so that we are more sure to code our cards better?
Oh my gosh, that's what those are for. I had no idea. Will do....You are keeping the .dbg file for your release builds, right? There isn't any point in asking people to post dumps otherwise.
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] Temple Altisaur? Bad parameters
by Korath » 17 Oct 2020, 00:50
This is the sort of thing that hides bugs instead of preventing them. Think about what would've happened if that had been in place, and the next card you programmed read something like "If a source would deal damage to another non-Dinosaur you control, prevent all but 1 of that damage."drool66 wrote:Would it make sense to add a "if( card < 0 ) return 0;" to the top of has_subtype(), or do you think it would be better to leave as is so that we are more sure to code our cards better?
What this calls for isn't returning 0 if player or card are invalid; it's ASSERT()ing that they are.
-
Korath - DEVELOPER
- Posts: 3708
- Joined: 02 Jun 2013, 05:57
- Has thanked: 496 times
- Been thanked: 1108 times
Re: [confirmed] Temple Altisaur? Bad parameters
by drool66 » 17 Oct 2020, 02:02
What I figured, thank you.
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] Temple Altisaur? Bad parameters
by drool66 » 18 Oct 2020, 03:25
Committed in c323d59
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
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 41 guests