Giter VIP home page Giter VIP logo

Comments (14)

ptitSeb avatar ptitSeb commented on June 10, 2024

I reproduce the issue on my X13s with turnip vulkan driver. Using lavapipe also gives the same error. Using dx11 binary also gives the same error.
But the games runs fine on my Ampere machine with NVidia RTX4060 hardware (propriatary driver). Need to explorer more. The stack overflow doesn't seems to be directly linked to vulkan / dx11, but it's hard to say.

from box64.

ptitSeb avatar ptitSeb commented on June 10, 2024

@julliard sorry to ping you, I have an issue with Baldur's Gate 3 and I'm not sure where to debug it: When I launch it on my Ampere machine (ARM64 server with an RTX4060 running Debian), it works fine. But if I launch it on my X13s (Snapdragon laptop run Armbian), using the same wine, same prefix, same game install, it doesn't work, and crash with a stack overflow, wich seems tricky to debug. One thing I noticed is that on the Ampere, the intro logo (the Larian one), have sound, and I can see winepulse and winealsa being loaded on the console, while on the X13s, that logo intro is silent, and no trace of pulse or alsa being loaded. Tje game then crash at loading later, at around 66%, but that value seems dependant to the OS/driver/machine so I think it's irrelevent. It seems the issue in somewhere in the OS, the Ampere runs Debian while the X13s runs Armbian, which is pretty similar. I also tried the Game on a Odin2 (another Snapdragon machine) running Arch linux, but it also crashes, witht the same stack overflow (looks the same anyway), but at 95%. Still need to check if sound is loaded or not. Wine is built with new Wow64. Tried 9.3, 9.5 and 9.7 with all the same results.
Any idea were I should look for, were to start this debugging?

from box64.

julliard avatar julliard commented on June 10, 2024

The lack of sound is suspicious, I'd look into that first. Also try WINEDEBUG=seh to see if the stack overflow is caused by an exception.

from box64.

ptitSeb avatar ptitSeb commented on June 10, 2024

Ok, thanks. Will check if there is some exception before the stack overflow.

from box64.

ptitSeb avatar ptitSeb commented on June 10, 2024

@julliard I did some tracing and noticed a difference between the working machine and the non-working:

extract of the working launch with seh trace:

