https://bugs.winehq.org/show_bug.cgi?id=46809
Bug ID: 46809 Summary: PS4 Remote Play doesn't open Product: Wine Version: 4.3 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: throwawayaccx@gmail.com Distribution: ---
Created attachment 63832 --> https://bugs.winehq.org/attachment.cgi?id=63832 Log of opening app
PS4 Remote Play never opens and spits out a backtrace.
https://bugs.winehq.org/show_bug.cgi?id=46809
--- Comment #1 from cxf throwawayaccx@gmail.com --- Created attachment 63833 --> https://bugs.winehq.org/attachment.cgi?id=63833 Backtrace
https://bugs.winehq.org/show_bug.cgi?id=46809
cxf throwawayaccx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://remoteplay.dl.plays | |tation.net/remoteplay/lang/ | |en/index.html
https://bugs.winehq.org/show_bug.cgi?id=46809
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |ntdll Ever confirmed|0 |1 Status|UNCONFIRMED |NEW URL|https://remoteplay.dl.plays |https://web.archive.org/web |tation.net/remoteplay/lang/ |/20190310123055/https://rem |en/index.html |oteplay.dl.playstation.net/ | |remoteplay/module/win/Remot | |ePlayInstaller.exe Keywords| |dotnet, download CC| |focht@gmx.net Summary|PS4 Remote Play doesn't |PS4 Remote Play 2.x (.NET |open |4.x app) crashes on | |startup, loader fails to | |resolve dll dependency from | |private path (LoadLibraryEx | |LOAD_WITH_ALTERED_SEARCH_PA | |TH is mutually exclusive to | |LOAD_LIBRARY_SEARCH* flags)
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
please always state the installation environment/prerequisites as exact as possible.
1) Wine-Staging 4.3 was used (app doesn't install with plain Wine 4.3 -> bug 46812) -> visible in logs but not mentioned!
2) The installer refuses to install with default Windows version setting ('Windows 7'), needs at least 'Windows 8.1' or higher -> not mentioned!
3) The app requires .NET Framework to work. You obviously installed some .NET Framework 4.x in the prefix (output doesn't look like Wine-Mono) -> not mentioned!
4) Always start the app from the installation directory (= becomes working directory)! Many Windows applications rely on this (dll load/search paths).
The app suffers from multiple bugs.
First one:
--- snip --- $ WINEDEBUG=+seh,+relay,+loaddll,+module wine ./RemotePlay.exe >>log2.txt 2>&1 ... 003e:Call KERNEL32.SetDllDirectoryA(0033f378 "") ret=003f73a6 003e:Ret KERNEL32.SetDllDirectoryA() retval=00000001 ret=003f73a6 ... 003e:Call KERNEL32.SetDefaultDllDirectories(00000800) ret=003f74a9 003e:Ret KERNEL32.SetDefaultDllDirectories() retval=00000001 ret=003f74a9 ... 003e:Call KERNEL32.LoadLibraryExW(016f8f14 L"C:\Program Files (x86)\Sony\PS4 Remote Play\RpCtrlWrapper.dll",00000000,00000008) ret=003f76ea 003e:trace:module:load_dll looking for L"C:\Program Files (x86)\Sony\PS4 Remote Play\RpCtrlWrapper.dll" in L"C:\windows\system32" 003e:trace:module:map_image mapped PE file at 0x6020000-0x62ea000 003e:trace:module:map_image mapping section .text at 0x6021000 off 400 size 225400 virt 22524a flags 60000020 003e:trace:module:map_image clearing 0x6246400 - 0x6247000 003e:trace:module:map_image mapping section .rdata at 0x6247000 off 225800 size 64200 virt 64116 flags 40000040 003e:trace:module:map_image clearing 0x62ab200 - 0x62ac000 003e:trace:module:map_image mapping section .data at 0x62ac000 off 289a00 size 9000 virt 1d56c flags c0000040 003e:trace:module:map_image mapping section .tls at 0x62ca000 off 292a00 size 200 virt 9 flags c0000040 003e:trace:module:map_image clearing 0x62ca200 - 0x62cb000 003e:trace:module:map_image mapping section .rsrc at 0x62cb000 off 292c00 size 3800 virt 3778 flags 40000040 003e:trace:module:map_image clearing 0x62ce800 - 0x62cf000 003e:trace:module:map_image mapping section .reloc at 0x62cf000 off 296400 size 1ae00 virt 1ad6c flags 42000040 003e:trace:module:map_image clearing 0x62e9e00 - 0x62ea000 003e:trace:module:get_load_order looking for L"C:\Program Files (x86)\Sony\PS4 Remote Play\RpCtrlWrapper.dll" 003e:trace:module:get_load_order got hardcoded default for L"C:\Program Files (x86)\Sony\PS4 Remote Play\RpCtrlWrapper.dll" 003e:trace:module:load_builtin_dll Trying built-in L"RpCtrlWrapper.dll" 003e:warn:module:load_builtin_dll cannot open .so lib for builtin L"RpCtrlWrapper.dll": /home/focht/projects/wine/mainline-install-x86_64/bin/../lib/wine/rpctrlwrapper.dll.so: cannot open shared object file: No such file or directory 003e:trace:module:load_native_dll Trying native dll L"\??\C:\Program Files (x86)\Sony\PS4 Remote Play\RpCtrlWrapper.dll" 003e:trace:module:perform_relocations relocating from 0x10000000-0x102ca000 to 0x6020000-0x62ea000 003e:trace:module:set_security_cookie initializing security cookie 0x62ac478 003e:trace:module:alloc_tls_slot module 0x6020000 data 0x62ca000-0x62ca008 zerofill 0 index 0x62c952c callback 0x62478b8 flags 300000 -> slot 1 003e:trace:module:alloc_tls_slot thread 0040 slot 1: 8/0 bytes at 0x1c05d0 003e:trace:module:alloc_tls_slot thread 003f slot 1: 8/0 bytes at 0x1c05e8 003e:trace:module:alloc_tls_slot thread 003e slot 1: 8/0 bytes at 0x1c0818 ... 003e:trace:module:load_dll looking for L"scenp.dll" in L"C:\windows\system32" 003e:trace:module:get_load_order looking for L"C:\windows\system32\scenp.dll" 003e:trace:module:get_load_order got hardcoded default for L"scenp.dll" 003e:trace:module:load_builtin_dll Trying built-in L"scenp.dll" 003e:warn:module:load_builtin_dll cannot open .so lib for builtin L"scenp.dll": /home/focht/projects/wine/mainline-install-x86_64/bin/../lib/wine/scenp.dll.so: cannot open shared object file: No such file or directory 003e:warn:module:load_dll Failed to load module L"scenp.dll"; status=c0000135 003e:err:module:import_dll Library scenp.dll (which is needed by L"C:\Program Files (x86)\Sony\PS4 Remote Play\RpCtrlWrapper.dll") not found ... 003e:warn:module:load_dll Failed to load module L"C:\Program Files (x86)\Sony\PS4 Remote Play\RpCtrlWrapper.dll"; status=c0000135 003e:Ret KERNEL32.LoadLibraryExW() retval=00000000 ret=003f76ea ... System.NullReferenceException: Object reference not set to an instance of an object. at RemoteplayUI.CheckUpdate..ctor() at ?.Main() ... 003e:trace:seh:call_stack_handlers handler at 0xc9adc9 returned 1 003e:trace:seh:call_stack_handlers calling handler at 0x10057ee8 code=c0000005 flags=0 003e:Call KERNEL32.GetLastError() ret=100031d1 003e:Ret KERNEL32.GetLastError() retval=00000000 ret=100031d1 003e:trace:seh:call_stack_handlers handler at 0x10057ee8 returned 1 003e:trace:seh:call_stack_handlers calling handler at 0x7b495dc6 code=c0000005 flags=0 wine: Unhandled page fault on read access to 0x0000000c at address 0x3f9a44 (thread 003e), starting debugger... --- snip ---
'kernel32.LoadLibraryExA' with 'LOAD_WITH_ALTERED_SEARCH_PATH'
https://docs.microsoft.com/en-us/windows/desktop/api/libloaderapi/nf-libload...
Specifically this:
https://docs.microsoft.com/en-us/windows/desktop/Dlls/dynamic-link-library-s...
--- quote --- Alternate Search Order for Desktop Applications
The standard search order used by the system can be changed by calling the LoadLibraryEx function with LOAD_WITH_ALTERED_SEARCH_PATH. The standard search order can also be changed by calling the SetDllDirectory function.
Windows XP: Changing the standard search order by calling SetDllDirectory is not supported until Windows XP with Service Pack 1 (SP1).
If you specify an alternate search strategy, its behavior continues until all associated executable modules have been located. After the system starts processing DLL initialization routines, the system reverts to the standard search strategy.
The LoadLibraryEx function supports an alternate search order if the call specifies LOAD_WITH_ALTERED_SEARCH_PATH and the lpFileName parameter specifies an absolute path.
Note that the standard search strategy and the alternate search strategy specified by LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH differ in just one way: The standard search begins in the calling application's directory, and the alternate search begins in the directory of the executable module that LoadLibraryEx is loading. --- quote ---
Emphasis on the last paragraph. Wine should locate the dependent dll also from the directory of the executable module that LoadLibraryEx is loading.
I've included some calls prior to LoadLibraryEx, made by the .NET CLR, that can potentially influence dll search paths:
--- snip --- 003e:Call KERNEL32.SetDllDirectoryA(0033f378 "") ret=003f73a6 003e:Ret KERNEL32.SetDllDirectoryA() retval=00000001 ret=003f73a6 --- snip ---
https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-setd...
--- quote --- If this parameter is an empty string (""), the call removes the current directory from the default DLL search order. --- quote ---
This would have no effect on the final search semantics of LOAD_WITH_ALTERED_SEARCH_PATH.
--- quote --- 003e:Call KERNEL32.SetDefaultDllDirectories(00000800) ret=003f74a9 003e:Ret KERNEL32.SetDefaultDllDirectories() retval=00000001 ret=003f74a9 --- quote ---
https://docs.microsoft.com/en-us/windows/desktop/api/libloaderapi/nf-libload...
--- quote --- It is not possible to revert to the standard DLL search path or remove any directory specified with SetDefaultDllDirectories from the search path. However, the process DLL search path can be overridden by calling LoadLibraryEx with one or more LOAD_LIBRARY_SEARCH flags, and directories added with AddDllDirectory can be removed by calling RemoveDllDirectory. --- quote ---
This doesn't exclude the directory of the executable module from loader search path.
Wine source:
https://source.winehq.org/git/wine.git/blob/099303c4590d0f76274f9e9cdbc707fe...
--- snip --- 925 /****************************************************************** 926 * load_library 927 * 928 * Helper for LoadLibraryExA/W. 929 */ 930 static HMODULE load_library( const UNICODE_STRING *libname, DWORD flags ) 931 { 932 NTSTATUS nts; 933 HMODULE hModule; 934 WCHAR *load_path; 935 const DWORD load_library_search_flags = (LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | 936 LOAD_LIBRARY_SEARCH_APPLICATION_DIR | 937 LOAD_LIBRARY_SEARCH_USER_DIRS | 938 LOAD_LIBRARY_SEARCH_SYSTEM32 | 939 LOAD_LIBRARY_SEARCH_DEFAULT_DIRS); 940 const DWORD unsupported_flags = (LOAD_IGNORE_CODE_AUTHZ_LEVEL | 941 LOAD_LIBRARY_REQUIRE_SIGNED_TARGET); 942 943 if (!(flags & load_library_search_flags)) flags |= default_search_flags; 944 945 if( flags & unsupported_flags) 946 FIXME("unsupported flag(s) used (flags: 0x%08x)\n", flags); 947 948 if (flags & load_library_search_flags) 949 load_path = get_dll_load_path_search_flags( libname->Buffer, flags ); 950 else 951 load_path = MODULE_get_dll_load_path( flags & LOAD_WITH_ALTERED_SEARCH_PATH ? libname->Buffer : NULL, -1 ); 952 if (!load_path) return 0; ... --- snip ---
'LOAD_WITH_ALTERED_SEARCH_PATH' is mutually exclusive to any 'LOAD_LIBRARY_SEARCH*' flags but the first check doesn't respect this.
You can also work around without modifying Wine source by putting 'scenp.dll' in syswow64 (32-bit for shared WoW64) directory. But that's just an ugly hack.
$ sha1sum RemotePlayInstaller.exe d7e56a826e82689383687dfc63fe2a035b987604 RemotePlayInstaller.exe
$ du -sh RemotePlayInstaller.exe 19M RemotePlayInstaller.exe
$ wine --version wine-4.3-229-g6d82b2f1ad
Regards
https://bugs.winehq.org/show_bug.cgi?id=46809
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|ntdll |kernel32
https://bugs.winehq.org/show_bug.cgi?id=46809
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|PS4 Remote Play 2.x (.NET |Multiple applications fail |4.x app) crashes on |to install or crash on |startup, loader fails to |startup: dll dependencies |resolve dll dependency from |from private path |private path (LoadLibraryEx |(LoadLibraryEx |LOAD_WITH_ALTERED_SEARCH_PA |LOAD_WITH_ALTERED_SEARCH_PA |TH is mutually exclusive to |TH)(PS4 Remote Play 2.x. |LOAD_LIBRARY_SEARCH* flags) |DVDVideoSoft Free YouTube | |to MP3 Converter 4.x)
--- Comment #3 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting and refining summary to collect more apps.
Found another app (installer) which fails because of this.
DVDVideoSoft Free YouTube to MP3 Converter 4.x installer:
From: https://bugs.winehq.org/show_bug.cgi?id=35680#c11
--- snip --- $ WINEDEBUG=+seh,+relay,+loaddll,+module wine ./FreeYouTubeToMP3Converter_4.1.91.328_d_45c65720-4be0-4cd6-813e-44ad81ea42a1.exe
log.txt 2>&1
.. 002c:Call KERNEL32.LoadLibraryExW(00a0164c L"C:\users\focht\Temp\is-KQRH8.tmp\dvssyshelper.dll",00000000,00000008) ret=004a1c54 002c:trace:module:load_dll looking for L"C:\users\focht\Temp\is-KQRH8.tmp\dvssyshelper.dll" in L"C:\windows\system32" 002c:trace:module:map_image mapped PE file at 0x720000-0x78c000 002c:trace:module:map_image mapping section .text at 0x721000 off 400 size 4d000 virt 4ce4e flags 60000020 002c:trace:module:map_image mapping section .rdata at 0x76e000 off 4d400 size 13800 virt 1362c flags 40000040 002c:trace:module:map_image clearing 0x781800 - 0x782000 002c:trace:module:map_image mapping section .data at 0x782000 off 60c00 size 2a00 virt 2edc flags c0000040 002c:trace:module:map_image clearing 0x784a00 - 0x785000 002c:trace:module:map_image mapping section .rsrc at 0x785000 off 63600 size 600 virt 550 flags 40000040 002c:trace:module:map_image clearing 0x785600 - 0x786000 002c:trace:module:map_image mapping section .reloc at 0x786000 off 63c00 size 5a00 virt 59b4 flags 42000040 002c:trace:module:map_image clearing 0x78ba00 - 0x78c000 002c:trace:module:get_load_order looking for L"C:\users\focht\Temp\is-KQRH8.tmp\dvssyshelper.dll" 002c:trace:module:get_load_order got hardcoded default for L"C:\users\focht\Temp\is-KQRH8.tmp\dvssyshelper.dll" 002c:trace:module:load_builtin_dll Trying built-in L"dvssyshelper.dll" 002c:warn:module:load_builtin_dll cannot open .so lib for builtin L"dvssyshelper.dll": /home/focht/projects/wine/mainline-install-x86_64/bin/../lib/wine/dvssyshelper.dll.so: cannot open shared object file: No such file or directory 002c:trace:module:load_native_dll Trying native dll L"\??\C:\users\focht\Temp\is-KQRH8.tmp\dvssyshelper.dll" 002c:trace:module:perform_relocations relocating from 0x10000000-0x1006c000 to 0x720000-0x78c000 002c:trace:module:set_security_cookie initializing security cookie 0x782530 ... 002c:trace:module:get_load_order looking for L"C:\windows\system32\tier0.dll" 002c:trace:module:get_load_order got hardcoded default for L"tier0.dll" 002c:trace:module:load_builtin_dll Trying built-in L"tier0.dll" 002c:warn:module:load_builtin_dll cannot open .so lib for builtin L"tier0.dll": /home/focht/projects/wine/mainline-install-x86_64/bin/../lib/wine/tier0.dll.so: cannot open shared object file: No such file or directory 002c:warn:module:load_dll Failed to load module L"tier0.dll"; status=c0000135 002c:err:module:import_dll Library tier0.dll (which is needed by L"C:\users\focht\Temp\is-KQRH8.tmp\dvssyshelper.dll") not found 002c:trace:module:load_dll looking for L"libcrypto-1_1.dll" in L"C:\windows\system32" 002c:trace:module:get_load_order looking for L"C:\windows\system32\libcrypto-1_1.dll" 002c:trace:module:get_load_order got hardcoded default for L"libcrypto-1_1.dll" 002c:trace:module:load_builtin_dll Trying built-in L"libcrypto-1_1.dll" 002c:warn:module:load_builtin_dll cannot open .so lib for builtin L"libcrypto-1_1.dll": /home/focht/projects/wine/mainline-install-x86_64/bin/../lib/wine/libcrypto-1_1.dll.so: cannot open shared object file: No such file or directory 002c:warn:module:load_dll Failed to load module L"libcrypto-1_1.dll"; status=c0000135 002c:err:module:import_dll Library libcrypto-1_1.dll (which is needed by L"C:\users\focht\Temp\is-KQRH8.tmp\dvssyshelper.dll") not found 002c:trace:module:load_dll looking for L"libcurl.dll" in L"C:\windows\system32" 002c:trace:module:get_load_order looking for L"C:\windows\system32\libcurl.dll" 002c:trace:module:get_load_order got hardcoded default for L"libcurl.dll" 002c:trace:module:load_builtin_dll Trying built-in L"libcurl.dll" 002c:warn:module:load_builtin_dll cannot open .so lib for builtin L"libcurl.dll": /home/focht/projects/wine/mainline-install-x86_64/bin/../lib/wine/libcurl.dll.so: cannot open shared object file: No such file or directory 002c:warn:module:load_dll Failed to load module L"libcurl.dll"; status=c0000135 002c:err:module:import_dll Library libcurl.dll (which is needed by L"C:\users\focht\Temp\is-KQRH8.tmp\dvssyshelper.dll") not found 002c:trace:module:load_dll looking for L"dlmgr.dll" in L"C:\windows\system32" 002c:trace:module:get_load_order looking for L"C:\windows\system32\dlmgr.dll" 002c:trace:module:get_load_order got hardcoded default for L"dlmgr.dll" 002c:trace:module:load_builtin_dll Trying built-in L"dlmgr.dll" 002c:warn:module:load_builtin_dll cannot open .so lib for builtin L"dlmgr.dll": /home/focht/projects/wine/mainline-install-x86_64/bin/../lib/wine/dlmgr.dll.so: cannot open shared object file: No such file or directory 002c:warn:module:load_dll Failed to load module L"dlmgr.dll"; status=c0000135 002c:err:module:import_dll Library dlmgr.dll (which is needed by L"C:\users\focht\Temp\is-KQRH8.tmp\dvssyshelper.dll") not found ... 002c:Ret KERNEL32.LoadLibraryExW() retval=00000000 ret=004a1c54 002c:Call KERNEL32.GetLastError() ret=004a1c7b 002c:Ret KERNEL32.GetLastError() retval=0000007e ret=004a1c7b 002c:Call user32.LoadStringW(00400000,0000ff06,0032db2c,00001000) ret=00408da6 002c:Ret user32.LoadStringW() retval=00000013 ret=00408da6 002c:Call KERNEL32.WideCharToMultiByte(000004e4,00000000,0098e5a4 L"Could not call proc",00000013,00000000,00000000,00000000,00000000) ret=00405410 002c:Ret KERNEL32.WideCharToMultiByte() retval=00000013 ret=00405410 ... 002c:Call KERNEL32.RaiseException(0eedfade,00000001,00000007,0032fc78) ret=0049e6ce 002c:trace:seh:raise_exception code=eedfade flags=1 addr=0x7b443f6f ip=7b443f6f tid=002c 002c:trace:seh:raise_exception info[0]=0049e6ce 002c:trace:seh:raise_exception info[1]=00967780 002c:trace:seh:raise_exception info[2]=009f6ef0 002c:trace:seh:raise_exception info[3]=00000135 002c:trace:seh:raise_exception info[4]=0032fda4 002c:trace:seh:raise_exception info[5]=0032fca8 002c:trace:seh:raise_exception info[6]=0032fc94 002c:trace:seh:raise_exception eax=7b42e14d ebx=7b66b000 ecx=00000000 edx=0032fc78 esi=0032fc78 edi=0032fc40 002c:trace:seh:raise_exception ebp=0032fc18 esp=0032fbb4 cs=0023 ds=32002b es=32002b fs=fbad0063 gs=7bd1006b flags=00000216 002c:trace:seh:call_stack_handlers calling handler at 0x49e6e4 code=eedfade flags=1 002c:trace:seh:call_stack_handlers handler at 0x49e6e4 returned 1 --- snip ---
--- snip --- $ tree --charset=ANSI .wine/drive_c/users/focht/Temp/is-KQRH8.tmp .wine/drive_c/users/focht/Temp/is-KQRH8.tmp |-- dlmgr.dll |-- DVDVideoSoft.EnceladusUtils.dll |-- DVDVideoSoft.SubscriptionMgr.dll |-- DVDVideoSoft.Utils.dll |-- dvssyshelper.dll |-- _isetup |-- jansson.dll |-- libcrypto-1_1.dll |-- libcurl.dll |-- libeay32MD.dll |-- libssl-1_1.dll |-- msvcp120.dll |-- msvcr120.dll |-- sscrmgr.dll |-- ssleay32MD.dll |-- SubscriptionMgrBridge.dll |-- tier0.dll `-- unihelp.dll
1 directory, 17 files --- snip ---
https://web.archive.org/web/20190405074418/http://sc.dvdvideosoft.net/test/F...
$ sha1sum FreeYouTubeToMP3Converter_4.1.91.328_d_45c65720-4be0-4cd6-813e-44ad81ea42a1.exe d16c21b0e65427d635ec788074a7f2d48fed305f FreeYouTubeToMP3Converter_4.1.91.328_d_45c65720-4be0-4cd6-813e-44ad81ea42a1.exe
$ du -sh FreeYouTubeToMP3Converter_4.1.91.328_d_45c65720-4be0-4cd6-813e-44ad81ea42a1.exe 35M FreeYouTubeToMP3Converter_4.1.91.328_d_45c65720-4be0-4cd6-813e-44ad81ea42a1.exe
$ wine --version wine-4.5-185-g17056908ac
Regards
https://bugs.winehq.org/show_bug.cgi?id=46809
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |0d9d816fc352a556f1d00fde5a5 | |e0e52e35e1ddb Status|NEW |RESOLVED
--- Comment #4 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit https://source.winehq.org/git/wine.git/commitdiff/0d9d816fc352a556f1d00fde5a... ("kernel32: Fix handling of LOAD_WITH_ALTERED_SEARCH_PATH when other search flags are specified.")
Thanks Alexandre
$ wine --version wine-4.9-341-g4d5c874f42
Regards
https://bugs.winehq.org/show_bug.cgi?id=46809
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 4.10.