http://bugs.winehq.org/show_bug.cgi?id=33376
Bug #: 33376 Summary: Stick soldier 2 crash on startup Product: Wine Version: 1.5.27 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: thunderstormpolska@o2.pl Classification: Unclassified
Created attachment 44166 --> http://bugs.winehq.org/attachment.cgi?id=44166 Stick Soldier 2 Debug
Hello!
Stick Soldier is a freeware game and it doesn't work on Wine (Nvidia / Intel) - Debug in Start
http://bugs.winehq.org/show_bug.cgi?id=33376
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://www.acid-play.com/do | |wnload/stick-soldiers-2
--- Comment #1 from Austin English austinenglish@gmail.com 2013-04-12 19:26:05 CDT --- Confirming.
austin@aw25 ~ $ sha1sum ss2.zip 9bfd26b015a0dbc60cc199f42fd5e2a0325a7754 ss2.zip austin@aw25 ~ $ du -h ss2.zip 832K ss2.zip austin@aw25 ~ $ wine --version wine-1.5.28
http://bugs.winehq.org/show_bug.cgi?id=33376
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |austinenglish@gmail.com Ever Confirmed|0 |1
--- Comment #2 from Austin English austinenglish@gmail.com 2013-04-12 19:26:26 CDT --- Really confirming
http://bugs.winehq.org/show_bug.cgi?id=33376
fox6x6x6@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fox6x6x6@gmail.com
--- Comment #3 from fox6x6x6@gmail.com 2013-04-27 03:41:12 CDT --- 0024:Call KERNEL32.ReadFile(0000006c,0014be20,00000200,0033f798,00000000) ret=7e0a291b 0024:Ret KERNEL32.ReadFile() retval=00000001 ret=7e0a291b 0024:Ret msvcrt.fgetc() retval=ffffffff ret=7e15cdb2 0024:Ret msvcp60.?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z() retval=0033fb20 ret=004119c6 0024:Call msvcp60.??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z(0033fbc0,0033fbd0 "") ret=004119d9 0024:Call ntdll.strlen(0033fbd0 "") ret=7e18c8ce 0024:Ret ntdll.strlen() retval=00000000 ret=7e18c8ce 0024:Ret msvcp60.??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z() retval=0033fbc0 ret=004119d9 0024:Call msvcp60.??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z(0033fbc0,00000000) ret=004119e7 0024:Ret msvcp60.??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z() retval=00000000 ret=004119e7 0009:Ret KERNEL32.WaitForDebugEvent() retval=00000001 ret=7edbe4de 0009:Call KERNEL32.GetThreadContext(00000030,7edf8aa0) ret=7edbe31b 0009:Ret KERNEL32.GetThreadContext() retval=00000001 ret=7edbe31b 0009:Call KERNEL32.SetThreadContext(00000030,7edf8aa0) ret=7edbf32e 0009:Ret KERNEL32.SetThreadContext() retval=00000001 ret=7edbf32e 0009:Call KERNEL32.ContinueDebugEvent(00000023,00000024,80010001) ret=7edbe5b1 0009:Ret KERNEL32.ContinueDebugEvent() retval=00000001 ret=7edbe5b1 0009:Call KERNEL32.WaitForDebugEvent(0033de40,ffffffff) ret=7edbe4de 0024:Call msvcrt._except_handler3(0033f9f0,0033fe50,0033f724,0033f66c) ret=7bc7805d 0024:Call msvcrt._XcptFilter(c0000005,0033f518) ret=0047fe79 0024:Ret msvcrt._XcptFilter() retval=00000000 ret=0047fe79 0024:Ret msvcrt._except_handler3() retval=00000001 ret=7bc7805d 0024:Call KERNEL32.UnhandledExceptionFilter(0033f5a8) ret=7bc8eb75 0024:Ret KERNEL32.UnhandledExceptionFilter() retval=00000000 ret=7bc8eb75 0009:Ret KERNEL32.WaitForDebugEvent() retval=00000001 ret=7edbe4de 0009:Call KERNEL32.GetThreadContext(00000030,7edf8aa0) ret=7edbe31b 0009:Ret KERNEL32.GetThreadContext() retval=00000001 ret=7edbe31b 0009:Call KERNEL32.WriteFile(00000013,7edf7a20,0000005a,0033dc0c,00000000) ret=7edc4172 Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004119e7).
The function msvcp60.??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z is the string-operator at. If you track that function, one call is with an empty string (this->size == 0 and more important this->ptr == NULL) at position 0. The return value is then this->ptr+pos == NULL, which then causes the page fault. Such a call shouldn't happen, or does it work to access an empty string at position 0 under Windows.
http://bugs.winehq.org/show_bug.cgi?id=33376
--- Comment #4 from Fabian Ebner f.ebner94@gmail.com 2013-04-29 15:51:30 CDT --- When running the program on windows vista with straceNT I get the following warning at startup: Invalid parameter passed to C runtime function
So possibly windows just ignores the bad calls and continues the execution nevertheless?
http://bugs.winehq.org/show_bug.cgi?id=33376
--- Comment #5 from Fabian Ebner f.ebner94@gmail.com 2013-05-21 12:43:39 CDT --- In the Data directory of the game is an empty file (size 0) named SSents.etb If you rename or move the file, the game will start and show the title screen (if you try to start a match, it still crashes ...)
The root cause of the crash is trace:file:CreateFileW L"Data\SSents.etb" GENERIC_READ FILE_SHARE_READ FILE_SHARE_WRITE creation 3 attributes 0x80 trace:file:RtlDosPathNameToNtPathName_U (L"Data\SSents.etb",0x33f5b8,(nil),(nil)) trace:file:RtlGetFullPathName_U (L"Data\SSents.etb" 520 0x33f308 (nil)) trace:file:wine_nt_to_unix_file_name L"\??\Z:\home\fabian\Downloads\ss2\Data\SSents.etb" -> "/home/fabian/.wine/dosdevices/z:/home/fabian/Downloads/ss2/Data/SSents.etb" trace:file:CreateFileW returning 0x80 ##opened empty file trace:file:ReadFile 0x80 0x1345b8 512 0x33f8b8 (nil) ##read empty file wine: Unhandled page fault on read access to 0x00000000 at address 0x4119e7 (thread 0009), starting debugger...
So either the file shouldn't be opened (when reconstructing the circumstances on my vista installation it opened the file, so this is probably not the problem) or ReadFile is missing some security check for empty files.
http://bugs.winehq.org/show_bug.cgi?id=33376
--- Comment #6 from Bruno Jesus 00cpxxx@gmail.com 2013-08-20 20:49:38 CDT --- I have been trying to download this game for months now but I always hit a CloudFlare error. I could not find any suitable download alternative, am I the only one having this problem?
http://bugs.winehq.org/show_bug.cgi?id=33376
--- Comment #7 from Austin English austinenglish@gmail.com 2013-08-20 21:04:33 CDT --- (In reply to comment #6)
I have been trying to download this game for months now but I always hit a CloudFlare error. I could not find any suitable download alternative, am I the only one having this problem?
I get the same, though I have an archived copy.
It's still in wine-1.7.0-114-g73aef40
http://bugs.winehq.org/show_bug.cgi?id=33376
--- Comment #8 from Austin English austinenglish@gmail.com 2013-08-20 21:04:46 CDT --- Created attachment 45676 --> http://bugs.winehq.org/attachment.cgi?id=45676 backtrace (with debug symbols)
http://bugs.winehq.org/show_bug.cgi?id=33376
--- Comment #9 from Fabian Ebner f.ebner94@gmail.com 2013-08-21 04:41:54 CDT --- (In reply to comment #6)
I have been trying to download this game for months now but I always hit a CloudFlare error. I could not find any suitable download alternative, am I the only one having this problem?
This link should work: http://download.cnet.com/Stick-Soldiers-II/3001-2095_4-10397251.html?dlm=0
http://bugs.winehq.org/show_bug.cgi?id=33376
hanska2@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hanska2@luukku.com
--- Comment #10 from hanska2@luukku.com --- There must be a bug in builtin msvcp60
because I made new prefix, installed the game. Tried to run it and it crashed. Then noticed the debug and installed vcrun6 via winetricks and game started.
But the resolution was wrong I think, could get out of the game so I restarted kde session.
wine 1.7.22
https://bugs.winehq.org/show_bug.cgi?id=33376
Teras teras@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |teras@luukku.com
--- Comment #11 from Teras teras@luukku.com --- still crashing 1.7.37
https://bugs.winehq.org/show_bug.cgi?id=33376
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Component|-unknown |msvcp Summary|Stick soldier 2 crash on |Stick soldier 2 crashes on |startup |startup
--- Comment #12 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming, still present.
--- snip --- $ WINEDEBUG=+tid,+seh,+loaddll,+process,+msvcrt,+msvcp wine ./Stick\ Soldiers\ II.exe >>log.txt 2>&1 ... 0027:trace:msvcp:basic_filebuf_char_open (0x33faf8 Data\SSents.etb 1 64) 0027:trace:msvcp:basic_filebuf_char_open_wchar (0x33faf8 L"Data\SSents.etb" 1 64) 0027:trace:msvcp:basic_filebuf_char_is_open (0x33faf8) 0027:trace:msvcp:_Fiopen_wchar (L"Data\SSents.etb" 1 64) 0027:trace:msvcrt:MSVCRT__wfsopen (L"Data\SSents.etb",L"r") 0027:trace:msvcrt:msvcrt_get_flags L"r" 0027:trace:msvcrt:MSVCRT__wsopen_s fd*: 0x33f658 :file (L"Data\SSents.etb") oflags: 0x0000 shflags: 0x0040 pmode: 0x0000 0027:trace:msvcrt:msvcrt_alloc_fd :handle (0x74) allocating fd (6) 0027:trace:msvcrt:MSVCRT__wsopen_s :fd (6) handle (0x74) 0027:trace:msvcrt:msvcrt_init_fp :fd (6) allocating FILE* 0027:trace:msvcrt:msvcrt_init_fp :got FILE* (0x7e0d2380) 0027:trace:msvcrt:MSVCRT__wfsopen :fd (6) mode (L"r") FILE* (0x7e0d2380) 0027:trace:msvcrt:MSVCRT__wfsopen :got (0x7e0d2380) 0027:trace:msvcp:basic_filebuf_char__Init (0x33faf8 0x7e0d2380 1) 0027:trace:msvcp:basic_streambuf_char__Init_empty (0x33faf8) 0027:trace:msvcp:basic_streambuf_char_setp_next (0x33faf8 (nil) (nil) (nil)) 0027:trace:msvcp:basic_streambuf_char_setg (0x33faf8 (nil) (nil) (nil)) 0027:trace:msvcp:basic_streambuf_char__Init (0x33faf8 0x7e0d2388 0x7e0d2380 0x7e0d2384 0x7e0d2388 0x7e0d2380 0x7e0d2384) 0027:trace:msvcp:locale_id_operator_size_t (0x7e1f84f8) 0027:trace:msvcp:locale__Getfacet_bool (0x33fb2c 1) 0027:trace:msvcp:basic_filebuf_char__Initcvt_cvt (0x33faf8 0x5b23b8) 0027:trace:msvcp:codecvt_base_always_noconv (0x5b23b8) 0027:trace:msvcp:codecvt_base_do_always_noconv (0x5b23b8) 0027:trace:msvcp:basic_ifstream_char_is_open (0x33faf0) 0027:trace:msvcp:basic_filebuf_char_is_open (0x33faf8) 0027:trace:msvcp:MSVCP_basic_string_char_ctor_alloc 0x33fb90 0x33fa98 0027:trace:msvcp:basic_string_char__Tidy (0x33fb90 0) 0027:trace:msvcp:MSVCP_basic_string_char_ctor_cstr_alloc 0x33fb80 "UNDEFINED" 0027:trace:msvcp:basic_string_char__Tidy (0x33fb80 0) 0027:trace:msvcp:MSVCP_basic_string_char_assign_cstr_len 0x33fb80 "UNDEFINED" 9 0027:trace:msvcrt:MSVCRT_operator_new (11) returning 0x5b70b8 0027:trace:msvcp:basic_string_char__Tidy (0x33fb80 1) 0027:trace:msvcp:ios_base_eof (0x33fb4c) 0027:trace:msvcp:basic_istream_char_getline_delim (0x33faf0 0x33fba0 ff ) 0027:trace:msvcp:basic_ios_char_rdbuf_get (0x33fb4c) 0027:trace:msvcp:basic_streambuf_char__Lock (0x33faf8) 0027:trace:msvcp:basic_istream_char__Ipfx (0x33faf0 1) 0027:trace:msvcp:ios_base_good (0x33fb4c) 0027:trace:msvcp:basic_ios_char_tie_get (0x33fb4c) 0027:trace:msvcp:ios_base_good (0x33fb4c) 0027:trace:msvcp:basic_ios_char_rdbuf_get (0x33fb4c) 0027:trace:msvcp:basic_streambuf_char_sbumpc (0x33faf8) 0027:trace:msvcp:basic_streambuf_char__Gnavail (0x33faf8) 0027:trace:msvcp:basic_filebuf_char_uflow (0x33faf8) 0027:trace:msvcp:basic_filebuf_char_is_open (0x33faf8) 0027:trace:msvcp:basic_streambuf_char_gptr (0x33faf8) 0027:trace:msvcp:basic_streambuf_char_egptr (0x33faf8) 0027:trace:msvcrt:_lock (34) 0027:trace:msvcrt:read_i :fd (6) handle (0x74) buf (0x5b6050) len (4096) 0027:trace:msvcrt:read_i :EOF "" 0027:trace:msvcrt:read_i (0), "" 0027:trace:msvcrt:_unlock (34) 0027:trace:msvcp:basic_ios_char_rdbuf_get (0x33fb4c) 0027:trace:msvcp:basic_streambuf_char__Unlock (0x33faf8) 0027:trace:msvcp:basic_ios_char_setstate_reraise (0x33fb4c 3 0) 0027:trace:msvcp:basic_ios_char_clear_reraise (0x33fb4c 3 0) 0027:trace:msvcp:ios_base_clear_reraise (0x33fb4c 3 0) 0027:trace:msvcp:MSVCP_basic_string_char_assign_cstr_len 0x33fb90 "" 0 0027:trace:msvcp:MSVCP_basic_string_char_operator_at 0x33fb90 0 0027:trace:seh:raise_exception code=c0000005 flags=0 addr=0x4119e7 ip=004119e7 tid=0027 0027:trace:seh:raise_exception info[0]=00000000 0027:trace:seh:raise_exception info[1]=00000000 0027:trace:seh:raise_exception eax=00000000 ebx=00000000 ecx=00000000 edx=00000000 esi=005b114f edi=f75c6000 0027:trace:seh:raise_exception ebp=0033fcac esp=0033fa18 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010246 --- snip ---
@Fabian
--- quote --- If you track that function, one call is with an empty string (this->size == 0 and more important this->ptr == NULL) at position 0. The return value is then this->ptr+pos == NULL, which then causes the page fault. Such a call shouldn't happen, or does it work to access an empty string at position 0 under Windows. --- quote ---
Yes, it should work.
'std::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator[](uint)' must return 'Nullstr()' reference in this case.
Source: https://source.winehq.org/git/wine.git/blob/a0e8d62a8ebd24e4ae474c262ddbc7d1...
--- snip --- 1413 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */ 1414 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */ 1415 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */ 1416 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */ 1417 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_operator_at, 8) 1418 char* __thiscall MSVCP_basic_string_char_operator_at( 1419 basic_string_char *this, MSVCP_size_t pos) 1420 { 1421 TRACE("%p %lu\n", this, pos); 1422 1423 assert(this->size >= pos); 1424 return this->ptr+pos; 1425 } --- snip ---
Same applies for wide-character version.
$ sha1sum ss2.zip 9bfd26b015a0dbc60cc199f42fd5e2a0325a7754 ss2.zip
$ du -sh ss2.zip 832K ss2.zip
$ wine --version wine-1.7.45-127-g172e08e
Regards
https://bugs.winehq.org/show_bug.cgi?id=33376
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |874c3f96f7559893a48bdc8ff1e | |9684a2a4c359d Status|NEW |RESOLVED CC| |piotr.caban@gmail.com Resolution|--- |FIXED
--- Comment #13 from Piotr Caban piotr.caban@gmail.com --- The game works for me now. Marking as fixed.
https://bugs.winehq.org/show_bug.cgi?id=33376
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.52.