01b8:trace:seh:dispatch_exception code=406d1388 (EXCEPTION_WINE_NAME_THREAD) flags=0 addr=00006FFFFFC235C7
01b8:trace:seh:dispatch_exception  info[0]=0000000000001000
01b8:trace:seh:dispatch_exception  info[1]=00000000848F2C40
01b8:trace:seh:dispatch_exception  info[2]=00000000000001B8
01b8:trace:seh:dispatch_exception rip=00006fffffc235c7 rsp=00000000656afe30 rbp=fffffffffffffffe eflags=000002c3
01b8:trace:seh:dispatch_exception rax=00000000656afe80 rbx=00000000848f2c40 rcx=00000000656afe50 rdx=0000000000000000
01b8:trace:seh:dispatch_exception rsi=00000000848ecd68 rdi=00000000848ecd60  r8=00000000000001b8  r9=00000000656aff30
01b8:trace:seh:dispatch_exception r10=00007fff00288620 r11=0000000000000202 r12=0000000000000000 r13=0000000000000000
01b8:trace:seh:dispatch_exception r14=0000000000000000 r15=0000000000000000 mxcsr=00001f80
01b8:trace:seh:call_vectored_handlers calling handler at 00006FFFFE7B5F50 code=406d1388 flags=0
01b8:trace:seh:call_vectored_handlers handler at 00006FFFFE7B5F50 returned ffffffff
01b0:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 000000006506EF84, 000000006506EFA0 000000006506EF80
01b0:fixme:nls:get_dummy_preferred_ui_language (0x38 0x409 000000006506EF84 000000006506EFA0 000000006506EF80) returning a dummy value (current locale)
01b0:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 000000006506EF84, 000000006506EFA0 000000006506EF80
01b0:fixme:nls:get_dummy_preferred_ui_language (0x38 0x409 000000006506EF84 000000006506EFA0 000000006506EF80) returning a dummy value (current locale)
ChromaSDKPlugin failed to load!
01b0:trace:seh:dispatch_exception code=406d1388 (EXCEPTION_WINE_NAME_THREAD) flags=0 addr=00006FFFFFC235C7
01b0:trace:seh:dispatch_exception  info[0]=0000000000001000
01b0:trace:seh:dispatch_exception  info[1]=0000000144D34548
01b0:trace:seh:dispatch_exception  info[2]=00000000000001C0
01b0:trace:seh:dispatch_exception rip=00006fffffc235c7 rsp=000000006506f690 rbp=000000006506f920 eflags=00000243
01b0:trace:seh:dispatch_exception rax=000000006506f6e0 rbx=000000008250e080 rcx=000000006506f6b0 rdx=0000000000000000
01b0:trace:seh:dispatch_exception rsi=0000000000000000 rdi=000000006506f93c  r8=00000000000001c0  r9=000000006506f790
01b0:trace:seh:dispatch_exception r10=00007fff00288620 r11=0000000000000202 r12=0000000082020780 r13=0000000000000000
01b0:trace:seh:dispatch_exception r14=00000000ffffffff r15=000000006506fbd0 mxcsr=00001f80
01b0:trace:seh:call_vectored_handlers calling handler at 00006FFFFE7B5F50 code=406d1388 flags=0
01b0:trace:seh:call_vectored_handlers handler at 00006FFFFE7B5F50 returned ffffffff
01b0:trace:seh:dispatch_exception code=406d1388 (EXCEPTION_WINE_NAME_THREAD) flags=0 addr=00006FFFFFC235C7
01b0:trace:seh:dispatch_exception  info[0]=0000000000001000
01b0:trace:seh:dispatch_exception  info[1]=0000000144D2E2C8
01b0:trace:seh:dispatch_exception  info[2]=00000000000001C4
01b0:trace:seh:dispatch_exception rip=00006fffffc235c7 rsp=000000006506f620 rbp=000000006506f920 eflags=00000243
01b0:trace:seh:dispatch_exception rax=000000006506f670 rbx=00000000823a2c40 rcx=000000006506f640 rdx=0000000000000000
01b0:trace:seh:dispatch_exception rsi=00000000846ad040 rdi=0000000000000000  r8=00000000000001c4  r9=000000006506f720
01b0:trace:seh:dispatch_exception r10=00007fff00288620 r11=0000000000000202 r12=0000000082020780 r13=0000000000000000
01b0:trace:seh:dispatch_exception r14=000000008251a600 r15=000000006506f958 mxcsr=00001f80
01b0:trace:seh:call_vectored_handlers calling handler at 00006FFFFE7B5F50 code=406d1388 flags=0
01b0:trace:seh:call_vectored_handlers handler at 00006FFFFE7B5F50 returned ffffffff
01b0:trace:seh:dispatch_exception code=406d1388 (EXCEPTION_WINE_NAME_THREAD) flags=0 addr=00006FFFFFC235C7
01b0:trace:seh:dispatch_exception  info[0]=0000000000001000
01b0:trace:seh:dispatch_exception  info[1]=0000000144D2DF30
01b0:trace:seh:dispatch_exception  info[2]=00000000000001C8
01b0:trace:seh:dispatch_exception rip=00006fffffc235c7 rsp=000000006506f620 rbp=000000006506f920 eflags=00000243
01b0:trace:seh:dispatch_exception rax=000000006506f670 rbx=0000000000000001 rcx=000000006506f640 rdx=0000000000000000
01b0:trace:seh:dispatch_exception rsi=0000000000000000 rdi=000000006506fa08  r8=00000000000001c8  r9=000000006506f720
01b0:trace:seh:dispatch_exception r10=00007fff00288620 r11=0000000000000202 r12=0000000082020780 r13=0000000000000000
01b0:trace:seh:dispatch_exception r14=00000000ffffffff r15=000000006506fbd0 mxcsr=00001f80
01b0:trace:seh:call_vectored_handlers calling handler at 00006FFFFE7B5F50 code=406d1388 flags=0
01b0:trace:seh:call_vectored_handlers handler at 00006FFFFE7B5F50 returned ffffffff
01b0:trace:seh:dispatch_exception code=406d1388 (EXCEPTION_WINE_NAME_THREAD) flags=0 addr=00006FFFFFC235C7
01b0:trace:seh:dispatch_exception  info[0]=0000000000001000
01b0:trace:seh:dispatch_exception  info[1]=0000000144D2BD08
01b0:trace:seh:dispatch_exception  info[2]=00000000000001CC
01b0:trace:seh:dispatch_exception rip=00006fffffc235c7 rsp=000000006506f690 rbp=000000006506f920 eflags=00000243
01b0:trace:seh:dispatch_exception rax=000000006506f6e0 rbx=0000000000000000 rcx=000000006506f6b0 rdx=0000000000000000
01b0:trace:seh:dispatch_exception rsi=00000000846ad040 rdi=0000000000000001  r8=00000000000001cc  r9=000000006506f790
01b0:trace:seh:dispatch_exception r10=00007fff00288620 r11=0000000000000202 r12=0000000082020780 r13=0000000000000000
01b0:trace:seh:dispatch_exception r14=00000000ffffffff r15=000000006506fbd0 mxcsr=00001f80
01b0:trace:seh:call_vectored_handlers calling handler at 00006FFFFE7B5F50 code=406d1388 flags=0
01b0:trace:seh:call_vectored_handlers handler at 00006FFFFE7B5F50 returned ffffffff
Using emulated /home/seb/wine/lib/wine/x86_64-unix/winepulse.so
Using native(wrapped) libpulse.so.0
Using emulated /home/seb/wine/lib/wine/x86_64-unix/winealsa.so
Using native(wrapped) libasound.so.2

