https://bugs.winehq.org/show_bug.cgi?id=47320
Bug ID: 47320 Summary: Black Ops 4 Unhandled Exception When Loading gdi32.dll Product: Wine Version: 4.9 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdi32 Assignee: wine-bugs@winehq.org Reporter: minion.procyk@gmail.com Distribution: ---
Created attachment 64634 --> https://bugs.winehq.org/attachment.cgi?id=64634 winedebug=trace+all +pid +tid. gdi32 fails to load
I spent some time trying to dig into why Black Ops 4 fails to launch. The application loads a bunch of dlls, gets to gdi32.dll, tries to map it, seemingly does so successfully and then application raises an exception:
20749.663:0008:0009:trace:seh:NtRaiseException code=80000003 flags=0 addr=0x10001a30 ip=10001a31 tid=0009
Attached is the log using WINEDEBUG=trace+all,+sed,+pid,+tid.
https://bugs.winehq.org/show_bug.cgi?id=47320
--- Comment #1 from minion minion.procyk@gmail.com --- i should also mention I achieved these results with latest wine from master built with wine-staging with an added implementation of the alloc_size in NtCreateFile. I don't think those updates were relevant to this bug since it hits the same error at the same spot on the same dll.
https://bugs.winehq.org/show_bug.cgi?id=47320
pattietreutel katyaberezyaka@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |katyaberezyaka@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=47320
--- Comment #2 from minion minion.procyk@gmail.com --- Created attachment 64814 --> https://bugs.winehq.org/attachment.cgi?id=64814 setup_exception stack overflow 2144 bytes
Ran with latest master to date, different error msg, but still kinda the same thing. Log is with the following: WINEDEBUG=trace+ntdll,+pid,+tid.
https://bugs.winehq.org/show_bug.cgi?id=47320
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|gdi32 |build-env CC| |z.figura12@gmail.com
--- Comment #3 from Zebediah Figura z.figura12@gmail.com --- Well, it's trying to load it manually using kernel32 mapping APIs for some reason, and the fake DLL probably isn't real enough. You may try wine-staging, although Alexandre Julliard is currently working on improving fake DLLs in upstream Wine.
https://bugs.winehq.org/show_bug.cgi?id=47320
--- Comment #4 from minion minion.procyk@gmail.com --- Created attachment 64859 --> https://bugs.winehq.org/attachment.cgi?id=64859 Unhandled exception 0x80000003
With wine-staging 4.12.1 i get Unhandled exception 0x80000003 in thread 9 at address 0x10001a60 (thread 0009), starting debugger... at the same point where the application tries to load gdi32.dll. The last few calls tracing ntdll show:
0008:0009:trace:ntdll:FILE_CreateFile handle=0x24dd28 access=20100001 name=L"\??\C:\windows\system32\gdi32.dll" objattr=00000002 root=(nil) sec=(nil) io=0x24dd10 alloc_size=0x24dd80 attr=00000080 sharing=00000001 disp=1 options=00000000 ea=(nil).0x00000000 0008:0009:fixme:ntdll:FILE_CreateFile alloc_size not supported 0008:0009:trace:ntdll:NtQueryInformationFile (0xcc,0x24dba0,0x24faf0,0x00000208,0x00000009) wine: Unhandled exception 0x80000003 in thread 9 at address 0x10001a60 (thread 0009), starting debugger...
I'll continue to test as changes are being added.
https://bugs.winehq.org/show_bug.cgi?id=47320
--- Comment #5 from minion minion.procyk@gmail.com --- same issue wine-4.13
https://bugs.winehq.org/show_bug.cgi?id=47320
--- Comment #6 from minion minion.procyk@gmail.com --- seems like the libraries don't even try to load at this point.
wine-4.18
0009:err:module:import_dll Library oo2core_6_win64.dll (which is needed by L"C:\Program Files (x86)\Call of Duty Black Ops 4\BlackOps4.exe") not found 0009:err:module:import_dll Library bink2w64.dll (which is needed by L"C:\Program Files (x86)\Call of Duty Black Ops 4\BlackOps4.exe") not found 0009:err:module:import_dll Library REV.Runtime.dll (which is needed by L"C:\Program Files (x86)\Call of Duty Black Ops 4\BlackOps4.exe") not found 0009:err:module:import_dll Library vivoxsdk_x64.dll (which is needed by L"C:\Program Files (x86)\Call of Duty Black Ops 4\BlackOps4.exe") not found 0009:err:module:LdrInitializeThunk Importing dlls for L"C:\Program Files (x86)\Call of Duty Black Ops 4\BlackOps4.exe" failed, status c0000135
I assure you those dll files are present and in fact are in the same directory as the executing process. I will also try with staging patches and report if the results are any different.
https://bugs.winehq.org/show_bug.cgi?id=47320
--- Comment #7 from minion minion.procyk@gmail.com --- wine-4.18 staging also fails to find the dlls to load.
Just browsing through the commits looks like a handful of things were changed regarding loading dlls, search paths, and opening files so im not too surprised.
Wine-4.17 gives the same results as the previous posts
https://bugs.winehq.org/show_bug.cgi?id=47320
--- Comment #8 from minion minion.procyk@gmail.com --- Thought i would give an update, back to the good ol' stack overflow exception while loading dlls ending in:
0009:err:seh:setup_exception stack overflow 1760 bytes in thread 0009 eip 000000007bcbd807 esp 0000000000130f30 stack 0x130000-0x131000-0x230000
https://bugs.winehq.org/show_bug.cgi?id=47320
--- Comment #9 from minion minion.procyk@gmail.com --- I should have mentioned this was current wine git.
$ ./wine --version wine-4.20-141-g90fc020400
https://bugs.winehq.org/show_bug.cgi?id=47320
--- Comment #10 from minion minion.procyk@gmail.com --- same issue on latest wine, different byte amount:
01e1:err:seh:setup_exception stack overflow 2016 bytes in thread 01e1 eip 000000007bcbf775 esp 0000000000130e30 stack 0x130000-0x131000-0x230000
https://bugs.winehq.org/show_bug.cgi?id=47320
mirh mirh@protonmail.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mirh@protonmail.ch
https://bugs.winehq.org/show_bug.cgi?id=47320
--- Comment #11 from minion minion.procyk@gmail.com --- no stack overflow but still the same problem, application fails to map gdi32.dll. Tried both wine/wine staging.
65207.895:0120:0124:trace:file:find_drive_rootA "/media/big_drive/media/Games/battlenet/drive_c/windows/system32/gdi32.dll" -> drive C:, root="/media/big_drive/media/Games/battlenet/drive_c", name="/windows/system32/gdi32.dll" 65207.896:0120:0124:trace:heap:RtlFreeHeap (0x10000,30000062,0x3b5b0): returning TRUE 65207.896:0120:0124:trace:heap:RtlAllocateHeap (0x10000,30000062,00000044): returning 0x363a0 65207.896:0120:0124:trace:heap:RtlFreeHeap (0x10000,30000062,0x363a0): returning TRUE 65207.896:0120:0124:trace:heap:RtlFreeHeap (0x10000,30000062,0x11dbae0): returning TRUE 65207.896:0120:0124:Ret ntdll.NtQueryInformationFile() retval=00000000 ret=7b01ea13 65207.896:0120:0124:Ret KERNEL32.GetFileInformationByHandleEx() retval=00000001 ret=140029da5 65207.896:0120:0124:Call ntdll.NtCreateSection(0021dae0,000f001f,00000000,0021daf0,00000020,01000000,000000a8) ret=14002ace2 0124: create_mapping( access=000f001f, flags=01000000, file_access=00000001, size=00000000, file_handle=00a8, objattr={} ) 0124: create_mapping() = 0 { handle=00ac } 65207.896:0120:0124:Ret ntdll.NtCreateSection() retval=00000000 ret=14002ace2 65207.896:0120:0124:Call ntdll.NtMapViewOfSection(000000ac,ffffffffffffffff,0021da90,00000000,00000000,00000000,0021dae8,00000002,00000000,00000020) ret=14002af04 65207.896:0120:0124:trace:virtual:NtMapViewOfSection handle=0xac process=0xffffffffffffffff addr=(nil) off=000000000 size=0 access=20 0124: get_mapping_info( handle=00ac, access=0000000c ) 0124: get_mapping_info() = 0 { size=00007000, flags=01800000, shared_file=0000, image={base=10000000,entry_point=10001000,map_size=00007000,stack_size=00100000,stack_commit=00001000,zerobits=00000000,subsystem=00000000,subsystem_low=0000,subsystem_high=0004,gp=00000000,image_charact=2022,dll_charact=0100,machine=8664,contains_code=1,image_flags=80,loader_flags=00000000,header_size=00000200,file_size=000045e0,checksum=00000000,cpu=x86_64} } 0124: get_handle_fd( handle=00ac ) 0124: *fd* 00ac -> 162 0124: get_handle_fd() = 0 { type=1, cacheable=1, access=000f001f, options=00000020 } 65207.896:0120:0124:trace:module:map_image mapped PE file at 0x10000000-0x10007000 65207.896:0120:0124:trace:module:map_image mapping section .text at 0x10001000 off 200 size 5 virt 1000 flags 60000020 65207.896:0120:0124:trace:module:map_image clearing 0x10001200 - 0x10002000 65207.896:0120:0124:trace:module:map_image mapping section .reloc at 0x10002000 off 400 size 8 virt 1000 flags 42000040 65207.896:0120:0124:trace:module:map_image clearing 0x10002200 - 0x10003000 65207.896:0120:0124:trace:module:map_image mapping section .rsrc at 0x10003000 off 600 size 3fe0 virt 4000 flags 40000040 0124: map_view( mapping=00ac, access=0000000c, base=10000000, size=00007000, start=00000000 ) 0124: map_view() = 0 65207.896:0120:0124:trace:virtual:VIRTUAL_DumpView View: 0x10000000 - 0x10006fff (image) 65207.896:0120:0124:trace:virtual:VIRTUAL_DumpView 0x10000000 - 0x10000fff c-r-- 65207.896:0120:0124:trace:virtual:VIRTUAL_DumpView 0x10001000 - 0x10001fff c-r-x 65207.896:0120:0124:trace:virtual:VIRTUAL_DumpView 0x10002000 - 0x10006fff c-r-- 65207.896:0120:0124:Ret ntdll.NtMapViewOfSection() retval=00000000 ret=14002af04 65207.896:0120:0124:Call KERNEL32.CloseHandle(000000ac) ret=14002b1ae 65207.896:0120:0124:Call ntdll.NtClose(000000ac) ret=7b04a2e4 0124: close_handle( handle=00ac ) 0124: close_handle() = 0 65207.896:0120:0124:Ret ntdll.NtClose() retval=00000000 ret=7b04a2e4 65207.896:0120:0124:Ret KERNEL32.CloseHandle() retval=00000001 ret=14002b1ae 65207.896:0120:0124:Call KERNEL32.CloseHandle(000000a8) ret=14002b454 65207.896:0120:0124:Call ntdll.NtClose(000000a8) ret=7b04a2e4 0124: close_handle( handle=00a8 ) 0124: close_handle() = 0 65207.896:0120:0124:Ret ntdll.NtClose() retval=00000000 ret=7b04a2e4 65207.896:0120:0124:Ret KERNEL32.CloseHandle() retval=00000001 ret=14002b454 65207.897:0120:0124:Call KERNEL32.VirtualProtect(10000000,00000000,00000004,0021dad0) ret=14002c8b2 65207.897:0120:0124:Call ntdll.NtProtectVirtualMemory(ffffffffffffffff,0021d978,0021d980,00000004,0021dad0) ret=7b038536 65207.897:0120:0124:trace:virtual:NtProtectVirtualMemory 0xffffffffffffffff 0x10000000 00000000 00000004 65207.897:0120:0124:trace:virtual:VIRTUAL_DumpView View: 0x10000000 - 0x10006fff (image) 65207.897:0120:0124:trace:virtual:VIRTUAL_DumpView 0x10000000 - 0x10000fff c-r-- 65207.897:0120:0124:trace:virtual:VIRTUAL_DumpView 0x10001000 - 0x10001fff c-r-x 65207.897:0120:0124:trace:virtual:VIRTUAL_DumpView 0x10002000 - 0x10006fff c-r-- 65207.897:0120:0124:Ret ntdll.NtProtectVirtualMemory() retval=00000000 ret=7b038536 65207.897:0120:0124:Ret KERNEL32.VirtualProtect() retval=00000001 ret=14002c8b2 65207.897:0120:0124:Call KERNEL32.VirtualProtect(10000000,00000000,00000002,0021dad0) ret=14002cf4c 65207.897:0120:0124:Call ntdll.NtProtectVirtualMemory(ffffffffffffffff,0021d978,0021d980,00000002,0021dad0) ret=7b038536 65207.897:0120:0124:trace:virtual:NtProtectVirtualMemory 0xffffffffffffffff 0x10000000 00000000 00000002 65207.897:0120:0124:trace:virtual:VIRTUAL_DumpView View: 0x10000000 - 0x10006fff (image) 65207.897:0120:0124:trace:virtual:VIRTUAL_DumpView 0x10000000 - 0x10000fff c-r-- 65207.897:0120:0124:trace:virtual:VIRTUAL_DumpView 0x10001000 - 0x10001fff c-r-x 65207.897:0120:0124:trace:virtual:VIRTUAL_DumpView 0x10002000 - 0x10006fff c-r-- 65207.897:0120:0124:Ret ntdll.NtProtectVirtualMemory() retval=00000000 ret=7b038536 65207.897:0120:0124:Ret KERNEL32.VirtualProtect() retval=00000001 ret=14002cf4c 65207.897:0120:0124:trace:seh:raise_exception code=c0000005 flags=0 addr=0x15324d8e8 ip=15324d8e8 tid=0124 65207.897:0120:0124:trace:seh:raise_exception info[0]=0000000000000000 65207.897:0120:0124:trace:seh:raise_exception info[1]=0000000010405a4d 65207.897:0120:0124:trace:seh:raise_exception rax=000000000021db58 rbx=0000000000000000 rcx=00000000b5d11452 rdx=0000000000000064 65207.897:0120:0124:trace:seh:raise_exception rsi=0000000010000000 rdi=0000000000000000 rbp=000000000021db20 rsp=000000000021da20 65207.897:0120:0124:trace:seh:raise_exception r8=0000000000000065 r9=0000000010000000 r10=000000000021db58 r11=00000000101e7ef5 65207.897:0120:0124:trace:seh:raise_exception r12=0000000010000000 r13=0000000010000000 r14=0000000010000060 r15=0000000000000060
wine-5.8-173-g9e26bc8116
https://bugs.winehq.org/show_bug.cgi?id=47320
--- Comment #12 from mirh mirh@protonmail.ch --- See bug 48171 for tentative progress
https://github.com/rbernon/wine/tree/wip/improved-fakedlls/v1
https://bugs.winehq.org/show_bug.cgi?id=47320
--- Comment #13 from minion minion.procyk@gmail.com --- thanks for working on this team, application doesn't seem to fail on gdi32 anymore. It gets a little farther. Upon pressing play I get a window popup that disappears soon after showing. Seems like the game is trying to do some property handling and fails to get/set something and abruptly exits.
-- snip -- 03d4:03dc:trace:seh:NtQueryInformationThread (0xfffffffffffffffe,9,0x1b8bf78,8,(nil)) 03d4:03dc:trace:seh:NtSetInformationThread (0xfffffffffffffffe,17,0x1b8ede8,1) 03d4:03dc:trace:seh:NtSetInformationThread (0x48e897101e554,17,(nil),0) 03d4:03dc:trace:seh:NtSetInformationThread (0xfffffffffffffffe,17,(nil),0) 03d4:03dc:trace:seh:NtQueryInformationThread (0xfffffffffffffffe,17,0x1b8ede8,4,(nil)) 03d4:03dc:trace:seh:NtQueryInformationThread (0x48e89710e4842,17,0x1b8ede8,4,(nil)) 03d4:03dc:trace:seh:NtQueryInformationThread (0xfffffffffffffffe,17,0x1b8ede8,1,(nil)) 03d4:03e0:trace:seh:NtQueryInformationThread (0xfffffffffffffffe,9,0x1c9bf78,8,(nil)) 03d4:03e0:trace:seh:NtSetInformationThread (0xfffffffffffffffe,17,0x1c9ede8,1) 03d4:03e0:trace:seh:NtSetInformationThread (0x48e89712ca7fe,17,(nil),0) 03d4:03e0:trace:seh:NtSetInformationThread (0xfffffffffffffffe,17,(nil),0) 03d4:03e0:trace:seh:NtQueryInformationThread (0xfffffffffffffffe,17,0x1c9ede8,4,(nil)) 03d4:03e0:trace:seh:NtQueryInformationThread (0x48e8971374554,17,0x1c9ede8,4,(nil)) 03d4:03e0:trace:seh:NtQueryInformationThread (0xfffffffffffffffe,17,0x1c9ede8,1,(nil)) 03d4:03dc:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFFFFFFFFFA, 0000000001B8FE10 03d4:03e0:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFFFFFFFFFA, 0000000001C9FE10 03d4:03e0:trace:seh:NtSetInformationThread (0xfffffffffffffffe,3,0x1c9fdcc,4) 0078:0088:trace:seh:NtQueryInformationThread (0x364,0,0xeaf730,30,(nil)) 03d4:03d8:trace:seh:dispatch_exception code=80000003 flags=0 addr=000000014236DD08 ip=4236dd07 tid=03d8 03d4:03d8:trace:seh:dispatch_exception info[0]=000000000021fad0 03d4:03d8:trace:seh:dispatch_exception rax=000000000021fad0 rbx=0000000044c4a720 rcx=000000007bc692a0 rdx=00000000000a85a8 03d4:03d8:trace:seh:dispatch_exception rsi=0000000000000000 rdi=0000000000000000 rbp=000000000021fab0 rsp=000000000021fa78 03d4:03d8:trace:seh:dispatch_exception r8=0000000000000038 r9=0000000040000470 r10=0000000000000038 r11=0000000000010138 03d4:03d8:trace:seh:dispatch_exception r12=0000000000000000 r13=0000000000000000 r14=0000000000000000 r15=0000000000000000 03d4:03d8:trace:seh:call_vectored_handlers calling handler at 0000000152D14241 code=80000003 flags=0 03d4:03d8:trace:seh:call_vectored_handlers handler at 0000000152D14241 returned ffffffff -- snip --
not sure if this is relevant but process is also having trouble reading some thread info which gets a spammed a few times.
-- snip -- 03d4:03e8:warn:seh:get_thread_times Failed to open /proc/34351/stat: No such file or directory 0140:0144:warn:seh:get_thread_times Failed to open /proc/34351/stat: No such file or directory -- snip --
and then it tries to set the language for the game
-- snip -- 03d4:03d8:fixme:nls:get_dummy_preferred_ui_language (0x8 000000000021E740 0000000000000000 000000000021E744) returning a dummy value (current locale) 03d4:03d8:fixme:nls:get_dummy_preferred_ui_language (0x8 000000000021E740 00000000000A9680 000000000021E744) returning a dummy value (current locale) 03d4:03d8:fixme:nls:RtlGetThreadPreferredUILanguages 00000008, 000000000021C6E0, 0000000000000000 000000000021C6E4 03d4:03d8:fixme:nls:get_dummy_preferred_ui_language (0x8 000000000021C6E0 0000000000000000 000000000021C6E4) returning a dummy value (current locale) 03d4:03d8:fixme:nls:RtlGetThreadPreferredUILanguages 00000008, 000000000021C6E0, 00000000000A9686 000000000021C6E4 03d4:03d8:fixme:nls:get_dummy_preferred_ui_language (0x8 000000000021C6E0 00000000000A9686 000000000021C6E4) returning a dummy value (current locale) 03d4:03d8:fixme:nls:RtlSetThreadPreferredUILanguages 8, 00000000000A9680, 000000000021C6E0 -- snip --
and then it fails. i find this strange because the application fails right after the error below but i would find it strange that a usb event error would cause the application to crash.
-- snip -- 0078:00a4:err:wineusb:event_thread_proc Error handling events: System call interrupted (perhaps due to signal) -- snip --
these are the relevant bits but il also upload an seh log
https://bugs.winehq.org/show_bug.cgi?id=47320
--- Comment #14 from minion minion.procyk@gmail.com --- the original bug is also solved so maybe i should open a new bug with those details...
https://bugs.winehq.org/show_bug.cgi?id=47320
--- Comment #15 from minion minion.procyk@gmail.com --- few other notes. application fails fast without loading when launching from battlenet.
however when launching the exe directly (blackops4.exe), application creates a window and attempts
-- snip -- fixme:ntdll:NtQuerySystemInformation (0x00000067,0x24b3fb0,0x00000008,0x24b3f58) stub -- snip --
over and over again seemingly infinite after seemingly failing to set the language.
https://bugs.winehq.org/show_bug.cgi?id=47320
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com
--- Comment #16 from Rémi Bernon rbernon@codeweavers.com --- Yes, I think we want to mark this one as resolved if the gdi32 issue is no more, and open a new one for the other problem (whatever it can be).
https://bugs.winehq.org/show_bug.cgi?id=47320
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #17 from Gijs Vermeulen gijsvrm@gmail.com --- Marking FIXED since it was mentioned that the original issue is fixed.
Please open a new bug for the next issue if there is one.
https://bugs.winehq.org/show_bug.cgi?id=47320
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #18 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.22.