View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001981 | FSSCP | FRED | public | 2009-08-22 21:04 | 2010-02-12 07:38 |
Reporter | FUBAR-BDHR | Assigned To | karajorma | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.6.9 | ||||
Fixed in Version | 3.6.11 | ||||
Summary | 0001981: set-support-ship <any support ship class> problem | ||||
Description | While perfectly valid in FRED this causes an invalid support ship warning in FS2 WARNING: "Ship is not a support ship!" at SEXP.CPP:14338 | ||||
Additional Information | 3.6.10 Final Inferno build. Will test 3.6.11 as soon as I get a chance. Mission was in TBP Raider Wars rw08-ns.fs2. | ||||
Tags | No tags attached. | ||||
|
Confirmed in 3.6.11 r5524. Attaching debugger call stack and variables. |
2009-08-22 23:40
|
support_ship_sexp.txt (3,518 bytes)
Ship is not a support ship! ϐ|���|��&! KiFastSystemCallRet ϐ|���|��&! WaitForSingleObject + 18 bytes ثY! SCP_DumpStack + 260 bytes ثY! Warning + 430 bytes ثY! sexp_set_support_ship + 1088 bytes �wp �w�������w�F�Yx�"���J�Y! eval_sexp + 7558 bytes ثY! eval_when + 1026 bytes �wp �w�������w�F�Yx�"���J�Y! eval_sexp + 3231 bytes ثY! mission_process_event + 313 bytes ثY! mission_eval_goals + 513 bytes ثY! game_simulation_frame + 1079 bytes ���&! game_frame + 491 bytes ثY! game_do_frame + 237 bytes ثY! game_do_state + 379 bytes ثY! gameseq_process_events + 237 bytes ثY! game_main + 728 bytes ثY! WinMain + 366 bytes H"X��H��! __tmainCRTStartup + 358 bytes ثY! WinMainCRTStartup + 15 bytes ثY! RegisterWaitForInputIdle + 73 bytes fs2_open_3_6_11d_INF.exe!debug_int3(char * file=0x00dd3b8c, int line=1250) Line 760 C++ > fs2_open_3_6_11d_INF.exe!Warning(char * filename=0x00dfa74b, int line=13704, const char * format=0x00dfc908, ...) Line 1250 + 0x13 bytes C++ fs2_open_3_6_11d_INF.exe!sexp_set_support_ship(int n=488) Line 13704 + 0x28 bytes C++ fs2_open_3_6_11d_INF.exe!eval_sexp(int cur_node=483, int referenced_node=-1) Line 16907 + 0x9 bytes C++ fs2_open_3_6_11d_INF.exe!eval_when(int n=479, int use_arguments=0) Line 6785 + 0xb bytes C++ fs2_open_3_6_11d_INF.exe!eval_sexp(int cur_node=476, int referenced_node=-1) Line 16021 + 0x16 bytes C++ fs2_open_3_6_11d_INF.exe!mission_process_event(int event=2) Line 913 + 0xb bytes C++ fs2_open_3_6_11d_INF.exe!mission_eval_goals() Line 1062 + 0x9 bytes C++ fs2_open_3_6_11d_INF.exe!game_simulation_frame() Line 4277 C++ fs2_open_3_6_11d_INF.exe!game_frame(int paused=0) Line 4693 C++ fs2_open_3_6_11d_INF.exe!game_do_frame() Line 5121 + 0x7 bytes C++ fs2_open_3_6_11d_INF.exe!game_do_state(int state=2) Line 6892 C++ fs2_open_3_6_11d_INF.exe!gameseq_process_events() Line 405 + 0x14 bytes C++ fs2_open_3_6_11d_INF.exe!game_main(char * cmdline=0x0015232a) Line 7453 + 0x5 bytes C++ fs2_open_3_6_11d_INF.exe!WinMain(HINSTANCE__ * hInst=0x00400000, HINSTANCE__ * hPrev=0x00000000, char * szCmdLine=0x0015232a, int nCmdShow=10) Line 7527 + 0x9 bytes C++ fs2_open_3_6_11d_INF.exe!__tmainCRTStartup() Line 263 + 0x2c bytes C fs2_open_3_6_11d_INF.exe!WinMainCRTStartup() Line 182 C kernel32.dll!7c817067() [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] Locals: - filename 0x00dfa74b "sexp.cpp" char * 115 's' char line 13704 int - format 0x00dfc908 "Ship %s is not a support ship!" const char * 83 'S' const char result 6 int + assertString "Ship is not a support ship! ϐ|���|��&! KiFastSystemCallRet ϐ|���|��&! WaitForSingleObject + 18 bytes ثY! SCP_DumpStack + 260 bytes ثY! Warning + 430 bytes ثY! sexp_set_support_ship + 1088 bytes �wp �w�������w�F�Yx�"���J�Y! eval_sexp + 7558 bytes ثY! eval_when + 1026 bytes �wp �w�������w�F�Yx�"���J�Y! eval_sexp + 3231 bytes std::basic_string<char,std::char_traits<char>,std::allocator<char> > + callStack {m_stackFrames={...} } SCP_DebugCallStack i 28 int slen 28 int + args 0x00000000 <Bad Ptr> char * Autos: + AssertText2 0x01007aa8 "Warning: Ship is not a support ship! File: sexp.cpp Line: 13704 " char [1024] Dump_to_log true bool + dumpBuffer {buffer=0x010100b0 "" current=0x010100b0 "" } DumpBuffer + dumpBuffer.buffer 0x010100b0 "" char [32000] flags 69632 unsigned int result 6 int |
2009-08-23 04:21
|
1981.diff (491 bytes)
Index: parse/sexp.cpp =================================================================== --- parse/sexp.cpp (revision 5529) +++ parse/sexp.cpp (working copy) @@ -13699,7 +13699,7 @@ Warning(LOCATION, "Support ship class '%s' not found.\n", CTEXT(n)); return; } - if (!(Ship_info[temp_val].flags & SIF_SUPPORT)) + if ((temp_val >= 0) && !(Ship_info[temp_val].flags & SIF_SUPPORT)) { Warning(LOCATION, "Ship %s is not a support ship!", Ship_info[temp_val].name); return; |
|
After looking at this it seems the problem is that the code checks for <any support ship class> then the next check looks up to see if <any support ship class> is flagged as a support ship. Seems to be fixed by simply checking to see if temp_val >= 0 when checking for the support ship flag. .diff attached. |
|
The fix is correct and solves the issue partially but it doesn't get over the fact that <any support ship class> doesn't actually mean any support ship class. It just simply sets the class to -1 and then allows the code to simply pick the one that is the same species as the player. |
|
Replaced <any support ship class> with <species support ship class> which is what the code does anyway. |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-08-22 21:04 | FUBAR-BDHR | New Issue | |
2009-08-22 23:40 | FUBAR-BDHR | Note Added: 0011149 | |
2009-08-22 23:40 | FUBAR-BDHR | File Added: support_ship_sexp.txt | |
2009-08-23 04:21 | FUBAR-BDHR | File Added: 1981.diff | |
2009-08-23 04:24 | FUBAR-BDHR | Note Added: 0011150 | |
2009-08-26 06:49 | karajorma | Status | new => assigned |
2009-08-26 06:49 | karajorma | Assigned To | => karajorma |
2009-08-26 09:05 | karajorma | Note Added: 0011163 | |
2010-02-12 07:38 | karajorma | Note Added: 0011654 | |
2010-02-12 07:38 | karajorma | Status | assigned => resolved |
2010-02-12 07:38 | karajorma | Fixed in Version | => 3.6.11 |
2010-02-12 07:38 | karajorma | Resolution | open => fixed |