same place for the non-working part:

019c:trace:seh:RtlUnwindEx code=406d1388 flags=2 end_frame=0000000064D3FF00 target_ip=000000014379ECA5
019c:trace:seh:RtlUnwindEx  info[0]=0000000000001000
019c:trace:seh:RtlUnwindEx  info[1]=000000008488c600
019c:trace:seh:RtlUnwindEx  info[2]=000000000000019c
019c:trace:seh:RtlUnwindEx rip=00006ffffff9ed88 rsp=0000000064d3ea40 rbp=0000000064d3eba0 eflags=00000246
019c:trace:seh:RtlUnwindEx rax=0000000063f10000 rbx=0000000064d3f370 rcx=0000000064d3f370 rdx=000000014379eca5
019c:trace:seh:RtlUnwindEx rsi=0000000064d3f370 rdi=0000000064d3eba0  r8=0000000064d3fe50  r9=0000000000000000
019c:trace:seh:RtlUnwindEx r10=00007fff002885e0 r11=00006ffffffc31d2 r12=0000000064d3fe50 r13=ffffffffffffffff
019c:trace:seh:RtlUnwindEx r14=000000014379eca3 r15=00006ffffffb5d00 mxcsr=00001f80
019c:trace:seh:RtlRestoreContext returning to 000000014379ECA5 stack 0000000064D3FF00
0194:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 000000006473EF74, 000000006473EF90 000000006473EF70
0194:fixme:nls:get_dummy_preferred_ui_language (0x38 0x409 000000006473EF74 000000006473EF90 000000006473EF70) returning a dummy value (current locale)
0194:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 000000006473EF74, 000000006473EF90 000000006473EF70
0194:fixme:nls:get_dummy_preferred_ui_language (0x38 0x409 000000006473EF74 000000006473EF90 000000006473EF70) returning a dummy value (current locale)
ChromaSDKPlugin failed to load!
01cc:trace:seh:dispatch_exception code=406d1388 (EXCEPTION_WINE_NAME_THREAD) flags=0 addr=00006FFFFFC235C7
01cc:trace:seh:dispatch_exception  info[0]=0000000000001000
01cc:trace:seh:dispatch_exception  info[1]=00000000856D2CA8
01cc:trace:seh:dispatch_exception  info[2]=00000000000001CC
01cc:trace:seh:dispatch_exception rip=00006fffffc235c7 rsp=0000000067aefe30 rbp=fffffffffffffffe eflags=00000243
01cc:trace:seh:dispatch_exception rax=0000000067aefe80 rbx=00000000856d2ca8 rcx=0000000067aefe50 rdx=0000000000000000
01cc:trace:seh:dispatch_exception rsi=00000000856d2ca8 rdi=00000000856d2ca0  r8=00000000000001cc  r9=0000000067aeff30
01cc:trace:seh:dispatch_exception r10=0000000000000000 r11=0000000000000000 r12=0000000000000000 r13=0000000000000000
01cc:trace:seh:dispatch_exception r14=0000000000000000 r15=0000000000000000 mxcsr=00001f80
01cc:trace:seh:call_handler calling handler 0000000144642E82 (rec=0000000067AEFE50, frame=0000000067AEFF00 context=0000000067AEF370, dispatch=0000000067AEF240)
01cc:trace:seh:RtlUnwindEx code=406d1388 flags=2 end_frame=0000000067AEFF00 target_ip=000000014379ECA5
01cc:trace:seh:RtlUnwindEx  info[0]=0000000000001000
01cc:trace:seh:RtlUnwindEx  info[1]=00000000856d2ca8
01cc:trace:seh:RtlUnwindEx  info[2]=00000000000001cc
01cc:trace:seh:RtlUnwindEx rip=00006ffffff9ed88 rsp=0000000067aeea40 rbp=0000000067aeeba0 eflags=00000246
01cc:trace:seh:RtlUnwindEx rax=0000000063ef0000 rbx=0000000067aef370 rcx=0000000067aef370 rdx=000000014379eca5
01cc:trace:seh:RtlUnwindEx rsi=0000000067aef370 rdi=0000000067aeeba0  r8=0000000067aefe50  r9=0000000000000000
01cc:trace:seh:RtlUnwindEx r10=00007fff002885e0 r11=00006ffffffc31d2 r12=0000000067aefe50 r13=ffffffffffffffff
01cc:trace:seh:RtlUnwindEx r14=000000014379eca3 r15=00006ffffffb5d00 mxcsr=00001f80
01cc:trace:seh:RtlRestoreContext returning to 000000014379ECA5 stack 0000000067AEFF00
0024:fixme:imm:NotifyIME himc 000000000001005A, action 0x11, index 0, value 0 stub!
0194:fixme:explorerframe:taskbar_list_SetProgressState iface 000000008121A220, hwnd 000000000001006E, flags 1 stub!
^C01e4:trace:seh:dispatch_exception code=40010005 (DBG_CONTROL_C) flags=0 addr=00006FFFFFC235C7
01e4:trace:seh:dispatch_exception rip=00006fffffc235c7 rsp=00000000692cfd10 rbp=0000000000000000 eflags=00000242
01e4:trace:seh:dispatch_exception rax=00000000692cfd30 rbx=0000000063ea0000 rcx=00000000692cfd30 rdx=0000000000000000
01e4:trace:seh:dispatch_exception rsi=0000000000000000 rdi=0000000000000000  r8=0000000000000000  r9=0000000000000000
01e4:trace:seh:dispatch_exception r10=0000000000000000 r11=0000000000000000 r12=0000000000000000 r13=0000000000000000
01e4:trace:seh:dispatch_exception r14=0000000000000000 r15=0000000000000000 mxcsr=00001f80
01e4:trace:seh:call_seh_handlers found wine frame 00000000692CFE00 rsp 00000000692CFF50 handler 00006FFFFFC9A2C0
01e4:trace:seh:call_teb_handler calling TEB handler 00006FFFFFC9A2C0 (rec=00000000692CFD30, frame=00000000692CFE00 context=00000000692CF250, dispatch=00000000692CF120)
01e4:trace:seh:RtlUnwindEx code=40010005 flags=2 end_frame=00000000692CFE00 target_ip=00006FFFFFC9A15A
01e4:trace:seh:RtlUnwindEx rip=00006ffffff9ed88 rsp=00000000692ce490 rbp=00000000692ce5f0 eflags=00000242
01e4:trace:seh:RtlUnwindEx rax=0000000063ea0000 rbx=00000000692ceb40 rcx=00000000692ceb40 rdx=00006fffffc9a15a
01e4:trace:seh:RtlUnwindEx rsi=00000000692ceb40 rdi=00000000692ce5f0  r8=00000000692cfd30  r9=00006fffffc9a190
01e4:trace:seh:RtlUnwindEx r10=00007fff002885e0 r11=00006ffffffc31d2 r12=00000000692cfd30 r13=00000000692cfe00
01e4:trace:seh:RtlUnwindEx r14=00000000692cfe00 r15=0000000000000000 mxcsr=00001f80
01e4:trace:seh:RtlRestoreContext returning to 00006FFFFFC9A15A stack 00000000692CFDE0
01e4:fixme:console:default_ctrl_handler Terminating process 20 on event 0

