View Issue Details

IDProjectCategoryView StatusLast Update
0002042FSSCP---------public2009-11-26 17:18
ReporterFUBAR-BDHR Assigned Toportej05  
PriorityhighSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.11 
Target Version3.6.12 RC1Fixed in Version3.6.11 
Summary0002042: Standalones using mods will not run at all from launcher
DescriptionUpdated the standalones to 5666 today. Running from F5 I have no problems. Running from the launcher errors out but only if a mod is enabled. Here's the error, call stack and variables.
Additional InformationERANGE: String error. Please Report.
Trying to put into 128 byte buffer:
C:\Program Files\The Babylon Project\
ÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝ\
<no module>! KiFastSystemCallRet
<no module>! WaitForSingleObject + 18 bytes
<no module>! SCP_DumpStack + 260 bytes
<no module>! Error + 229 bytes
<no module>! scp_strcpy_s + 297 bytes
<no module>! scp_strcpy_s<128> + 56 bytes
<no module>! cf_get_packfile_count + 121 bytes
<no module>! cf_build_pack_list + 49 bytes
<no module>! cf_build_root_list + 503 bytes
<no module>! cf_build_secondary_filelist + 158 bytes
<no module>! cfile_init + 398 bytes
<no module>! game_init + 286 bytes
<no module>! game_main + 505 bytes
<no module>! WinMain + 330 bytes
<no module>! __tmainCRTStartup + 358 bytes
<no module>! WinMainCRTStartup + 15 bytes
<no module>! RegisterWaitForInputIdle + 73 bytes

> fs2_open_3_6_11d_sse2.exe!debug_int3(char * file=0x00e750f8, int line=458) Line 760 C++
     fs2_open_3_6_11d_sse2.exe!cf_build_root_list(char * cdrom_dir=0x00000000) Line 458 + 0x13 bytes C++
     fs2_open_3_6_11d_sse2.exe!cf_build_secondary_filelist(char * cdrom_dir=0x00000000) Line 796 + 0x9 bytes C++
     fs2_open_3_6_11d_sse2.exe!cfile_init(char * exe_dir=0x0012f854, char * cdrom_dir=0x00000000) Line 215 + 0xb bytes C++
     fs2_open_3_6_11d_sse2.exe!game_init() Line 1965 + 0x23 bytes C++
     fs2_open_3_6_11d_sse2.exe!game_main(char * cmdline=0x0015232b) Line 7395 C++
     fs2_open_3_6_11d_sse2.exe!WinMain(HINSTANCE__ * hInst=0x00400000, HINSTANCE__ * hPrev=0x00000000, char * szCmdLine=0x0015232b, int nCmdShow=10) Line 7522 + 0x9 bytes C++
     fs2_open_3_6_11d_sse2.exe!__tmainCRTStartup() Line 263 + 0x2c bytes C
     fs2_open_3_6_11d_sse2.exe!WinMainCRTStartup() Line 182 C
     kernel32.dll!7c817077()
     [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]

Autos:

+ root 0x03119ba0 {path=0x03119ba0 "C:\Games\FreeSpace2" roottype=-842150451 } cf_root *
+ root->path 0x03119ba0 "C:\Games\FreeSpace2" char [256]
+ str_temp 0x0012f360 " ÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝ" char [256]

Locals:

+ cdrom_dir 0x00000000 <Bad Ptr> char *
+ root 0x03119ba0 {path=0x03119ba0 "C:\Games\FreeSpace2" roottype=-842150451 } cf_root *
+ str_temp 0x0012f360 " ÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝ" char [256]
+ cur_pos 0x031182ce " ÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝ" char *

Up one level autos:

- cdrom_dir 0x00000000 <Bad Ptr> char *
            CXX0030: Error: expression cannot be evaluated

TagsNo tags attached.

Activities

chief1983

2009-11-19 15:14

administrator   ~0011309

By the way portej05, I assigned this to you since it has to do with buffers. Figured you'd have an idea.

portej05

2009-11-21 08:16

reporter   ~0011310

The two call stacks appear to be from different points in execution.

This kind of comment doesn't help :P:
"//This for statement is a work of art :D"

portej05

2009-11-21 08:18

reporter   ~0011311

CF_MAX_PATHNAME_LENGTH == 256
MAX_PATH_LEN == 128

The code is trying to copy the contents of the first buffer (of length CF_MAX_PATHNAME_LENGTH) into the second (MAX_PATH_LEN).

Acknowledged.

portej05

2009-11-22 08:44

reporter   ~0011316

I can't reproduce this error using the set up I've got.
"C:\Program Files\The Babylon Project\" is longer than 32 characters though, have you tried putting into a smaller directory?
Somewhere there may be an unsafe strings call writing past the end of the buffer, followed by a safe_strings call where the buffer sizes are checked.

chief1983

2009-11-22 16:39

administrator   ~0011319

The full path can be longer than 32 characters I thought. I thought only filenames got stuck in that 32 byte buffer.

portej05

2009-11-23 04:45

reporter   ~0011323

Seems double NULL termination is not occurring on Cmdline_mod

portej05

2009-11-23 04:46

reporter   ~0011324

Potential fix committed.

FUBAR-BDHR

2009-11-26 07:39

developer   ~0011345

Looks good. Resolve away............

portej05

2009-11-26 17:18

reporter   ~0011346

Fixed.

Issue History

Date Modified Username Field Change
2009-11-19 01:29 FUBAR-BDHR New Issue
2009-11-19 01:29 FUBAR-BDHR Status new => assigned
2009-11-19 01:29 FUBAR-BDHR Assigned To => chief1983
2009-11-19 04:52 chief1983 Assigned To chief1983 => portej05
2009-11-19 04:52 chief1983 Priority normal => high
2009-11-19 04:52 chief1983 Category Build system => ---------
2009-11-19 04:52 chief1983 Target Version => 3.6.12 RC1
2009-11-19 15:14 chief1983 Note Added: 0011309
2009-11-21 08:16 portej05 Note Added: 0011310
2009-11-21 08:18 portej05 Note Added: 0011311
2009-11-21 08:18 portej05 Status assigned => acknowledged
2009-11-22 08:44 portej05 Note Added: 0011316
2009-11-22 16:39 chief1983 Note Added: 0011319
2009-11-23 04:45 portej05 Note Added: 0011323
2009-11-23 04:45 portej05 Status acknowledged => confirmed
2009-11-23 04:46 portej05 Note Added: 0011324
2009-11-23 04:46 portej05 Status confirmed => feedback
2009-11-26 07:39 FUBAR-BDHR Note Added: 0011345
2009-11-26 17:18 portej05 Note Added: 0011346
2009-11-26 17:18 portej05 Status feedback => resolved
2009-11-26 17:18 portej05 Fixed in Version => 3.6.11
2009-11-26 17:18 portej05 Resolution open => fixed