raddebugger icon indicating copy to clipboard operation
raddebugger copied to clipboard

dxgi flipmodel fatal error

Open binjo opened this issue 1 year ago • 2 comments

Hi, I got a fatal exception as follows, no command line option provided, just double click the raddbg.exe:

---------------------------
Fatal Exception
---------------------------
A fatal exception (code 0xc0000005) occurred. The process is terminating.
---------------------------
OK   
---------------------------

My test env is a release version of FLARE-VM:

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19045 N/A Build 19045

The stack trace with the pdb loaded, I can share the trace/run file if needed:

0:000> ~0k
 # Child-SP          RetAddr               Call Site
00 00000000`00146270 6e61204c`4149544e     ntdll!RtlCaptureContext2+0x40b
01 00000000`00148c20 535f4947`58442064     0x6e61204c`4149544e
02 00000000`00148c28 45464645`5f504157     0x535f4947`58442064
03 00000000`00148c30 5f50494c`465f5443     0x45464645`5f504157
04 00000000`00148c38 29445241`43534944     0x5f50494c`465f5443
05 00000000`00148c40 65736165`6c50202e     0x29445241`43534944
06 00000000`00148c48 65646973`6e6f6320     0x65736165`6c50202e
07 00000000`00148c50 69746164`70752072     0x65646973`6e6f6320
08 00000000`00148c58 2072756f`7920676e     0x69746164`70752072
09 00000000`00148c60 74616369`6c707061     0x2072756f`7920676e
0a 00000000`00148c68 6c206f74`206e6f69     0x74616369`6c707061
0b 00000000`00148c70 20656761`72657665     0x6c206f74`206e6f69
0c 00000000`00148c78 646f6d2d`70696c66     0x20656761`72657665
0d 00000000`00148c80 20706177`73206c65     0x646f6d2d`70696c66
0e 00000000`00148c88 20737463`65666665     0x20706177`73206c65
0f 00000000`00148c90 66656e65`62206f74     0x20737463`65666665
10 00000000`00148c98 206d6f72`66207469     0x66656e65`62206f74
11 00000000`00148ca0 70206e72`65646f6d     0x206d6f72`66207469
12 00000000`00148ca8 7461746e`65736572     0x70206e72`65646f6d
13 00000000`00148cb0 61686e65`206e6f69     0x7461746e`65736572
14 00000000`00148cb8 73746e65`6d65636e     0x61686e65`206e6f69
15 00000000`00148cc0 69206572`6f4d202e     0x73746e65`6d65636e
16 00000000`00148cc8 6974616d`726f666e     0x69206572`6f4d202e
17 00000000`00148cd0 76612073`69206e6f     0x6974616d`726f666e
18 00000000`00148cd8 20656c62`616c6961     0x76612073`69206e6f
19 00000000`00148ce0 3a707474`68207461     0x20656c62`616c6961
1a 00000000`00148ce8 736d2e61`6b612f2f     0x3a707474`68207461
1b 00000000`00148cf0 696c6669`6778642f     0x736d2e61`6b612f2f
1c 00000000`00148cf8 002e6c65`646f6d70     0x696c6669`6778642f
1d 00000000`00148d00 00000000`00148da0     0x002e6c65`646f6d70
1e 00000000`00148d08 00007ff9`a32016aa     0x148da0
1f 00000000`00148d10 00007ff9`a3201642     ntdll!RtlWalkFrameChain+0x2a
20 00000000`00148d40 00007ff9`9f129589     ntdll!RtlCaptureStackBackTrace+0x42
21 00000000`00148d70 00007ff9`9f1781e4     dxgi!DXGIDeclareAdapterRemovalSupport+0x1249
22 00000000`00148f70 00007ff9`9f15c166     dxgi!DXGIDumpJournal+0x254
23 00000000`00148fa0 00007ff9`9f14573a     dxgi!PIXEndCapture+0x1b466
24 00000000`00148fd0 00007ff9`9f1258bf     dxgi!PIXEndCapture+0x4a3a
25 00000000`00149870 00007ff9`9f13b949     dxgi!DXGIReportAdapterConfiguration+0x314f
26 00000000`00149b80 00007ff9`9f17f389     dxgi!CompatString+0xfee9
27 00000000`00149cf0 00007ff9`9f17f0db     dxgi!DXGIGetDebugInterface1+0x3b39
28 00000000`00149d80 00007ff7`dfa27620     dxgi!DXGIGetDebugInterface1+0x388b
29 00000000`00149f20 00007ff7`dfac1f8b     raddbg!r_window_equip+0x250 [C:\devel\raddebugger\src\render\d3d11\render_d3d11.cpp @ 469] 
2a 00000000`0014a040 00007ff7`dfb11e55     raddbg!df_window_open+0x16b [C:\devel\raddebugger\src\df\gfx\df_gfx.c @ 1082] 
2b 00000000`0014a3a0 00007ff7`dfb2103c     raddbg!df_gfx_begin_frame+0x3a25 [C:\devel\raddebugger\src\df\gfx\df_gfx.c @ 11657] 
2c 00000000`0014cea0 00007ff7`dfb384a6     raddbg!update_and_render+0xcec [C:\devel\raddebugger\src\raddbg\raddbg.c @ 201] 
2d 00000000`0014e0c0 00007ff7`df97b7c7     raddbg!entry_point+0x1616 [C:\devel\raddebugger\src\raddbg\raddbg.c @ 515] 
2e 00000000`0014fc50 00007ff7`dfba9482     raddbg!WinMain+0x2d7 [C:\devel\raddebugger\src\raddbg\raddbg_main.cpp @ 154] 
2f (Inline Function) --------`--------     raddbg!invoke_main+0x21 [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 102] 
30 00000000`0014fef0 00007ff9`a22c7344     raddbg!__scrt_common_main_seh+0x106 [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288] 
31 00000000`0014ff30 00007ff9`a32026b1     KERNEL32!BaseThreadInitThunk+0x14
32 00000000`0014ff60 00000000`00000000     ntdll!RtlUserThreadStart+0x21
0:000> da /c50 00000000`00148b30 l0n1000
00000000`00148b30  "IDXGIFactory::CreateSwapChain: Blt-model swap effects (DXGI_SWAP_EFFECT_DISCARD "
00000000`00148b80  "and DXGI_SWAP_EFFECT_SEQUENTIAL) are legacy swap effects that are predominantly "
00000000`00148bd0  "superceded by their flip-model counterparts (DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL an"
00000000`00148c20  "d DXGI_SWAP_EFFECT_FLIP_DISCARD). Please consider updating your application to l"
00000000`00148c70  "everage flip-model swap effects to benefit from modern presentation enhancements"
00000000`00148cc0  ". More information is available at http://aka.ms/dxgiflipmodel."

binjo avatar Jan 15 '24 09:01 binjo

Does FLARE-VM support D3D11 and the debugger interface?

emoon avatar Jan 15 '24 10:01 emoon

Ryan recently added --disable_d3d11_debug argument to avoid setting up debug layer. You can try that if you want to run debug build. For non-debug build the d3d11 debug layer is disabled by default.

mmozeiko avatar Jan 16 '24 01:01 mmozeiko

Any further information on this? I don't think it's related to the flip model; that is just logged by D3D11 normally. As suggested by Martins I think this is related to the debug layer. Does the flag he referenced work for you?

ryanfleury avatar Jan 18 '24 17:01 ryanfleury

The --disable_d3d11_debug option does not work, non-debug build similar fatal crash, but with a different stack trace:

(218.1778): C++ EH exception - code e06d7363 (first/second chance not available)
(218.1778): Access violation - code c0000005 (first/second chance not available)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
Time Travel Position: 8BDE3:0
ntdll!RtlCaptureContext2+0x66c:
00007ff9`a325174c cc              int     3
0:000> ~*k