The exception that occurs after the "ChromaSDKPlugin failed to load!" message looks quite different, even if coming from the same IP. Also, the working machine use a "call_vectored" for the handling, while the non-working is a regular "call_handler".

Could this be hint of the what's going wrong? If yes, how to dig deeper?

from box64.

julliard avatar julliard commented on June 10, 2024

That looks suspicious, even if it's probably not the main cause. You can try looking for why there's no vectored handler set (through RtlAddVectoredExceptionHandler) in the failing case.

from box64.

ptitSeb avatar ptitSeb commented on June 10, 2024

On the working machine, I see RtlAddVectoredExceptionHandler being called before 0024:trace:seh:GetModuleBaseNameA 7, L"bg3.exe but never see any call on the non-working one.

Is there some utility function to get a windows backtrace printed out, like the linux backtrace function?

from box64.

julliard avatar julliard commented on June 10, 2024

The equivalent would be RtlCaptureStackBackTrace, but you'd have to do the printing yourself.

from box64.

ptitSeb avatar ptitSeb commented on June 10, 2024

Thanks!

Using the test_backtrace, I got something printing usefull info:

0024:warn:seh:test_backtrace got 18 entries
0024:warn:seh:test_backtrace buffer[00]: 00006FFFFFC657C5
0024:warn:seh:test_backtrace buffer[01]: 00006FFFFFC658B1         => RtlAddVectoredExceptionHandler (ntdll)
0024:warn:seh:test_backtrace buffer[02]: 00006FFFF8AE6D32         => ???
0024:warn:seh:test_backtrace buffer[03]: 00006FFFFFC6D0E4         => call_dll_entry_point (kernelbase)
0024:warn:seh:test_backtrace buffer[04]: 00006FFFFFC71C11          => call_tls_callbacks (kernelbase)
0024:warn:seh:test_backtrace buffer[05]: 00006FFFFFC720E1          => MODULE_InitDLL (kernelbase)
0024:warn:seh:test_backtrace buffer[06]: 00006FFFFFC7230F          => process_attach (kernelbase)
0024:warn:seh:test_backtrace buffer[07]: 00006FFFFFC75678          => LdrLoadDll (kernelbase)
0024:warn:seh:test_backtrace buffer[08]: 00006FFFFF4752C2          => load_library (kernelbase)
0024:warn:seh:test_backtrace buffer[09]: 00006FFFFF475F52           => LoadLibraryExW (kernelbase)
0024:warn:seh:test_backtrace buffer[10]: 0000000144643654
0024:warn:seh:test_backtrace buffer[11]: 00000001446434E9
0024:warn:seh:test_backtrace buffer[12]: 00000001436C8D10
0024:warn:seh:test_backtrace buffer[13]: 00000001436C8D65
0024:warn:seh:test_backtrace buffer[14]: 00000001404E9B5F
0024:warn:seh:test_backtrace buffer[15]: 0000000144640F52
0024:warn:seh:test_backtrace buffer[16]: 00006FFFFFA98B99
0024:warn:seh:test_backtrace buffer[17]: 00006FFFFFC95C8B

