[Bug 23934] Multiple games and applications depend on kernel32.CreateProcess to prioritize the working directory over the system search path (Stronghold Kingdoms loops after update, installers fail to find tools)

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Apr 8 08:52:20 CDT 2018


https://bugs.winehq.org/show_bug.cgi?id=23934

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|http://appdb.winehq.org/obj |
                   |ectManager.php?sClass=versi |
                   |on&iId=21009                |
    Staged patchset|https://github.com/wine-com |https://github.com/wine-sta
                   |pholio/wine-staging/tree/ma |ging/wine-staging/tree/mast
                   |ster/patches/kernel32-NeedC |er/patches/kernel32-NeedCur
                   |urrentDirectoryForExePath   |rentDirectoryForExePath
            Summary|Stronghold Kingdoms: loops  |Multiple games and
                   |after update (CreateProcess |applications depend on
                   |does not prioritize the     |kernel32.CreateProcess to
                   |working directory over the  |prioritize the working
                   |system search path)         |directory over the system
                   |                            |search path (Stronghold
                   |                            |Kingdoms loops after
                   |                            |update, installers fail to
                   |                            |find tools)

--- Comment #15 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

revisiting, still present.

I found another bunch of apps/installers breaking because of this bug.

Installer sets working directory:

--- snip ---
$ WINEDEBUG=+seh,+pid,+process,+module,+file,+ntdll,+relay wine ./setup.exe
>>log.txt 2>&1
...
0043:0044:Call KERNEL32.SetCurrentDirectoryA(009d1058
"C:\\users\\focht\\Temp\\is-F8Q5D.tmp\\") ret=0096aabf
0043:0044:Call ntdll.RtlSetCurrentDirectory_U(0033ec0c) ret=7b46a3a6
0043:0044:trace:file:RtlSetCurrentDirectory_U curdir now
L"C:\\users\\focht\\Temp\\is-F8Q5D.tmp\\" 0x108
0043:0044:Ret  ntdll.RtlSetCurrentDirectory_U() retval=00000000 ret=7b46a3a6
0043:0044:Ret  KERNEL32.SetCurrentDirectoryA() retval=00000001 ret=0096aabf
...
--- snip ---

Content:

--- snip ---
$ pwd
/home/focht/.wine/drive_c/users/focht/Temp/is-F8Q5D.tmp

$ file *.exe
...
FlushFileCache.exe:    PE32 executable (console) Intel 80386, for MS Windows
rz.exe:                PE32+ executable (console) x86-64 (stripped to external
PDB), for MS Windows
rzw.exe:               PE32 executable (console) Intel 80386, for MS Windows
ztool.exe:             PE32+ executable (console) x86-64, for MS Windows
...
--- snip ---

Installer tries to start uncompressor app which resides in working directory:

