[Bug 44793] Epic Games Launcher 7.x crashes on startup ( relies on native Windows behaviour: 'shcore.dll' loaded by 'shlwapi.dll')

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Mar 8 15:56:09 CST 2019


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

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Fixed by SHA1|                            |29a15a35f578d215a6edf832dd9
                   |                            |878c3c4c94e4f
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

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

this was fixed by commit
https://source.winehq.org/git/wine.git/commitdiff/29a15a35f578d215a6edf832dd9878c3c4c94e4f
and a number of related commits.

Thanks Nikolay

* shlwapi:
https://source.winehq.org/git/wine.git/?a=search&h=HEAD&st=commit&s=shlwapi%3A+Forward
(from November 2018 onwards)
* shcore:
https://source.winehq.org/git/wine.git/commitdiff/d1443c3a5056ad7ec3831de52f2a14cc29aa4489
(and later)

One has to pass '-enablehighdpi' command line argument to hit the code path.

--- snip ---
$ pwd
/home/focht/.wine/drive_c/Program Files/Epic
Games/Launcher/Portal/Binaries/Win32

$ WINEDEBUG=+seh,+relay,+shcore,+module,+imports wine ./EpicGamesLauncher.exe
-enablehighdpi >>log.txt 2>&1
...
0051:trace:module:load_builtin_callback loaded shlwapi.dll 0x11eb98 0x7e0f0000
0051:trace:module:load_dll Loaded module
L"\\??\\C:\\windows\\system32\\shlwapi.dll" (builtin) at 0x7e0f0000
0051:trace:imports:import_dll --- DelayLoadFailureHook shlwapi.dll.560 =
0x7b4311c4
0051:trace:imports:import_dll --- Ordinal shlwapi.dll.2 = 0x7e0f7968
0051:trace:imports:import_dll --- PathAddBackslashA shlwapi.dll.568 =
0x7e0f9f88
0051:trace:imports:import_dll --- PathAddBackslashW shlwapi.dll.569 =
0x7e0f9fb0
0051:trace:imports:import_dll --- PathAppendA shlwapi.dll.572 = 0x7e0fa028 
...
0051:trace:imports:import_dll --- PathStripToRootW shlwapi.dll.670 = 0x7e0faf78
0051:trace:imports:import_dll --- PathUnquoteSpacesA shlwapi.dll.677 =
0x7e0fb090
0051:trace:imports:import_dll --- PathUnquoteSpacesW shlwapi.dll.678 =
0x7e0fb0b8
0051:trace:module:find_forwarded_export delay loading L"shcore.dll" for
'shcore.SHCreateStreamOnFileW'
0051:trace:module:load_dll looking for L"shcore.dll" in L"C:\\Program
Files\\Epic
Games\\Launcher\\Portal\\Binaries\\Win32;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem"
0051:trace:module:map_image mapped PE file at 0x10000000-0x10003000
0051:trace:module:map_image mapping section .text at 0x10001000 off 200 size 5
virt 1000 flags 60000020
0051:trace:module:map_image clearing 0x10001200 - 0x10002000
0051:trace:module:map_image mapping section .reloc at 0x10002000 off 400 size 8
virt 1000 flags 42000040
0051:trace:module:map_image clearing 0x10002200 - 0x10003000
0051:trace:module:get_load_order looking for
L"C:\\windows\\system32\\shcore.dll"
0051:trace:module:get_load_order got hardcoded default for L"shcore.dll"
0051:trace:module:load_dll L"\\??\\C:\\windows\\system32\\shcore.dll" is a fake
Wine dll
0051:trace:module:load_builtin_dll Trying built-in L"shcore.dll"
0051:trace:module:load_dll looking for L"user32.dll" in L"C:\\Program
Files\\Epic
Games\\Launcher\\Portal\\Binaries\\Win32;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem"
0051:trace:module:load_dll Found L"C:\\windows\\system32\\user32.dll" for
L"user32.dll" at 0x7e6a0000, count=6
0051:trace:imports:import_dll --- GetDpiForMonitorInternal user32.dll.289 =
0x7e6aa6fc
0051:trace:imports:import_dll --- GetProcessDpiAwarenessInternal user32.dll.349
= 0x7e6ab00c
0051:trace:imports:import_dll --- SetProcessDpiAwarenessInternal user32.dll.642
= 0x7e6adc1c 
...
0051:Call ucrtbase._wcsnicmp(017cedbe L"pic
Games\\Launcher\\Portal\\Binaries\\Win32\\EpicGamesLauncher.exe\"
-enablehighdpi -SaveToUserDir -Messaging",013a719a L"nablehighdpi",0000000c)
ret=00560d81
0051:Ret  ucrtbase._wcsnicmp() retval=00000002 ret=00560d81 
...
0051:Call KERNEL32.LoadLibraryW(003d65a0 L"shcore.dll") ret=005aeb10
0051:trace:module:load_dll looking for L"shcore.dll" in L"C:\\Program
Files\\Epic
Games\\Launcher\\Portal\\Binaries\\Win32;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem"
0051:trace:module:load_dll Found L"C:\\windows\\system32\\shcore.dll" for
L"shcore.dll" at 0x7e980000, count=-1
0051:Ret  KERNEL32.LoadLibraryW() retval=7e980000 ret=005aeb10
0051:Call KERNEL32.SetErrorMode(00000000) ret=005aad14
0051:Ret  KERNEL32.SetErrorMode() retval=00008000 ret=005aad14
0051:Call KERNEL32.GetProcAddress(7e980000,01e6f834 "SetProcessDpiAwareness")
ret=005aa87d
0051:Ret  KERNEL32.GetProcAddress() retval=7e98fbdc ret=005aa87d
0051:Call KERNEL32.GetProcAddress(7e980000,01e6f82c "GetDpiForMonitor")
ret=005aa87d
0051:Ret  KERNEL32.GetProcAddress() retval=7e98f2a8 ret=005aa87d
0051:Call KERNEL32.FreeLibrary(7e980000) ret=005aa48a
0051:trace:module:LdrUnloadDll (0x7e980000)
0051:trace:module:LdrUnloadDll (L"shcore.dll") - START
0051:trace:module:LdrUnloadDll END
0051:Ret  KERNEL32.FreeLibrary() retval=00000001 ret=005aa48a
0051:Call shcore.SetProcessDpiAwareness(00000002) ret=005a1faa
0051:Call user32.SetProcessDpiAwarenessInternal(00000002) ret=7e9903a5
0051:Ret  user32.SetProcessDpiAwarenessInternal() retval=00000000 ret=7e9903a5
0051:Ret  shcore.SetProcessDpiAwareness() retval=80070005 ret=005a1faa 
...
--- snip ---

App log file (build):

--- snip ---
LogInit: Build: 7.9.2-4043988+++Portal+Main-PF-4030315-8420184
LogInit: Engine Version: 4.18.0-4043988+++Portal+Main
LogInit: Compatible Engine Version: 4.18.0-4043988+++Portal+Main
LogInit: Net CL: 4043988
LogInit: Compiled (32-bit): May  2 2018 06:05:17
LogInit: Compiled with Visual C++: 19.00.24215.01
LogInit: Build Configuration: Shipping
LogInit: Branch Name: ++Portal+Main
LogInit: Command line: "C:\Program Files\Epic
Games\Launcher\Portal\Binaries\Win32\EpicGamesLauncher.exe" -enablehighdpi
-SaveToUserDir -Messaging
LogInit: Base directory: C:/Program Files/Epic
Games/Launcher/Portal/Binaries/Win32/
LogInit: Installed Engine Build: 1
--- snip ---

The brain damaged code:

--- snip ---
005A1F50  PUSH EpicGame.013A7198      ; UNICODE "enablehighdpi"
005A1F55  CALL EpicGame.0053FAB0
005A1F5A  PUSH EAX
005A1F5B  CALL EpicGame.00560CE0      ; parse app command line
005A1F60  ADD ESP,8
005A1F63  TEST AL,AL
005A1F65  JE SHORT EpicGame.005A1FDE  ; has 'enablehighdpi' arg?
005A1F67  PUSH ESI
005A1F68  PUSH EDI
005A1F69  PUSH EpicGame.013A71B4      ; UNICODE "shcore.dll"
005A1F6E  CALL EpicGame.005AA8B0
005A1F73  MOV ESI,EAX
005A1F75  ADD ESP,4
005A1F78  TEST ESI,ESI
005A1F7A  JE SHORT EpicGame.005A1FAD
005A1F7C  PUSH EpicGame.013A71CC      ; UNICODE "SetProcessDpiAwareness"
005A1F81  PUSH ESI
005A1F82  CALL EpicGame.005AA7A0
005A1F87  PUSH EpicGame.013A71FC      ; UNICODE "GetDpiForMonitor"
005A1F8C  PUSH ESI
005A1F8D  MOV EDI,EAX
005A1F8F  CALL EpicGame.005AA7A0
005A1F94  PUSH ESI
005A1F95  MOV DWORD PTR DS:[17FC578],EAX
005A1F9A  CALL EpicGame.005AA480
005A1F9F  ADD ESP,14
005A1FA2  TEST EDI,EDI
005A1FA4  JE SHORT EpicGame.005A1FDC
005A1FA6  PUSH 2
005A1FA8  CALL EDI
005A1FAA  POP EDI
005A1FAB  POP ESI
005A1FAC  RETN
005A1FAD  PUSH EpicGame.013A7220      ; UNICODE "user32.dll"
005A1FB2  CALL EpicGame.005AA8B0
005A1FB7  MOV ESI,EAX
005A1FB9  ADD ESP,4
005A1FBC  TEST ESI,ESI
005A1FBE  JE SHORT EpicGame.005A1FDC
005A1FC0  PUSH EpicGame.013A7238      ; UNICODE "SetProcessDPIAware"
005A1FC5  PUSH ESI
005A1FC6  CALL EpicGame.005AA7A0
005A1FCB  PUSH ESI
005A1FCC  MOV EDI,EAX
005A1FCE  CALL EpicGame.005AA480
005A1FD3  ADD ESP,0C
005A1FD6  TEST EDI,EDI
005A1FD8  JE SHORT EpicGame.005A1FDC
005A1FDA  CALL EDI
005A1FDC  POP EDI
005A1FDD  POP ESI
005A1FDE  RETN
--- snip ---

$ sha1sum EpicInstaller-7.9.2.msi 
b1353946ebf4fe1519da2c6d56c7cad5b7c0b464  EpicInstaller-7.9.2.msi

$ du -sh EpicInstaller-7.9.2.msi 
31M    EpicInstaller-7.9.2.msi

$ wine --version
wine-4.3-188-gab7756619c

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