That a lot of anonymous addresses, but the 0x14... ones are from bg3.exe, so I trace what function was called or not called.

from box64.

ptitSeb avatar ptitSeb commented on June 10, 2024

Mmm, so the call is:

LoadLibraryExW LoadLibraryExW("dxgi.dll", 0000000000000000, 0);

Not sure why it would setup a vectored handler in a side and not on the other side

from box64.

ptitSeb avatar ptitSeb commented on June 10, 2024

So , after some more check, I released my 2 prefixes had diverged.. Adter synch them, I the vectored / not vectored difference was gone, but the game was still not working.

After some more debugging, I finaly noticed something strange: looks like BG3 used GetLogicalProcessorInformation(...) to gather cpu information (nothing special), but use Cache information to deduce the best number of worker to spawn. On some arm cpu, some of the sys files were missing, and some cache info was "0" (on Snapdragon, not on Ampere for example). After creating some fake virtual file, cache info is now coherent and I have sound in the intro logo and game load to 100%

It crashes / exit after that, with some GPU Driver related message, but that's another issue (probably need to open a tikcet in mesa for this).

from box64.

julliard avatar julliard commented on June 10, 2024

After some more debugging, I finaly noticed something strange: looks like BG3 used GetLogicalProcessorInformation(...) to gather cpu information (nothing special), but use Cache information to deduce the best number of worker to spawn. On some arm cpu, some of the sys files were missing, and some cache info was "0" (on Snapdragon, not on Ampere for example). After creating some fake virtual file, cache info is now coherent and I have sound in the intro logo and game load to 100%

Great! Would you mind filing a Wine bug with the details? We could probably add some workaround for this.

from box64.

ptitSeb avatar ptitSeb commented on June 10, 2024

After some more debugging, I finaly noticed something strange: looks like BG3 used GetLogicalProcessorInformation(...) to gather cpu information (nothing special), but use Cache information to deduce the best number of worker to spawn. On some arm cpu, some of the sys files were missing, and some cache info was "0" (on Snapdragon, not on Ampere for example). After creating some fake virtual file, cache info is now coherent and I have sound in the intro logo and game load to 100%

Great! Would you mind filing a Wine bug with the details? We could probably add some workaround for this.

Sure, I'll do that tomorrow!

from box64.

ptitSeb avatar ptitSeb commented on June 10, 2024

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

from box64.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.