--- snip ---
...
0043:00bb:Call KERNEL32.CreateProcessW(00000000,11492330 L"rzw d f2 f1 1023
1023",00000000,00000000,00000001,00000000,00000000,11312300
L"C:\\Games\\foobar\\freearc1578146506.tmp",0321fc14,0321fc04) ret=6108d619
0043:00bb:trace:process:create_process_impl app (null) cmdline L"rzw d f2 f1
1023 1023"
...
0043:00bb:trace:process:find_exe_file looking for L"rzw"
0043:00bb:Call ntdll.RtlDetermineDosPathNameType_U(01605400 L"rzw")
ret=7b4681e6
0043:00bb:Ret  ntdll.RtlDetermineDosPathNameType_U() retval=00000005
ret=7b4681e6
...
0043:00bb:Call ntdll.RtlInitUnicodeString(0321f450,01605438 L"rzw.exe")
ret=7b468287
0043:00bb:Ret  ntdll.RtlInitUnicodeString() retval=0321f450 ret=7b468287
0043:00bb:Call
ntdll.RtlFindActivationContextSectionString(00000001,00000000,00000002,0321f450,0321f458)
ret=7b4682a7
0043:00bb:Ret  ntdll.RtlFindActivationContextSectionString() retval=c0150008
ret=7b4682a7
0043:00bb:Call ntdll.RtlInitUnicodeString(0321f48c,7b49ccb8 L"PATH")
ret=7b463f2a
0043:00bb:Ret  ntdll.RtlInitUnicodeString() retval=0321f48c ret=7b463f2a
0043:00bb:Call ntdll.RtlQueryEnvironmentVariable_U(00000000,0321f48c,0321f484)
ret=7b463f52
0043:00bb:Ret  ntdll.RtlQueryEnvironmentVariable_U() retval=c0000023
ret=7b463f52
...
0043:00bb:Call ntdll.RtlQueryEnvironmentVariable_U(00000000,0321f48c,0321f484)
ret=7b464150
0043:00bb:Ret  ntdll.RtlQueryEnvironmentVariable_U() retval=00000000
ret=7b464150
0043:00bb:Call ntdll.RtlDosSearchPath_U(015fa378
L"C:\\users\\focht\\Temp\\is-APH3V.tmp;C:\\windows\\system32;C:\\windows\\system;C:\\windows;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem",01605438
L"rzw.exe",00000000,00000208,0321f868,00000000) ret=7b46899a
0043:00bb:trace:file:RtlDosPathNameToNtPathName_U_WithStatus
(L"C:\\users\\focht\\Temp\\is-APH3V.tmp\\rzw.exe",0x321f3f4,(nil),(nil))
0043:00bb:trace:file:RtlGetFullPathName_U
(L"C:\\users\\focht\\Temp\\is-APH3V.tmp\\rzw.exe" 520 0x321f104 (nil))
0043:00bb:trace:file:wine_nt_to_unix_file_name
L"\\users\\focht\\Temp\\is-APH3V.tmp\\rzw.exe" not found in
/home/focht/.wine/dosdevices/c:/users/focht/Temp/is-APH3V.tmp
0043:00bb:warn:ntdll:NtQueryAttributesFile
L"\\??\\C:\\users\\focht\\Temp\\is-APH3V.tmp\\rzw.exe" not found (c0000034)
0043:00bb:trace:file:RtlDosPathNameToNtPathName_U_WithStatus
(L"C:\\windows\\system32\\rzw.exe",0x321f3f4,(nil),(nil))
0043:00bb:trace:file:RtlGetFullPathName_U (L"C:\\windows\\system32\\rzw.exe"
520 0x321f104 (nil))
0043:00bb:trace:file:lookup_unix_name redirecting ->
"/home/focht/.wine/dosdevices/c:/windows/syswow64" + L"rzw.exe"
0043:00bb:trace:file:wine_nt_to_unix_file_name L"\\windows\\system32\\rzw.exe"
not found in /home/focht/.wine/dosdevices/c:/windows/syswow64
0043:00bb:warn:ntdll:NtQueryAttributesFile
L"\\??\\C:\\windows\\system32\\rzw.exe" not found (c0000034)
0043:00bb:trace:file:RtlDosPathNameToNtPathName_U_WithStatus
(L"C:\\windows\\system\\rzw.exe",0x321f3f4,(nil),(nil))
0043:00bb:trace:file:RtlGetFullPathName_U (L"C:\\windows\\system\\rzw.exe" 520
0x321f104 (nil))
0043:00bb:trace:file:wine_nt_to_unix_file_name L"\\windows\\system\\rzw.exe"
not found in /home/focht/.wine/dosdevices/c:/windows/system
0043:00bb:warn:ntdll:NtQueryAttributesFile
L"\\??\\C:\\windows\\system\\rzw.exe" not found (c0000034)
0043:00bb:trace:file:RtlDosPathNameToNtPathName_U_WithStatus
(L"C:\\windows\\rzw.exe",0x321f3f4,(nil),(nil))
0043:00bb:trace:file:RtlGetFullPathName_U (L"C:\\windows\\rzw.exe" 520
0x321f104 (nil))
0043:00bb:trace:file:wine_nt_to_unix_file_name L"\\windows\\rzw.exe" not found
in /home/focht/.wine/dosdevices/c:/windows
0043:00bb:warn:ntdll:NtQueryAttributesFile L"\\??\\C:\\windows\\rzw.exe" not
found (c0000034)
0043:00bb:trace:file:RtlDosPathNameToNtPathName_U_WithStatus
(L"C:\\windows\\system32\\rzw.exe",0x321f3f4,(nil),(nil))
0043:00bb:trace:file:RtlGetFullPathName_U (L"C:\\windows\\system32\\rzw.exe"
520 0x321f104 (nil))
0043:00bb:trace:file:lookup_unix_name redirecting ->
"/home/focht/.wine/dosdevices/c:/windows/syswow64" + L"rzw.exe" 
...
0043:00bb:Ret  KERNEL32.CreateProcessW() retval=00000000 ret=6108d619
...
0043:00b5:Call user32.MessageBoxW(00000000,015ebaac L"An error occurred while
unpacking: Unknown compression method!\rUnarc.dll returned an error code:
-2\rERROR: unsupported compression method",0095ed04 L"ISDone.dll",00000010)
ret=0095ecd2 
--- snip ---

Refining summary accordingly to indicate more apps are affected by this.

$ wine --version
wine-3.5-91-g3263d51a1f

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list