.  0  Id: 218.1778 Suspend: 4096 Teb: 00000000`002ae000 Unfrozen
 # Child-SP          RetAddr               Call Site
00 00000000`0014ab70 00007ff9`9c54db79     ntdll!RtlCaptureContext2+0x66c
01 00000000`0014ab78 00000000`0014bc00     d3d11!D3D11CoreCreateDevice+0x5129
02 00000000`0014aef8 00007ff9`a32007c0     0x14bc00
03 00000000`0014af00 00007ff9`a159aa7a     ntdll!RtlSetLastWin32Error+0x40
04 00000000`0014af50 00007ff9`a32007c0     msvcrt!_threadid+0x27a
05 00000000`0014af80 00007ff9`a159aa7a     ntdll!RtlSetLastWin32Error+0x40
06 00000000`0014afd0 00007ff9`a159a9eb     msvcrt!_threadid+0x27a
07 00000000`0014b000 00007ff9`a156b3a5     msvcrt!_threadid+0x1eb
08 00000000`0014b030 00007ff9`00000000     msvcrt!CxxThrowException+0x525
09 00000000`0014b060 00007ff9`9c5c8728     0x00007ff9`00000000
0a 00000000`0014b068 00000000`1c06a670     d3d11!D3DKMTWaitForVerticalBlankEvent+0x43c98
0b 00000000`0014b3e8 00000000`0014b720     0x1c06a670
0c 00000000`0014b3f0 00000000`1c06a670     0x14b720
0d 00000000`0014b3f8 00000000`1c06a670     0x1c06a670
0e 00000000`0014b400 00000000`0014b838     0x1c06a670
0f 00000000`0014b408 00000000`0014b410     0x14b838
10 00000000`0014b410 00000200`00000000     0x14b410
11 00000000`0014b418 00000000`00000000     0x00000200`00000000

binjo avatar Jan 19 '24 05:01 binjo

That call stack looks a bit messed up. Not sure what's exactly wrong, but I suspect either hw d3d11 device is not working in VM, or raddbg's code is using some features that d3d11 driver in VM does not support.

Try running with --force_d3d11_software argument that should force raddbg to use d3d11 software rasterizer.

mmozeiko avatar Jan 19 '24 05:01 mmozeiko

The --force_d3d11_software indeed works, the main UI shows up correctly, but it's quite laggy of responding, e.x open file/target. I guess I'd wait for it to become more mature, feel free to close it if no further action can be done.

Thanks.

binjo avatar Jan 19 '24 06:01 binjo

Got it. I think the software-driver-backed rendering performance (and e.g. integrated graphics cards) will improve throughout the alpha, particularly after I tighten up a few silly details about the rendering/UI. But yeah, probably best to wait for a more mature version, if you need to rely on the software driver.

ryanfleury avatar Jan 19 '24 13:01 ryanfleury