https://bugs.winehq.org/show_bug.cgi?id=40322
Bug ID: 40322 Summary: Alone 4 explorer /desktop crash Product: Wine Version: 1.9.5 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: SolisX007@yahoo.com Distribution: ---
Created attachment 53974 --> https://bugs.winehq.org/attachment.cgi?id=53974 Alone4Backtrace
Hello Everyone,
Alone 4 crashes if used with wine explorer /desktop
wine explorer /desktop=NFSU,1024x768 '/mnt/sda3/Games/PC/Alone in the Dark/alone4.exe'
Game works if you remove explorer /desktop.
https://bugs.winehq.org/show_bug.cgi?id=40322
--- Comment #1 from Lunknown SolisX007@yahoo.com --- Created attachment 53975 --> https://bugs.winehq.org/attachment.cgi?id=53975 Alone4backtrace
https://bugs.winehq.org/show_bug.cgi?id=40322
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Alone 4 explorer /desktop |Alone in the dark 4 crashes |crash |in virtual desktop CC| |joseph.kucia@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=40322
--- Comment #2 from Lunknown SolisX007@yahoo.com --- This is still an issue wine-1.9.11. Also i would like to mention that when i set winecfg to use the emulated desktop the game loads fine. It's only when the command below is used that it crashes.
wine explorer /desktop=NFSU,1024x768 '/mnt/sda3/Games/PC/Alone in the Dark/alone4.exe'
https://bugs.winehq.org/show_bug.cgi?id=40322
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #3 from joaopa jeremielapuree@yahoo.fr --- You need to cd into the game directory before launching the executable
https://bugs.winehq.org/show_bug.cgi?id=40322
--- Comment #4 from Lunknown SolisX007@yahoo.com --- Hello Joaopa,
Tried
cd '/mnt/sda3/Games/PC/Alone in the Dark/' wine explorer /desktop=Alone,800x600 Alone4.exe
i still got a crash.
https://bugs.winehq.org/show_bug.cgi?id=40322
Christian Costa titan.costa@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |titan.costa@gmail.com
--- Comment #5 from Christian Costa titan.costa@gmail.com --- "wine explorer alone4.exe" crashes here. No difference w/ and w/o /desktop.
https://bugs.winehq.org/show_bug.cgi?id=40322
--- Comment #6 from Lunknown SolisX007@yahoo.com --- Hello Everyone,
For me it only crashes with wine explorer /desktop=Alone,800x600 Alone4.exe. If i run wine Alone4.exe it does not crash.
https://bugs.winehq.org/show_bug.cgi?id=40322
--- Comment #7 from Lunknown SolisX007@yahoo.com --- Created attachment 57694 --> https://bugs.winehq.org/attachment.cgi?id=57694 Alone4 wine-2.4 BT.
This is still an issue in wine-2.4.
https://bugs.winehq.org/show_bug.cgi?id=40322
--- Comment #8 from Lunknown SolisX007@yahoo.com --- This is still an issue in wine-5.11.
https://bugs.winehq.org/show_bug.cgi?id=40322
--- Comment #9 from Lunknown SolisX007@yahoo.com --- This is still an issue on wine-5.18.
https://bugs.winehq.org/show_bug.cgi?id=40322
--- Comment #10 from Lunknown SolisX007@yahoo.com --- Created attachment 68342 --> https://bugs.winehq.org/attachment.cgi?id=68342 alone4-Console+BT-wine-5.18
https://bugs.winehq.org/show_bug.cgi?id=40322
--- Comment #11 from Lunknown SolisX007@yahoo.com --- Created attachment 68806 --> https://bugs.winehq.org/attachment.cgi?id=68806 Alone4-Terminal+Backtrace-wine-6.0rc1.txt
https://bugs.winehq.org/show_bug.cgi?id=40322
--- Comment #12 from Lunknown SolisX007@yahoo.com --- This is still an issue on wine-6.0rc1.
https://bugs.winehq.org/show_bug.cgi?id=40322
--- Comment #13 from joaopa jeremielapuree@yahoo.fr --- Does the bug occur with the demo https://www.fileplanet.com/archive/p-51273/Alone-in-the-Dark-The-New-Nightma...
https://bugs.winehq.org/show_bug.cgi?id=40322
--- Comment #14 from Lunknown SolisX007@yahoo.com --- (In reply to joaopa from comment #13)
Does the bug occur with the demo https://www.fileplanet.com/archive/p-51273/Alone-in-the-Dark-The-New- Nightmare-Demo/download
Yes it happens with the demo as well.
https://bugs.winehq.org/show_bug.cgi?id=40322
--- Comment #15 from joaopa jeremielapuree@yahoo.fr --- Created attachment 68835 --> https://bugs.winehq.org/attachment.cgi?id=68835 console output
Confirming.
Without explorer, the game starts.
https://bugs.winehq.org/show_bug.cgi?id=40322
--- Comment #16 from Lunknown SolisX007@yahoo.com --- (In reply to joaopa from comment #15)
Created attachment 68835 [details] console output
Confirming.
Without explorer, the game starts.
Yes the game runs if you don't use explorer. The bug is about explorer.
https://bugs.winehq.org/show_bug.cgi?id=40322
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://web.archive.org/web | |/20201209091858/http://down | |load.fileplanet.com/ftp1/fp | |new/gamedemos/action/alone4 | |cd1.zip?st=j6psbsMPjmHZan7f | |Brxd6w&e=1607516308 Keywords| |download Status|UNCONFIRMED |NEW CC| |focht@gmx.net Summary|Alone in the dark 4 crashes |Alone in the dark 4 crashes |in virtual desktop |using builtin 'explorer' | |when started with | |executable name only (game | |command line parser expects | |full executable path) Ever confirmed|0 |1 Component|-unknown |programs
--- Comment #17 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming. Correcting summary as it has nothing to do with virtual desktop. You can also run the game in windowed mode by passing 'window' to the command line.
Created snapshot via Internet Archive:
https://web.archive.org/web/20201209091858/http://download.fileplanet.com/ft...
---
The app has a broken command line parser. It always expects quoted full executable path. Long paths with spaces require quotation marks (default game install path).
Sine the bug is pretty old, the quotation part was already fixed with bug 47790 ("putty.exe displays an error at startup when placed in a path with accented characters.")
https://source.winehq.org/git/wine.git/commitdiff/ceb32f668360ef51b932fa6350... ("kernel32: Quote first command line arg in process paramenters.")
It tries to parse out the path before the executable name.
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files (x86)/Infogrames/Alone in the Dark - Demo
$ WINEDEBUG=+seh,+relay,+process wine explorer /desktop=Alone,800x600 Alone4.exe >>log.txt 2>&1
0194:Call KERNEL32.GetCommandLineA() ret=004a16bc 0194:Ret KERNEL32.GetCommandLineA() retval=0012bc10 ret=004a16bc 0194:trace:seh:dispatch_exception code=c0000005 flags=0 addr=004A1987 ip=004a1987 tid=0194 0194:trace:seh:dispatch_exception info[0]=00000001 0194:trace:seh:dispatch_exception info[1]=00000000 0194:trace:seh:dispatch_exception eax=00000000 ebx=7ffde000 ecx=00000000 edx=00006578 esi=00000000 edi=0031ff3c 0194:trace:seh:dispatch_exception ebp=0031fe8c esp=0031fe50 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010216 0194:trace:seh:call_vectored_handlers calling handler at 7B00F270 code=c0000005 flags=0 0194:trace:seh:call_vectored_handlers handler at 7B00F270 returned 0 ... wine: Unhandled page fault on write access to 00000000 at address 004A1987 (thread 0194), starting debugger... --- snip ---
Works:
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files (x86)/Infogrames/Alone in the Dark - Demo
$ WINEDEBUG=+process wine alone4.exe window --- snip ---
Works: 'start' method creates full quoted executable path
--- snip --- $ WINEDEBUG=+process wine start alone4.exe window
0024:trace:process:CreateProcessInternalW app L"C:\Program Files (x86)\Infogrames\Alone in the Dark - Demo\alone4.exe" cmdline L""C:\Program Files (x86)\Infogrames\Alone in the Dark - Demo\alone4.exe" window"
0024:trace:process:NtCreateUserProcess L"\??\C:\Program Files (x86)\Infogrames\Alone in the Dark - Demo\alone4.exe" image L"C:\Program Files (x86)\Infogrames\Alone in the Dark - Demo\alone4.exe" cmdline L""C:\Program Files (x86)\Infogrames\Alone in the Dark - Demo\alone4.exe" window" parent (nil) --- snip ---
Works: Running 'explorer' but with quoted long path:
--- snip --- $ WINEDEBUG=+process,+explorer wine explorer "C:\Program Files (x86)\Infogrames\Alone in the Dark - Demo\alone4.exe" --- snip ---
Crashes:
--- snip --- $ WINEDEBUG=+process wine explorer ./alone4.exe 0024:trace:process:CreateProcessInternalW app (null) cmdline L""./alone4.exe"" 0024:trace:process:NtCreateUserProcess L"\??\C:\Program Files (x86)\Infogrames\Alone in the Dark - Demo\alone4.exe" image L"C:\Program Files (x86)\Infogrames\Alone in the Dark - Demo\alone4.exe" cmdline L""./alone4.exe"" parent (nil) --- snip ---
--- snip --- $ WINEDEBUG=+process wine cmd /c alone4.exe ... 01f8:trace:process:CreateProcessInternalW app L"C:\Program Files (x86)\Infogrames\Alone in the Dark - Demo\alone4.exe" cmdline L"alone4.exe window" 01f8:trace:process:NtCreateUserProcess L"\??\C:\Program Files (x86)\Infogrames\Alone in the Dark - Demo\alone4.exe" image L"C:\Program Files (x86)\Infogrames\Alone in the Dark - Demo\alone4.exe" cmdline L"alone4.exe window" parent (nil) --- snip ---
Relevant disassembly:
--- snip --- ... 004A16B6 | call dword ptr ds:[<&GetCommandLineA>] | 004A16BC | mov dword ptr ss:[ebp-20],eax | "Alone4.exe" 004A16BF | push 4F4648 | "stencil" 004A16C4 | mov edx,dword ptr ss:[ebp-20] | "Alone4.exe" 004A16C7 | push edx | 004A16C8 | call 4ACBA0 | 004A16CD | add esp,8 | 004A16D0 | test eax,eax | 004A16D2 | jne 4A16E9 | 004A16D4 | push 4F4650 | "STENCIL" 004A16D9 | mov eax,dword ptr ss:[ebp-20] | "Alone4.exe" 004A16DC | push eax | 004A16DD | call 4ACBA0 | 004A16E2 | add esp,8 | 004A16E5 | test eax,eax | 004A16E7 | je 4A16F0 | 004A16E9 | mov byte ptr ds:[5BDB9E],1 | 004A16F0 | push 4F4658 | "window" 004A16F5 | mov ecx,dword ptr ss:[ebp-20] | "Alone4.exe" 004A16F8 | push ecx | 004A16F9 | call 4ACBA0 | ... 004A18C3 | mov byte ptr ds:[520DDC],1 | 004A18CA | mov ecx,dword ptr ss:[ebp-20] | 004A18CD | mov dword ptr ss:[ebp-24],ecx | 004A18D0 | mov edx,dword ptr ss:[ebp-24] | 004A18D3 | movsx eax,byte ptr ds:[edx] | 004A18D6 | cmp eax,22 | 004A18D9 | jne alone4.4A18E4 | start quote? 004A18DB | mov ecx,dword ptr ss:[ebp-24] | 004A18DE | add ecx,1 | yes, next char 004A18E1 | mov dword ptr ss:[ebp-24],ecx | 004A18E4 | push 22 | 004A18E6 | mov edx,dword ptr ss:[ebp-24] | 004A18E9 | push edx | 004A18EA | call alone4.4AB2B0 | find end quote 004A18EF | add esp,8 | 004A18F2 | mov dword ptr ss:[ebp-28],eax | 004A18F5 | cmp dword ptr ss:[ebp-28],0 | 004A18F9 | je alone4.4A1930 | ... 004A1972 | push 5C | backslash 004A1974 | push 5BDA98 | "Alone4.exe" 004A1979 | call 4AB2B0 | 004A197E | add esp,8 | 004A1981 | mov dword ptr ss:[ebp-30],eax | 004A1984 | mov ecx,dword ptr ss:[ebp-30] | 004A1987 | mov byte ptr ds:[ecx],0 | *boom* --- snip ---
--- snip --- 004AB2B0 | push ebp | 004AB2B1 | mov ebp,esp | 004AB2B3 | push edi | 004AB2B4 | mov edi,dword ptr ss:[ebp+8] | 004AB2B7 | xor eax,eax | 004AB2B9 | or ecx,FFFFFFFF | 004AB2BC | repne scasb | 004AB2BE | inc ecx | 004AB2BF | neg ecx | 004AB2C1 | dec edi | 004AB2C2 | mov al,byte ptr ss:[ebp+C] | 004AB2C5 | std | 004AB2C6 | repne scasb | 004AB2C8 | inc edi | 004AB2C9 | cmp byte ptr ds:[edi],al | 004AB2CB | je 4AB2D1 | 004AB2CD | xor eax,eax | 004AB2CF | jmp 4AB2D3 | 004AB2D1 | mov eax,edi | 004AB2D3 | cld | 004AB2D4 | pop edi | 004AB2D5 | leave | 004AB2D6 | ret | --- snip ---
Since there are multiple methods leading to a crash, only the explorer part should be fixed.
Wine source:
https://source.winehq.org/git/wine.git/blob/310019789f7bde12ae3f25f723957c97...
--- snip --- ... 1052 /* if we have a command line, execute it */ 1053 if (cmdline) 1054 { 1055 STARTUPINFOW si; 1056 PROCESS_INFORMATION pi; 1057 1058 memset( &si, 0, sizeof(si) ); 1059 si.cb = sizeof(si); 1060 WINE_TRACE( "starting %s\n", wine_dbgstr_w(cmdline) ); 1061 if (CreateProcessW( NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi )) 1062 { 1063 CloseHandle( pi.hThread ); 1064 CloseHandle( pi.hProcess ); 1065 } 1066 } --- snip ---
The 'cmd' way is IMHO a WONTFIX. The game should crash on Windows as well if you open a command prompt in the game install directory and just type 'alone4.exe' or run 'cmd /c alone4.exe'.
$ wine --version wine-6.0-rc1-29-g310019789f7
$ sha1sum alone4cd1.zip b52e8c03a2597cffa68580f7c7a30ad079c3a202 alone4cd1.zip
$ du -sh alone4cd1.zip 83M alone4cd1.zip
Regards