Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: HLD_Prophecy on October 31, 2016, 10:28:24 am
-
Hey all, my mod is almost done and ready for beta testing!
So I've got a sequence in a mission where a ship is supposed to self-destruct. When the ship is supposed to blow up, I get this error:
Assertion Failed!
Assert: fireball_type < Num_fireball_types
File: fireballs.cpp
Line: 797
ntdll.dll! NtWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! SCP_DumpStack + 354 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! WinAssert + 194 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! fireball_create + 102 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! ship_dying_frame + 1109 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! ship_process_post + 361 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! obj_move_all_post + 718 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! obj_move_all + 428 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! game_simulation_frame + 1121 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! game_frame + 496 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! game_do_frame + 231 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! game_do_state + 403 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! gameseq_process_events + 232 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! game_main + 787 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! WinMain + 328 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! invoke_main + 30 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! __scrt_common_main_seh + 346 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! __scrt_common_main + 13 bytes
fs2_open_3_7_4_SSE2-DEBUG.exe! WinMainCRTStartup + 8 bytes
kernel32.dll! BaseThreadInitThunk + 18 bytes
ntdll.dll! RtlInitializeExceptionChain + 99 bytes
ntdll.dll! RtlInitializeExceptionChain + 54 bytes
The self-destruction works just fine in the regular, non-debug version, but the debug version crashes with this error.
I'm not sure what the problem is - am I missing a file?
Thanks!
-
Do you have a custom fireball.tbl file? Does the ship class in question have an "$Explosion Animations:" entry?
-
Do you have a custom fireball.tbl file? Does the ship class in question have an "$Explosion Animations:" entry?
Yes, it has an $Explosion Animations entry.
-
What does it say?
-
It says (4,5,6)
-
...And do you have a custom fireball.tbl to define a 7th fireball, or are you generating this error on purpose?
-
...And do you have a custom fireball.tbl to define a 7th fireball, or are you generating this error on purpose?
No, I don't have a fireball.tbl. I don't know anything about how fireballs work. Why would I be generating it on purpose?
-
...And do you have a custom fireball.tbl to define a 7th fireball, or are you generating this error on purpose?
No, I don't have a fireball.tbl. I don't know anything about how fireballs work. Why would I be generating it on purpose?
Well, because you have a ship referencing fireball ID #6 when the default fireball.tbl only defines 0-5.
-
...And do you have a custom fireball.tbl to define a 7th fireball, or are you generating this error on purpose?
No, I don't have a fireball.tbl. I don't know anything about how fireballs work. Why would I be generating it on purpose?
Well, because you have a ship referencing fireball ID #6 when the default fireball.tbl only defines 0-5.
Oh! So can I just get rid of #6 and it will work?
-
...And do you have a custom fireball.tbl to define a 7th fireball, or are you generating this error on purpose?
No, I don't have a fireball.tbl. I don't know anything about how fireballs work. Why would I be generating it on purpose?
Well, because you have a ship referencing fireball ID #6 when the default fireball.tbl only defines 0-5.
Oh! So can I just get rid of #6 and it will work?
Or just remove the "$Explosion Animations:" entry entirely because the default should be equivalent to (4, 5).
-
Okay, thanks a bunch! :)
-
How could this be converted to a proper warning? The fireballs are only parsed on mission start so we can't use that to validate the specified indices. The easiest solution would be to just convert the Assertion to an if with a Warning but it would be more convenient for the modder to do all the validation when parsing the weapons table so that the warning appears as soon as possible.