It is currently 08 Jul 2025, 12:51
   
Text Size

[fixed]Bad parameters - validate counterslell crashes game

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

[fixed]Bad parameters - validate counterslell crashes game

Postby Althuna » 29 May 2024, 18:47

Error message said to include dump.txt so I did. I also have the savegame just as the AI uses whatever card causes it.
Attachments
New WinRAR ZIP archive.zip
(5.28 KiB) Downloaded 179 times
Last edited by Aswan jaguar on 29 Jun 2024, 09:57, edited 3 times in total.
Reason: fixed - retitled
Althuna
 
Posts: 478
Joined: 26 Jul 2011, 00:23
Has thanked: 100 times
Been thanked: 17 times

Re: [confirmed]Bad parameters crashes game

Postby Aswan jaguar » 30 May 2024, 13:17

I can't find out what is happening maybe drool66 can find out from the dump.text.
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8129
Joined: 13 May 2010, 12:17
Has thanked: 748 times
Been thanked: 477 times

Re: [confirmed]Bad parameters crashes game

Postby Althuna » 30 May 2024, 16:16

I think the card is Expansion/Explosion. Or at least I had the same error with that card in another game although the game continued. I attached a save for that too.
Attachments
New WinRAR ZIP archive.zip
(4.25 KiB) Downloaded 188 times
Althuna
 
Posts: 478
Joined: 26 Jul 2011, 00:23
Has thanked: 100 times
Been thanked: 17 times

Re: [confirmed]Bad parameters crashes game

Postby drool66 » 31 May 2024, 19:27

The issue is in counterspell_validate(), which is indeed called from Expansion/Explosion. It doesn't check parameters before calling get_card_instance() to check STATE_INVISIBLE

Aswan jaguar, I'm still a little in the weeds with my trigger card changes; would you be able to fix and apply this? I think the change would probably be to change the following line in counterspell_validate():
Code: Select all
   if (!valid || !(get_card_instance(instance->targets[target_num].player, instance->targets[target_num].card)->state & STATE_INVISIBLE)){
to:
Code: Select all
   if (!valid || (instance->targets[target_num].card > -1 && !(get_card_instance(instance->targets[target_num].player, instance->targets[target_num].card)->state & STATE_INVISIBLE))){
edit: fix syntax
User avatar
drool66
Programmer
 
Posts: 1185
Joined: 25 Nov 2010, 22:38
Has thanked: 187 times
Been thanked: 280 times

Re: [confirmed]Bad parameters crashes game

Postby Aswan jaguar » 02 Jun 2024, 08:10

I can commit the change of course but I can't make any tests as counterspells are broken in dev and will crash. If that's not an issue I can proceed.
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8129
Joined: 13 May 2010, 12:17
Has thanked: 748 times
Been thanked: 477 times

Re: [confirmed]Bad parameters crashes game

Postby Aswan jaguar » 28 Jun 2024, 12:50

Fixed by drool66 in commit 08b94da ("Param check in counterspell_validate()", 2024-06-10).
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8129
Joined: 13 May 2010, 12:17
Has thanked: 748 times
Been thanked: 477 times


Return to Pending Reports

Who is online

Users browsing this forum: No registered users and 2 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 5050 on 26 Jun 2025, 06:02

Users browsing this forum: No registered users and 2 guests

Login Form