https://bugs.winehq.org/show_bug.cgi?id=44585
Bug ID: 44585 Summary: Diablo III doesn't launch, stops at "setup_exception_record stack overflow ..." Product: Wine Version: 3.2 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: maciej.stanczew+b@gmail.com Distribution: ArchLinux
Created attachment 60565 --> https://bugs.winehq.org/attachment.cgi?id=60565 Standard log, without custom WINEDEBUG
Since the last Diablo III update (to version 2.6.1.49286), launching the game (both directly and through Battle.net app) doesn't work, stopping at message mentioned in the title.
Note that this happens only on vanilla Wine (I tested versions 3.2, 3.0 and 2.21, on clean 32- and 64-bit prefixes). Staging (both 2.21 and rev 84fb9656 from new GitHub repo) work without any problems.
To reproduce, run the following command from the game's directory: $ wine 'Diablo III.exe' -launch
Related Reddit thread: https://www.reddit.com/r/wine_gaming/comments/7zh4sg/diablo_3_update/
https://bugs.winehq.org/show_bug.cgi?id=44585
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/ntdll-LdrRegiste | |rDllNotification URL| |https://eu.battle.net/accou | |nt/download/ Status|UNCONFIRMED |STAGED Keywords| |download, obfuscation Component|-unknown |ntdll CC| |focht@gmx.net Summary|Diablo III doesn't launch, |Blizzard Diablo III v2. 6. |stops at |1. 49286+ crashes with |"setup_exception_record |setup_exception_record |stack overflow ..." |stack overflow (needs | |ntdll.LdrRegisterDllNotific | |ation/LdrUnregisterDllNotif | |ication implementation) Ever confirmed|0 |1
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
The game executable seems to be wrapped with some custom protection scheme.
TLS callback installs VEH to decrypt entry point code via privileged instruction exception handling (HLT, UD2).
--- snip --- $ pwd /home/focht/wine-games/wineprefix64-bnet/drive_c/Program Files (x86)/Diablo III
$ WINEDEBUG=+seh,+relay wine ./Diablo\ III.exe -launch >>log.txt 2>&1 ... 002e:Ret TLS callback (proc=0x6aa080,module=0x400000,reason=PROCESS_ATTACH,reserved=0) 002e:Call TLS callback (proc=0x40d450,module=0x400000,reason=PROCESS_ATTACH,reserved=0) 002e:Call ntdll.RtlAddVectoredExceptionHandler(00000001,00422ae0) ret=0040bd2c 002e:Ret ntdll.RtlAddVectoredExceptionHandler() retval=0012df98 ret=0040bd2c 002e:trace:seh:raise_exception code=c0000096 flags=0 addr=0x40bdc4 ip=0040bdc4 tid=002e 002e:trace:seh:raise_exception eax=00000000 ebx=7bc30000 ecx=7bc37070 edx=7bcf7604 esi=7bcf07e8 edi=00000000 002e:trace:seh:raise_exception ebp=0033e2a0 esp=0033e26c cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010246 002e:trace:seh:call_vectored_handlers calling handler at 0x422ae0 code=c0000096 flags=0 002e:trace:seh:call_vectored_handlers handler at 0x422ae0 returned ffffffff 002e:trace:seh:raise_exception code=c0000096 flags=0 addr=0x40c0b1 ip=0040c0b1 tid=002e 002e:trace:seh:raise_exception eax=7b42ea00 ebx=7b6416b0 ecx=0000ea60 edx=7b420000 esi=7b642a4c edi=00000000 002e:trace:seh:raise_exception ebp=0033e2a0 esp=0033e26c cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010246 002e:trace:seh:call_vectored_handlers calling handler at 0x422ae0 code=c0000096 flags=0 ... 002e:Call KERNEL32.VirtualAlloc(00000000,000111f8,00003000,00000040) ret=0040e721 002e:Ret KERNEL32.VirtualAlloc() retval=00340000 ret=0040e721 002e:Call ntdll.NtCreateSection(0033e7f0,000f001f,00000000,0033e7c8,00000040,08400000,00000000) ret=0040e820 002e:Ret ntdll.NtCreateSection() retval=00000000 ret=0040e820 002e:Call KERNEL32.MapViewOfFileEx(00000040,000f001f,00000000,00000000,00000000,00000000) ret=0040e917 002e:Ret KERNEL32.MapViewOfFileEx() retval=025e0000 ret=0040e917 002e:Call KERNEL32.VirtualProtect(00400000,021d7000,00000040,0033e7e8) ret=0040e970 002e:Ret KERNEL32.VirtualProtect() retval=00000001 ret=0040e970 002e:trace:seh:raise_exception code=c0000096 flags=0 addr=0x40ea2b ip=0040ea2b tid=002e 002e:trace:seh:raise_exception eax=5f703102 ebx=0033e954 ecx=00000000 edx=00000002 esi=025d7000 edi=0033e3c0 002e:trace:seh:raise_exception ebp=0033e940 esp=0033e2b0 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010202 002e:trace:seh:call_vectored_handlers calling handler at 0x422ae0 code=c0000096 flags=0 002e:trace:seh:call_vectored_handlers handler at 0x422ae0 returned ffffffff 002e:Call KERNEL32.UnmapViewOfFile(00400000) ret=00351179 002e:Ret KERNEL32.UnmapViewOfFile() retval=00000001 ret=00351179 002e:Call KERNEL32.MapViewOfFileEx(00000040,00000024,00000000,00000000,01770000,00400000) ret=003511d9 002e:Ret KERNEL32.MapViewOfFileEx() retval=00400000 ret=003511d9 002e:Call KERNEL32.MapViewOfFileEx(00000040,00000006,00000000,01770000,00420000,01b70000) ret=003511d9 002e:Ret KERNEL32.MapViewOfFileEx() retval=01b70000 ret=003511d9 002e:Call KERNEL32.MapViewOfFileEx(00000040,00000004,00000000,01b90000,00000000,01f90000) ret=003511d9 002e:Ret KERNEL32.MapViewOfFileEx() retval=01f90000 ret=003511d9 002e:trace:seh:raise_exception code=c0000096 flags=0 addr=0x40ebd1 ip=0040ebd1 tid=002e 002e:trace:seh:raise_exception eax=00000003 ebx=0033e954 ecx=0033e144 edx=00000000 esi=00415960 edi=003511f8 002e:trace:seh:raise_exception ebp=0033e940 esp=0033e2b0 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010213 002e:trace:seh:call_vectored_handlers calling handler at 0x422ae0 code=c0000096 flags=0 002e:trace:seh:call_vectored_handlers handler at 0x422ae0 returned ffffffff ... 002e:Call ntdll.RtlRemoveVectoredExceptionHandler(0012df98) ret=004101e9 002e:Ret ntdll.RtlRemoveVectoredExceptionHandler() retval=00000001 ret=004101e9 ... --- snip ---
Custom imports resolver, with dynamic thunk creation
--- snip --- ... 002e:Call KERNEL32.LoadLibraryA(0033dedc "KERNEL32.dll") ret=00418c89 002e:Ret KERNEL32.LoadLibraryA() retval=7b420000 ret=00418c89 002e:Call KERNEL32.VirtualAlloc(00000000,00001000,00001000,00000040) ret=00419133 002e:Ret KERNEL32.VirtualAlloc() retval=00370000 ret=00419133 002e:Call KERNEL32.GetProcAddress(7b420000,0033d9ec "FlushViewOfFile") ret=0041953e 002e:Ret KERNEL32.GetProcAddress() retval=7b42fcd8 ret=0041953e 002e:Call KERNEL32.GetProcAddress(7b420000,0033d9ec "UnlockFileEx") ret=0041953e 002e:Ret KERNEL32.GetProcAddress() retval=7b433998 ret=0041953e ... --- snip ---
Example of win32 API call via generated thunk:
--- snip --- ... 0115AF01 FF75 0C PUSH DWORD PTR SS:[EBP+C] 0115AF04 50 PUSH EAX ; thunk for 0115AF05 FF15 24157301 CALL DWORD PTR DS:[1731524] ; KERNEL32.GetProcAddress 0115AF0B 8BF0 MOV ESI,EAX 0115AF0D 85F6 TEST ESI,ESI 0115AF0F 74 13 JE SHORT 0115AF24
thunk:
--- snip --- ... 01731524 003F0A6E ... 003F0A6E B8 1276EBCA MOV EAX,CAEB7612 003F0A73 E9 B4FDFFFF JMP 003F082C ... 003F082C 2D 413A9229 SUB EAX,29923A41 003F0831 05 0B7E7417 ADD EAX,17747E0B 003F0836 35 EBE9F83C XOR EAX,3CF8E9EB 003F083B E9 62060000 JMP 003F0EA2 ... 003F0EA2 2D 93E96315 SUB EAX,1563E993 003F0EA7 E9 1CFFFFFF JMP 003F0DC8 ... 003F0DC8 05 9FD9740C ADD EAX,0C74D99F 003F0DCD FFE0 JMP EAX ; -> real KERNEL32.GetProcAddress
Wine KERNEL32.GetProcAddress:
7B464043 8D4C24 04 LEA ECX,DWORD PTR SS:[ESP+4] 7B464047 83E4 F0 AND ESP,FFFFFFF0 7B46404A FF71 FC PUSH DWORD PTR DS:[ECX-4] 7B46404D 55 PUSH EBP 7B46404E 89E5 MOV EBP,ESP 7B464050 51 PUSH ECX 7B464051 83EC 04 SUB ESP,4 7B464054 89C8 MOV EAX,ECX 7B464056 83EC 08 SUB ESP,8 7B464059 FF70 04 PUSH DWORD PTR DS:[EAX+4] 7B46405C FF30 PUSH DWORD PTR DS:[EAX] 7B46405E E8 C7FFFFFF CALL 7B46402A ... --- snip ---
Mappings:
--- snip --- 00400000 00001000 Diablo_III PE header Map R E R E 00401000 01330000 Diablo_III .text Code Map R E R E 01731000 0043F000 Diablo_III .rdata Imports Map R E R E 01B70000 0000B000 Diablo_III .rdata Exports Map RW RW 01B7B000 00403000 Diablo_III .data Data Map RW RW 01F7E000 00001000 Diablo_III stkresv Map RW RW 01F7F000 00001000 Diablo_III .gfids Map RW RW 01F80000 00001000 Diablo_III .tls Map RW RW 01F81000 0000A000 Diablo_III _RDATA Map RW RW 01F8B000 00005000 Diablo_III .rsrc Resources Map RW RW 01F90000 0052C000 Diablo_III .rsrc Resources Map R R 024BC000 0011B000 Diablo_III .reloc Relocations Map R R --- snip ---
A few native API functions get directly resolved in memory by walking the export table, with no visible 'GetProcAddress' calls.
--- snip --- ... 002e:Call KERNEL32.GetStartupInfoW(0033fe30) ret=0111c114 002e:Ret KERNEL32.GetStartupInfoW() retval=00000011 ret=0111c114 002e:Call KERNEL32.VirtualQuery(0033fe34,0033fe38,0000001c) ret=006ad5db 002e:Ret KERNEL32.VirtualQuery() retval=0000001c ret=006ad5db 002e:trace:seh:raise_exception code=c000001d flags=0 addr=0x6a2008 ip=006a2008 tid=002e 002e:trace:seh:raise_exception eax=95a775b1 ebx=0033ff00 ecx=0033fe00 edx=0111b32f esi=0013703b edi=00340000 002e:trace:seh:raise_exception ebp=0033fe1c esp=0033fde8 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010297 002e:trace:seh:call_stack_handlers calling handler at 0x111e8c8 code=c000001d flags=0 002e:Call iphlpapi.GetAdaptersInfo(00339330,0033e438) ret=004f26c1 ... 002e:Ret iphlpapi.GetAdaptersInfo() retval=00000000 ret=004f26c1 002e:Call KERNEL32.GetVolumeInformationW(00000000,00000000,00000000,0033e44c,00000000,00000000,00000000,00000000) ret=004f28af 002e:Ret KERNEL32.GetVolumeInformationW() retval=00000001 ret=004f28af 002e:trace:seh:raise_exception code=c0000005 flags=0 addr=(nil) ip=00000000 tid=002e 002e:trace:seh:raise_exception info[0]=00000008 002e:trace:seh:raise_exception info[1]=00000000 002e:trace:seh:raise_exception eax=00000000 ebx=00000023 ecx=00000000 edx=0033f8f0 esi=0000002b edi=0000002b 002e:trace:seh:raise_exception ebp=00000000 esp=0033f900 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010286 002e:trace:seh:call_stack_handlers calling handler at (nil) code=c0000005 flags=0 002e:trace:seh:raise_exception code=c0000005 flags=0 addr=(nil) ip=00000000 tid=002e 002e:trace:seh:raise_exception info[0]=00000008 002e:trace:seh:raise_exception info[1]=00000000 002e:trace:seh:raise_exception eax=0033f49c ebx=00000023 ecx=00000000 edx=7bc8fecc esi=0000002b edi=0000002b 002e:trace:seh:raise_exception ebp=0033f448 esp=0033f41c cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010216 002e:trace:seh:call_stack_handlers calling handler at 0x7bc8fecc code=c0000005 flags=0 002e:trace:seh:call_stack_handlers handler at 0x7bc8fecc returned 2 002e:trace:seh:call_stack_handlers calling handler at (nil) code=c0000005 flags=10 --- snip ---
The resolver doesn't handle the case properly when a native API function is missing. It happily generates thunks that decrypt NULL pointers before the jump.
The Wine-Staging 2.21 trace log reveals the missing native API:
--- snip --- ... 0009:Call KERNEL32.GetVolumeInformationW(00000000,00000000,00000000,0033e3dc,00000000,00000000,00000000,00000000) ret=004f28af 0009:Ret KERNEL32.GetVolumeInformationW() retval=00000001 ret=004f28af 0009:Call ntdll.LdrRegisterDllNotification(00000000,006a0ce0,00000000,0033e5b8) ret=004db5d0 0009:Ret ntdll.LdrRegisterDllNotification() retval=00000000 ret=004db5d0 0009:Call ntdll.NtCreateFile(0033e338,00120089,0033e2bc,0033e2b4,00000000,00000000,00000001,00000001,00000020,00000000,00000000) ret=004e0a5f 0009:Ret ntdll.NtCreateFile() retval=00000000 ret=004e0a5f 0009:Call ntdll.NtQueryInformationFile(000000c0,0033e2ac,0033e294,00000018,00000005) ret=004e0f91 0009:Ret ntdll.NtQueryInformationFile() retval=00000000 ret=004e0f91 0009:Call ntdll.NtAllocateVirtualMemory(ffffffff,0033e394,00000000,0033e304,00001000,00000040) ret=004e143d 0009:Ret ntdll.NtAllocateVirtualMemory() retval=00000000 ret=004e143d 0009:Call ntdll.NtReadFile(000000c0,00000000,00000000,00000000,0033e2b4,05070000,00013000,00000000,00000000) ret=004e1786 0009:Ret ntdll.NtReadFile() retval=00000000 ret=004e1786 0009:Call ntdll.NtAllocateVirtualMemory(ffffffff,0033e5c8,00000000,0033e628,00001000,00000004) ret=004dbcee 0009:Ret ntdll.NtAllocateVirtualMemory() retval=00000000 ret=004dbcee 0009:Call user32.SetWinEventHook(00000001,7fffffff,00000000,006a3f20,00000000,00000000,00000002) ret=004ddc86 0009:Ret user32.SetWinEventHook() retval=0002004e ret=004ddc86 ... --- snip ---
These are Vista+ native API:
* ntdll.LdrRegisterDllNotification * ntdll.LdrUnregisterDllNotification
https://github.com/wine-staging/wine-staging/tree/master/patches/ntdll-LdrRe...
The callback is likely used for anti-cheat/hack protection to:
* filter for known/unwanted modules * consistency check in combination with other module enumeration methods * resolving API at very early stage/hooking * pre-patching code before module attach/detach notifications are being sent * replace/redirect the loaded module entry point ... * profit!
ProtectionID scan for exact version:
--- snip --- -=[ ProtectionID v0.6.9.0 DECEMBER]=- (c) 2003-2017 CDKiLLER & TippeX Build 24/12/17-21:05:42 Ready... Scanning -> Z:\home\focht\wine-games\wineprefix64-bnet\drive_c\Program Files (x86)\Diablo III\Diablo III.exe File Type : 32-Bit Exe (Subsystem : Win GUI / 2), Size : 31663592 (01E325E8h) Byte(s) | Machine: 0x14C (I386) Compilation TimeStamp : 0x5A839757 -> Wed 14th Feb 2018 01:56:39 (GMT) [TimeStamp] 0x5A839757 -> Wed 14th Feb 2018 01:56:39 (GMT) | PE Header | - | Offset: 0x00000178 | VA: 0x00400178 | - [TimeStamp] 0x5A83974F -> Wed 14th Feb 2018 01:56:31 (GMT) | Export | - | Offset: 0x0176EC84 | VA: 0x01B70484 | - [TimeStamp] 0x5A839757 -> Wed 14th Feb 2018 01:56:39 (GMT) | DebugDirectory | - | Offset: 0x015380D4 | VA: 0x019398D4 | - [TimeStamp] 0x5A839757 -> Wed 14th Feb 2018 01:56:39 (GMT) | DebugDirectory | - | Offset: 0x015380F0 | VA: 0x019398F0 | - [TimeStamp] 0x5A839757 -> Wed 14th Feb 2018 01:56:39 (GMT) | DebugDirectory | - | Offset: 0x0153810C | VA: 0x0193990C | - -> File Appears to be Digitally Signed @ Offset 01E30E00h, size : 017E8h / 06120 byte(s) [!] Executable uses TLS callbacks (3 total... 0 invalid addresses) [LoadConfig] Struct determined as v8 (Expected size 140 | Actual size 64) [!] Executable uses SEH Tables (/SAFESEH) (33371 calculated 33199 recorded... 70 invalid addresses) [!] * table may be compressed / encrypted * [LoadConfig] CodeIntegrity -> Flags 0x7C34 | Catalog 0xBFD3 (49107) | Catalog Offset 0x2FE93D5F | Reserved 0x49CB461F [LoadConfig] GuardAddressTakenIatEntryTable 0x4F29FF9C | Count 0x992AA633 (2569709107) [LoadConfig] GuardLongJumpTargetTable 0x12E9CCF3 | Count 0xB9F3D522 (3119764770) [LoadConfig] HybridMetadataPointer 0x21CA7CB6 | DynamicValueRelocTable 0xF1654DDC [LoadConfig] FailFastIndirectProc 0x64AE2974 | FailFastPointer 0xCA03C693 [LoadConfig] UnknownZero1 0x6B52C00 [!] Warning: Imports (+size) goes outside of the file [File Heuristics] -> Flag #1 : 00000100000001001101000100110100 (0x0404D134) [Entrypoint Section Entropy] : 8.00 (section #0) ".text " | Size : 0x132F368 (20116328) byte(s) [DllCharacteristics] -> Flag : (0x8140) -> ASLR | DEP | TSA [SectionCount] 9 (0x9) | ImageSize 0x21D7000 (35483648) byte(s) [Export] 96% of function(s) (357 of 369) are in file | 0 are forwarded | 343 code | 26 data | 0 uninit data | 0 unknown | [VersionInfo] Company Name : Blizzard Entertainment [VersionInfo] Product Name : Diablo III [VersionInfo] Product Version : Version 2.6 [VersionInfo] File Description : Diablo III Retail [VersionInfo] File Version : 2. 6. 1. 49286 [VersionInfo] Original FileName : Diablo III.exe [VersionInfo] Internal Name : Diablo III [VersionInfo] Legal Copyrights : Copyright © 2011-2014 [ModuleReport] [IAT] Modules -> USER32.dll [Debug Info] (record 1 of 3) (file offset 0x15380D0) Characteristics : 0x0 | TimeDateStamp : 0x5A839757 (Wed 14th Feb 2018 01:56:39 (GMT)) | MajorVer : 0 / MinorVer : 0 -> (0.0) Type : 2 (0x2) -> CodeView | Size : 0x53 (83) AddressOfRawData : 0x158C96C | PointerToRawData : 0x158B16C CvSig : 0x53445352 | SigGuid E65D58F8-37DC-47BC-B32D251EF458F1F8 Age : 0x1 (1) | Pdb : D:\BuildServer\4\work\code\branches\Release\Diablo III.pdb [Debug Info] (record 2 of 3) (file offset 0x15380EC) Characteristics : 0x0 | TimeDateStamp : 0x5A839757 (Wed 14th Feb 2018 01:56:39 (GMT)) | MajorVer : 0 / MinorVer : 0 -> (0.0) Type : 12 (0xC) -> Undocumented | Size : 0x14 (20) AddressOfRawData : 0x158C9C0 | PointerToRawData : 0x158B1C0 [Debug Info] (record 3 of 3) (file offset 0x1538108) Characteristics : 0x0 | TimeDateStamp : 0x5A839757 (Wed 14th Feb 2018 01:56:39 (GMT)) | MajorVer : 0 / MinorVer : 0 -> (0.0) Type : 13 (0xD) -> Undocumented | Size : 0x828 (2088) AddressOfRawData : 0x158C9D4 | PointerToRawData : 0x158B1D4 [CdKeySerial] found "Invalid code" @ VA: 0x0133D078 / Offset: 0x0133B878 [CdKeySerial] found "SerialNumber" @ VA: 0x0147899F / Offset: 0x0147719F [CdKeySerial] found "Invalid code" @ VA: 0x014C7980 / Offset: 0x014C6180 [CompilerDetect] -> Visual C++ 14.0 (Visual Studio 2015) [!] File appears to have no protection or is using an unknown protection - Scan Took : 5.583 Second(s) [000001529h (5417) tick(s)] [506 of 580 scan(s) done] --- snip ---
$ wine --version wine-3.2-173-gea82a00a42
Regards
https://bugs.winehq.org/show_bug.cgi?id=44585
Mikko Rasa tdb@tdb.fi changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tdb@tdb.fi
--- Comment #2 from Mikko Rasa tdb@tdb.fi --- Can confirm. Any 3.x release crashes at startup, 2.21-staging works. Unfortunately the staging patches contain one which makes a held-down mouse button frequently be interpreted as a single click. This makes playing Diablo III really annoying, so at the moment no version of Wine is readily usable for me.
It may be worth noting that before this week's patch for the game Wine 3.x did work, so it seems the patch for the previous issue which required staging has been migrated to mainline. What would be required to get this one migrated and is there anything I can do to help? I don't know much of Windows internals but I'm otherwise an experienced programmer.
I'm using PlayOnLinux to manage my Wine installations and prefixes if that matters.
https://bugs.winehq.org/show_bug.cgi?id=44585
--- Comment #3 from Mikko Rasa tdb@tdb.fi --- I tried compiling a custom version of Wine with just the LdrRegisterDllNotification patch (and dependencies) from staging, but Diablo III still crashes.
0009:Call ntdll.RtlFreeHeap(00110000,00000000,0018db80) ret=7da32a08 0009:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7da32a08 0009:Ret iphlpapi.GetAdaptersInfo() retval=00000000 ret=004f26c1 0009:Call KERNEL32.GetVolumeInformationW(00000000,00000000,00000000,0033e4dc,00000000,00000000,00000000,00000000) ret=004f28af 0009:Ret KERNEL32.GetVolumeInformationW() retval=00000001 ret=004f28af 0009:Call ntdll.LdrRegisterDllNotification(00000000,006a0ce0,00000000,0033e6b8) ret=004db5d0 0009:Ret ntdll.LdrRegisterDllNotification() retval=00000000 ret=004db5d0 0009:trace:seh:raise_exception code=c0000005 flags=0 addr=(nil) ip=00000000 tid=0009 0009:trace:seh:raise_exception info[0]=00000008 0009:trace:seh:raise_exception info[1]=00000000 0009:trace:seh:raise_exception eax=00000000 ebx=7bcdc000 ecx=00000000 edx=0033f980 esi=0033fe1c edi=0033fda0 0009:trace:seh:raise_exception ebp=00000000 esp=0033f990 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010286 0009:trace:seh:call_stack_handlers calling handler at (nil) code=c0000005 flags=0
According to the log from 2.21-staging the next call should be NtCreateFile. That function is already implemented in wine's ntdll so I don't know what's going wrong now.
https://bugs.winehq.org/show_bug.cgi?id=44585
--- Comment #4 from Anastasius Focht focht@gmx.net --- Hello folks,
--- quote --- I tried compiling a custom version of Wine with just the LdrRegisterDllNotification patch (and dependencies) from staging, but Diablo III still crashes. --- quote ---
well I never said that adding OS loader module notification callback interface alone makes the game(s) fully functional. Unlike other bug reports (Overwatch, World of Warcraft) which are completely messed up I separate issues for better traceability and testing. Of course there are still more patches missing.
--- quote --- According to the log from 2.21-staging the next call should be NtCreateFile. That function is already implemented in wine's ntdll so I don't know what's going wrong now. --- quote ---
As I already said: guessing from trace log is pointless as the imports resolving phase is invisible. One has to debug the code to see it.
After ntdll.LdrRegisterDllNotification(), the obfuscated code resolves another bunch of imports. The module and API function names to be resolved are obfuscated using pre-computed hashes. Basically the in-memory export table for 'ntdll, 'kernel32', 'user32' and 'gdi32' modules is walked, all the function names are hashed and compared against the precomputed hashes for matches. There is even a Windows version awareness in this phase. Depending on the WinVer setting (WinXP vs. Win7), few different APIs are resolved.
I wish the orginial patch authors would have put more effort into traceability. Many times a reference to a bug report/ticket/link to discussion is missing. The sheer number of patches in Wine-Staging makes it almost impossible to extract the minimum required set to fix a certain class of problems/games/apps. I would rather avoid wasting my time debugging this crap to identify the minimum set of patches required and exact order (it's not fun) ... but well.
Anyway, I will create additional tickets to cover the minimum patches that need to be applied to make this game functional with vanilla Wine 3.2
Regards
https://bugs.winehq.org/show_bug.cgi?id=44585
--- Comment #5 from Mikko Rasa tdb@tdb.fi --- My mistake. I somehow assumed that would be the only patch required to make it work. I compiled another custom version with every patch from staging except the one that breaks mouse handling (server-send_hardware_message) and that got me a working game. So somewhere there is a minimal set of patches that solves this issue.
I suppose one could develop a bisection search script to help determine which patches are needed. Drop half of the patches (paying attention to dependencies) and if it breaks, at least one patch from that half was necessary. Rinse and repeat until the exact patches have been pinpointed. Still takes a fair amount of time but less than checking every patch one by one.
https://bugs.winehq.org/show_bug.cgi?id=44585
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |44616
https://bugs.winehq.org/show_bug.cgi?id=44585
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Blizzard Diablo III v2. 6. |Multiple Blizzard games |1. 49286+ crashes with |need |setup_exception_record |ntdll.LdrRegisterDllNotific |stack overflow (needs |ation/LdrUnregisterDllNotif |ntdll.LdrRegisterDllNotific |ication implementation |ation/LdrUnregisterDllNotif |(Diablo III v2. 6. 1. |ication implementation) |49286+, World of Warcraft, | |Overwatch)
https://bugs.winehq.org/show_bug.cgi?id=44585
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=44585
mirh mirh@protonmail.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mirh@protonmail.ch
https://bugs.winehq.org/show_bug.cgi?id=44585
Ker noa blue-t@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |blue-t@web.de
https://bugs.winehq.org/show_bug.cgi?id=44585
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alexhenrie24@gmail.com
--- Comment #6 from Anastasius Focht focht@gmx.net --- *** Bug 45205 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=44585
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Multiple Blizzard games |Multiple applications and |need |games need |ntdll.LdrRegisterDllNotific |ntdll.LdrRegisterDllNotific |ation/LdrUnregisterDllNotif |ation/LdrUnregisterDllNotif |ication implementation |ication implementation |(Diablo III v2. 6. 1. |(Firefox 60+, Diablo III |49286+, World of Warcraft, |v2. 6. 1. 49286+, World of |Overwatch) |Warcraft, Overwatch)
https://bugs.winehq.org/show_bug.cgi?id=44585
David Brooks skade88@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |skade88@gmail.com
--- Comment #7 from David Brooks skade88@gmail.com --- I can confirm that the game does not launch in wine 3.10 but it does launch in Wine 3.10 (Staging). Is there still a need to go through and find out which staging patches combined fixed the issue(s) so they can be brought forward as a group?
https://bugs.winehq.org/show_bug.cgi?id=44585
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #8 from Zebediah Figura z.figura12@gmail.com --- (In reply to David Brooks from comment #7)
I can confirm that the game does not launch in wine 3.10 but it does launch in Wine 3.10 (Staging). Is there still a need to go through and find out which staging patches combined fixed the issue(s) so they can be brought forward as a group?
The patches are already linked to this bug; see the "Staged patchset" field.
Whoever intends to submit them needs to be sure that they are correct. In particular the attached tests seem to me to be poorly written, and are known to fail on multiple Windows versions.
It's high on Alistair's and my list of things to do, but our list is long. We certainly welcome anyone else taking up this patchset for us.
https://bugs.winehq.org/show_bug.cgi?id=44585
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|STAGED |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |4c13e1765f559b322d8c071b2e2 | |3add914981db7 CC| |leslie_alistair@hotmail.com
--- Comment #9 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Fixed by https://source.winehq.org/git/wine.git/?a=commit;h=4c13e1765f559b322d8c071b2...
https://bugs.winehq.org/show_bug.cgi?id=44585
sworddragon2@aol.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sworddragon2@aol.com
https://bugs.winehq.org/show_bug.cgi?id=44585
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.12.
https://bugs.winehq.org/show_bug.cgi?id=44585
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |johannespfrang+wine@gmail.c | |om
--- Comment #11 from Anastasius Focht focht@gmx.net --- *** Bug 42391 has been marked as a duplicate of this bug. ***