http://bugs.winehq.org/show_bug.cgi?id=23270
Summary: GTA2 options menu item broken - CreateProcess runs wrong executable Product: Wine Version: 1.2-rc4 Platform: x86 OS/Version: Linux Status: NEW Keywords: download Severity: normal Priority: P2 Component: kernel32 AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
Start the game, press esc to skip the intro, then select Options. You expect to be in an options menu, but instead you're left with the game minimized, staring at a console.
+process log shows
trace:process:CreateProcessW app (null) cmdline L"GTA2 Manager.EXE" trace:process:find_exe_file looking for L"GTA2" trace:process:find_exe_file Trying native exe L"C:\Program Files\Rockstar Games\GTA2\GTA2.exe" trace:process:CreateProcessW starting L"C:\Program Files\Rockstar Games\GTA2\GTA2.exe" as Win32 binary (0x400000-0x678000)
Whoopsie. That heuristic looks like it's broken.
http://bugs.winehq.org/show_bug.cgi?id=23270
Xavier Vachon xvachon@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |xvachon@gmail.com
--- Comment #1 from Xavier Vachon xvachon@gmail.com 2010-12-30 14:01:11 CST --- Still a bug in git.
http://bugs.winehq.org/show_bug.cgi?id=23270
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #2 from Anastasius Focht focht@gmx.net 2011-05-08 06:21:24 CDT --- Hello,
yes, CreateProcess() command line heuristics needs some overhaul to handle all this brokenness.
Consider another braindamaged app (pando installer), which tries to run an exe with a path containing whitespace without quoting:
--- snip --- ... 0022:Call KERNEL32.CreateProcessW(00000000,001a07d0 L"C:\Program Files\Pando Networks\Pando\Pando.exe",00000000,00000000,00000001,08000400,00000000,00000000,0540e330,0540e380) ret=007b1c53 0022:trace:process:create_process_impl app (null) cmdline L"C:\Program Files\Pando Networks\Pando\Pando.exe" 0022:trace:process:find_exe_file looking for L"C:\Program" 0022:trace:process:find_exe_file Trying native exe L"C:\Program" 0022:warn:process:create_process_impl (L"C:\Program",...): ignoring some flags in 8000400 0022:trace:process:create_process_impl starting L"C:\Program" as Unix binary 0022:Ret KERNEL32.CreateProcessW() retval=00000000 ret=007b1c53 ... 0022:Call ntdll.wcslen(026d87f0 L"Error creating child process: Access denied\r\n") ret=0071fcd2 ... --- snip ---
MSDN for reference: http://msdn.microsoft.com/en-us/library/ms682425.aspx
For "lpApplicationName" arg:
--- quote --- The lpApplicationName parameter can be NULL. In that case, the module name must be the first white space–delimited token in the lpCommandLine string. If you are using a long file name that contains a space, use quoted strings to indicate where the file name ends and the arguments begin; otherwise, the file name is ambiguous. For example, consider the string "c:\program files\sub dir\program name". This string can be interpreted in a number of ways. The system tries to interpret the possibilities in the following order:
c:\program.exe files\sub dir\program name c:\program files\sub.exe dir\program name c:\program files\sub dir\program.exe name c:\program files\sub dir\program name.exe --- quote ---
For "lpCommandLine" arg:
--- quote --- If lpApplicationName is NULL, the first white space–delimited token of the command line specifies the module name. If you are using a long file name that contains a space, use quoted strings to indicate where the file name ends and the arguments begin (see the explanation for the lpApplicationName parameter). --- quote ---
They probably apply similar heuristics for lpCommandLine to cope with braindamaged code that doesn't quote executable path.
Download: http://www.pando.com/dl/download/PandoSetupNCI.exe
$ wine --version wine-1.3.19-203-gf555c2d $ sha1sum PandoSetupNCI.exe d5cddcb7979f0423d1b8aa08d3b3c4b947381426 PandoSetupNCI.exe
Maybe the bug should be made more generic because there are various poorly coded apps that suffer from this.
Regards
http://bugs.winehq.org/show_bug.cgi?id=23270
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wylda@volny.cz Summary|GTA2 options menu item |CreateProcess() needs |broken - CreateProcess runs |better handling of |wrong executable |whitespaces
--- Comment #3 from Wylda wylda@volny.cz 2012-05-05 11:00:19 CDT ---
Still present in wine-1.5.3-164-gdec3d50 for GTA2. Let's try to refine the subject.
https://bugs.winehq.org/show_bug.cgi?id=23270
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED URL| |http://www.rockstargames.co | |m/classics/ Component|kernel32 |shell32 Resolution|--- |DUPLICATE Summary|CreateProcess() needs |GTA2 Manager fails to start |better handling of |(executable name is not |whitespaces |quoted through | |'ShellExecute[Ex]')
--- Comment #4 from Anastasius Focht focht@gmx.net --- Hello folks,
dupe of bug 19666 (executable name not quoted through 'ShellExecuteEx').
--- snip --- $ WINEDEBUG=+tid,+seh,+relay,+shell,+process wine ./gta2.exe >>log.txt 2>&1 ... 0024:Call shell32.ShellExecuteA(00000000,00000000,00575970 "GTA2 Manager.EXE",00000000,00673d28 "Z:\home\focht\Downloads\GTA2",00000001) ret=004d08dd ... 0024:Call KERNEL32.CreateProcessW(00000000,0033e728 L"GTA2 Manager.EXE",00000000,00000000,00000000,00000410,00000000,00151460 L"Z:\home\focht\Downloads\GTA2",0033dde0,0033ddd0) ret=7e5b05ab 0024:trace:process:create_process_impl app (null) cmdline L"GTA2 Manager.EXE" 0024:trace:process:find_exe_file looking for L"GTA2" 0024:trace:process:find_exe_file Trying native exe L"Z:\home\focht\Downloads\GTA2\GTA2.exe" 0024:trace:process:create_process_impl starting L"Z:\home\focht\Downloads\GTA2\GTA2.exe" as Win32 binary (0x400000-0x678000, arch 014c) --- snip ---
$ wine --version wine-1.7.24-150-gcf4404c
Regards
*** This bug has been marked as a duplicate of bug 19666 ***
https://bugs.winehq.org/show_bug.cgi?id=23270
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Austin English austinenglish@gmail.com --- Closing.