Crash in D3D12CreateDevice when custom debugger is attached

I made a simple demo application using DirectX 12 API. It’s only function is to create Swap Chain and clear it with a solid color, nothing else. However, I’ve run into issue with using my custom made debugger program to debug the application. Creating app’s process with my debugger always crashes the app at D3D12CreateDevice API call. Same crash also happens if I attach debugger before the API call. The crash is C++ exception thrown in NVIDIA driver DLL MessageBus.dll in function messageBusRemoveObserver. App functions correctly if I don’t launch it with my debugger attached OR if I attach my debugger after the app already started and created Device.

  • GPU: Gigabyte GeForce RTX 2070 SUPER
  • GeForce driver: 546.17
  • OS: Windows 10 1909 build 18363.418
  • SDK: Windows 10 SDK 10.0.19041.0
  • MSVC: 19.34.31935 x64

You see, the thing is, I don’t actually use Visual Stuidio to develop the application. I use my custom IDE based on Notepad++. The debugger code is located here. As you can see, it’s nothing fancy. All it does, is, basically, creates process of the debugged app with CreateProcessW using flags CREATE_NEW_CONSOLE | DEBUG_PROCESS and then waits for debug events using WaitForDebugEventEx(&de, INFINITE);. It dosen’t do anyting to the application itself or drivers, it’s not messing with app’s memory, etc. I checked it in Visual Studio’s debugger. It does not cause this kind of crash.

Crash happens in this function (I removed the unnecessary details). Both in debug and release builds. It is called in the very beginning of main() entry point, so other code is not relevant to the problem, as this is the first steap in setting up DirecrX 12. Crash also occurs without using NULL as last argument, but creating device directly (full function checks for D3DX12 compatability and VRAM size to select best adapter):

ComPtr<IDXGIAdapter4> getAdapter()
{
	ComPtr<IDXGIFactory4> factory;
#ifdef DEBUG
	UINT create_factory_flags = DXGI_CREATE_FACTORY_DEBUG;
#else
	UINT create_factory_flags = 0;
#endif
	
	CreateDXGIFactory2(create_factory_flags, IID_PPV_ARGS(&factory)));
	
	ComPtr<IDXGIAdapter1> a1;
	ComPtr<IDXGIAdapter4> a4;
	factory->EnumAdapters1(0, &a1);
	D3D12CreateDevice(a1.Get(), D3D_FEATURE_LEVEL_12_0, __uuidof(ID3D12Device), NULL)) &&
	a1.As(&a4));
	
	return a4;
}

My compilation parameters:

cl /Wall /wd4530 /wd4710 /wd4711 /wd5045 /wd4626 /wd4625 /wd5026 /wd5027 /Feexe\ /external:anglebrackets /external:W0 /diagnostics:caret /I D:\P\MT /O2 /Oi /Gy /D DEBUG /D _CONSOLE /D _UNICODE /D UNICODE /D _CRT_SECURE_NO_WARNINGS /Gm- /EHsc /MTd /Z7 /FC /GS- /J /permissive- /nologo   /I D:\P\MT /I res\rc dx12.cpp res\dx12.res /link  /SUBSYSTEM:CONSOLE  /DEBUG /INCREMENTAL:NO /LIBPATH:D:\P\MT\lib  /DYNAMICBASE:NO /MACHINE:X64 /ENTRY:wmainCRTStartup /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcrtd.lib /NODEFAULTLIB:libcmt.lib

Full crash stack trace and DLL tracking generated by my debugger:

PROCESS SPAWNED: D:\P\MT\exe\dx12.exe ID: 5764 PDB LOADED!
MAIN THREAD: 0x0x0000000000257000 ID: 23892
DLL LOADED BY dx12.exe: 0x0x00007FF8EE960000 C:\Windows\System32\ntdll.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EE7E0000 C:\Windows\System32\kernel32.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EC450000 C:\Windows\System32\KernelBase.dll DLL EXPORT LOADED!
PROCESS SPAWNED: C:\Windows\System32\conhost.exe ID: 33224 NO SYMBOLS FOUND...
MAIN THREAD: 0x0x00000063C770A000 ID: 37860
DLL LOADED BY conhost.exe: 0x0x00007FF8EE960000 C:\Windows\System32\ntdll.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EE7E0000 C:\Windows\System32\kernel32.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EC450000 C:\Windows\System32\KernelBase.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EC330000 C:\Windows\System32\msvcp_win.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EC720000 C:\Windows\System32\ucrtbase.dll DLL EXPORT LOADED!
THREAD SPAWNED BY conhost.exe: 0x0x00000063C770C000 ID: 29252
THREAD SPAWNED BY conhost.exe: 0x0x00000063C770E000 ID: 17092
DLL LOADED BY conhost.exe: 0x0x00007FF8EE2A0000 C:\Windows\System32\SHCore.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EE490000 C:\Windows\System32\msvcrt.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EE570000 C:\Windows\System32\rpcrt4.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8ECB60000 C:\Windows\System32\combase.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EC3D0000 C:\Windows\System32\bcryptprimitives.dll DLL EXPORT LOADED!
THREAD SPAWNED BY conhost.exe: 0x0x00000063C7710000 ID: 38652
DLL LOADED BY conhost.exe: 0x0x00007FF8ECAA0000 C:\Windows\System32\advapi32.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8ED910000 C:\Windows\System32\sechost.dll DLL EXPORT LOADED!
<---
--------------------------------------------------------------------
BREAKPOINT
CONTINUE EXECUTION:  POSSIBLE
INSTRUCTION ADDRESS: 0x0x00007FF8EEA311DC
--------------------------------------------------------------------
PROCESS: conhost.exe (33224) THREAD: 37860

THREAD SPAWNED BY conhost.exe: 0x0x00000063C7712000 ID: 18296
THREAD DIED IN conhost.exe: 29252 C: 0
THREAD DIED IN conhost.exe: 38652 C: 0
THREAD DIED IN conhost.exe: 17092 C: 0
THREAD DIED IN conhost.exe: 37860 C: 0
DLL LOADED BY conhost.exe: 0x0x00007FF8ED460000 C:\Windows\System32\user32.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EC0D0000 C:\Windows\System32\win32u.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EE540000 C:\Windows\System32\gdi32.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EC820000 C:\Windows\System32\gdi32full.dll DLL EXPORT LOADED!
THREAD SPAWNED BY conhost.exe: 0x0x00000063C7714000 ID: 35124
THREAD SPAWNED BY conhost.exe: 0x0x00000063C7716000 ID: 5756
DLL LOADED BY conhost.exe: 0x0x00007FF8ECA10000 C:\Windows\System32\imm32.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8ED9B0000 C:\Windows\System32\shell32.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EC9C0000 C:\Windows\System32\cfgmgr32.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EB950000 C:\Windows\System32\windows.storage.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EB8D0000 C:\Windows\System32\profapi.dll NO SYMBOLS FOUND...
DLL LOADED BY conhost.exe: 0x0x00007FF8EB840000 C:\Windows\System32\powrprof.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EB830000 C:\Windows\System32\umpdc.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EE770000 C:\Windows\System32\shlwapi.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EB890000 C:\Windows\System32\kernel.appcore.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EC700000 C:\Windows\System32\cryptsp.dll DLL EXPORT LOADED!
THREAD SPAWNED BY conhost.exe: 0x0x00000063C7718000 ID: 33580
DLL LOADED BY conhost.exe: 0x0x00007FF8E9B30000 C:\Windows\System32\uxtheme.dll DLL EXPORT LOADED!
THREAD SPAWNED BY conhost.exe: 0x0x00000063C771A000 ID: 35808
THREAD SPAWNED BY conhost.exe: 0x0x00000063C771C000 ID: 28796
DEBUG WSTR BY conhost.exe: |onecore\windows\core\console\open\src\renderer\gdi\state.cpp(245)\conhost.exe!00007FF782015477: (caller: 00007FF782013FF7) LogHr(1) tid(707c) 80004005 Unspecified error
|
DEBUG WSTR BY conhost.exe: |onecore\windows\core\console\open\src\renderer\gdi\state.cpp(245)\conhost.exe!00007FF782015477: (caller: 00007FF782013FF7) LogHr(1) tid(707c) 80004005 Unspecified error
|
DEBUG WSTR BY conhost.exe: |onecore\windows\core\console\open\src\renderer\gdi\state.cpp(245)\conhost.exe!00007FF782015477: (caller: 00007FF782013FF7) LogHr(1) tid(707c) 80004005 Unspecified error
|
DLL LOADED BY conhost.exe: 0x0x00007FF8EE350000 C:\Windows\System32\msctf.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8ECEA0000 C:\Windows\System32\oleaut32.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8D8A60000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.18362.418_none_e6c6b287130d565d\comctl32.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8E9F90000 C:\Windows\System32\dwmapi.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8E4880000 C:\Windows\System32\TextInputFramework.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8E96A0000 C:\Windows\System32\CoreMessaging.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8E74F0000 C:\Windows\System32\CoreUIComponents.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EA850000 C:\Windows\System32\ntmarta.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8E7350000 C:\Windows\System32\WinTypes.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00000194ACEC0000 C:\Windows\System32\WinTypes.dll DLL EXPORT LOADED!
DLL UNLOADED BY conhost.exe: C:\Windows\System32\WinTypes.dll
DLL LOADED BY conhost.exe: 0x0x00007FF8DC2D0000 C:\Windows\System32\iertutil.dll DLL EXPORT LOADED!
DLL LOADED BY conhost.exe: 0x0x00007FF8EE170000 C:\Windows\System32\clbcatq.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8ED460000 C:\Windows\System32\user32.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EC0D0000 C:\Windows\System32\win32u.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EE540000 C:\Windows\System32\gdi32.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EC820000 C:\Windows\System32\gdi32full.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EC330000 C:\Windows\System32\msvcp_win.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EC720000 C:\Windows\System32\ucrtbase.dll DLL EXPORT LOADED!
THREAD SPAWNED BY dx12.exe: 0x0x0000000000259000 ID: 23616
THREAD SPAWNED BY dx12.exe: 0x0x000000000025B000 ID: 41908
THREAD SPAWNED BY dx12.exe: 0x0x000000000025D000 ID: 19824
DLL LOADED BY dx12.exe: 0x0x00007FF8EA4F0000 C:\Windows\System32\dxgi.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF88C620000 C:\Windows\System32\D3D12.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EE490000 C:\Windows\System32\msvcrt.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8ECB60000 C:\Windows\System32\combase.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EE570000 C:\Windows\System32\rpcrt4.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EA460000 C:\Windows\System32\DXCore.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EC9C0000 C:\Windows\System32\cfgmgr32.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EC3D0000 C:\Windows\System32\bcryptprimitives.dll DLL EXPORT LOADED!
<---
--------------------------------------------------------------------
BREAKPOINT
CONTINUE EXECUTION:  POSSIBLE
INSTRUCTION ADDRESS: 0x0x00007FF8EEA311DC
--------------------------------------------------------------------
PROCESS: dx12.exe (5764) THREAD: 23892

DLL LOADED BY dx12.exe: 0x0x00007FF8ECA10000 C:\Windows\System32\imm32.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EB890000 C:\Windows\System32\kernel.appcore.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF881D60000 C:\Windows\System32\d3d12SDKLayers.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8CB560000 C:\Windows\System32\DXGIDebug.dll DLL EXPORT LOADED!
DLL UNLOADED BY dx12.exe: C:\Windows\System32\DXGIDebug.dll
DLL UNLOADED BY dx12.exe: C:\Windows\System32\d3d12SDKLayers.dll
DLL LOADED BY dx12.exe: 0x0x00007FF8E9EA0000 C:\Windows\System32\ResourcePolicyClient.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8ED910000 C:\Windows\System32\sechost.dll DLL EXPORT LOADED!
DLL UNLOADED BY dx12.exe: C:\Windows\System32\sechost.dll
DLL UNLOADED BY dx12.exe: C:\Windows\System32\ResourcePolicyClient.dll
DLL LOADED BY dx12.exe: 0x0x00007FF8E9B30000 C:\Windows\System32\uxtheme.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EE350000 C:\Windows\System32\msctf.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8ECEA0000 C:\Windows\System32\oleaut32.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8ED910000 C:\Windows\System32\sechost.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8ECAA0000 C:\Windows\System32\advapi32.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8CB560000 C:\Windows\System32\DXGIDebug.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8DB610000 C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_1fea8972dc2f0a69\nvldumdx.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8E61E0000 C:\Windows\System32\version.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EB8B0000 C:\Windows\System32\msasn1.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8E61B0000 C:\Windows\System32\cryptnet.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EC100000 C:\Windows\System32\crypt32.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8E6000000 C:\Windows\System32\drvstore.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EB630000 C:\Windows\System32\devobj.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EB260000 C:\Windows\System32\wldp.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EB8F0000 C:\Windows\System32\wintrust.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EB170000 C:\Windows\System32\cryptbase.dll DLL EXPORT LOADED!
THREAD SPAWNED BY dx12.exe: 0x0x000000000025F000 ID: 27104
DLL LOADED BY dx12.exe: 0x0x00007FF8EE220000 C:\Windows\System32\imagehlp.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EC700000 C:\Windows\System32\cryptsp.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EAB70000 C:\Windows\System32\rsaenh.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EC250000 C:\Windows\System32\bcrypt.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF89C1F0000 C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_1fea8972dc2f0a69\nvgpucomp64.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF896DE0000 C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_1fea8972dc2f0a69\nvwgf2umx.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8ED600000 C:\Windows\System32\ole32.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8ED9B0000 C:\Windows\System32\shell32.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EE2A0000 C:\Windows\System32\SHCore.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EB950000 C:\Windows\System32\windows.storage.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EB8D0000 C:\Windows\System32\profapi.dll NO SYMBOLS FOUND...
DLL LOADED BY dx12.exe: 0x0x00007FF8EB840000 C:\Windows\System32\powrprof.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EB830000 C:\Windows\System32\umpdc.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EE770000 C:\Windows\System32\shlwapi.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8E9300000 C:\Windows\System32\winmm.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8E92D0000 C:\Windows\System32\winmmbase.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x0000000002DF0000 C:\Windows\System32\winmmbase.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x0000000003670000 C:\Windows\System32\winmmbase.dll DLL EXPORT LOADED!
DLL UNLOADED BY dx12.exe: C:\Windows\System32\winmmbase.dll
DLL UNLOADED BY dx12.exe: C:\Windows\System32\winmmbase.dll
THREAD SPAWNED BY dx12.exe: 0x0x0000000000261000 ID: 27196
THREAD DIED IN dx12.exe: 27196 C: 0
DLL LOADED BY dx12.exe: 0x0x00007FF8AF4B0000 C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_1fea8972dc2f0a69\NvCamera\NvCameraAllowlisting64.dll DLL EXPORT LOADED!
DLL UNLOADED BY dx12.exe: C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_1fea8972dc2f0a69\NvCamera\NvCameraAllowlisting64.dll
DLL LOADED BY dx12.exe: 0x0x00007FF8C7E40000 C:\Windows\System32\nvspcap64.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EA850000 C:\Windows\System32\ntmarta.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8C2960000 C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_1fea8972dc2f0a69\Display.NvContainer\MessageBus.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EE690000 C:\Windows\System32\ws2_32.dll DLL EXPORT LOADED!
DLL LOADED BY dx12.exe: 0x0x00007FF8EAD10000 C:\Windows\System32\IPHLPAPI.DLL DLL EXPORT LOADED!
THREAD SPAWNED BY dx12.exe: 0x0x0000000000263000 ID: 25328
<---
--------------------------------------------------------------------
CPP_EXCEPTION
PARAMS NUM: 4
PARAM 0       SOME INTERNAL VALUE: 0x0000000019930520
PARAM 1     POINTER TO THROWN OBJ: 0x0000000000142DB0
PARAM 2     POINTER TO OBJECT INF: 0x00007FF8C301D998
PARAM 3 DLL/EXE THROWER HINSTANCE: 0x00007FF8C2960000
CPP EXPT CLASS NAME: CRASH WHILE TRYING TO GET!
CURRENT EXE HIN:     0x0x0000000140000000
UCRTBASE HIN:        0x0x00007FF8EC720000
VCRUNTIME140 HIN:    0x0x00007FF8E7C40000
STD MSVCP140 HIN:    0x0x00007FF8D9970000
CONTINUE EXECUTION:  NOT POSSIBLE
INSTRUCTION ADDRESS: 0x0x00007FF8EC48A839
--------------------------------------------------------------------
PROCESS: dx12.exe (5764) THREAD: 23892

RIP  0x00007FF8EC48A839  RSP  0x0000000000142C10
EFL  0x00000200

RAX  0x00007FF8C2DA740E  RBX  0x0000000000000000
RCX  0x000017786054E73B  RDX  0x0000000000000002
RSI  0x0000000000142C30  RDI  0x00000000001425D0
RBP  0x0000000000142D50

R08  0x00007FF8C2D93C79  R09  0x0000000000000002
R10  0x0000000000142960  R11  0x0000000000142930
R12  0x000000000348C398  R13  0x0000000000000000
R14  0x000000000338C400  R15  0x000000000348C588

STACK TRACE
0x00007FF8EC48A7D0+0x0000000000000069|KernelBase.dll|RaiseException|
0x00007FF8C2AA2A30+0x000000000026A11D|MessageBus.dll|messageBusRemoveObserver|
0x00007FF8C2AA2A30+0x000000000006851E|MessageBus.dll|messageBusRemoveObserver|
0x00007FF8C2AA2A30+0x0000000000000000|MessageBus.dll|messageBusRemoveObserver|
0x00007FF8C2AA02F0+0x0000000000000629|MessageBus.dll|releaseMessageBusInterface|
0x00007FF8C2AA02F0+0x0000000000000000|MessageBus.dll|releaseMessageBusInterface|
0x00007FF8C2AA02F0+0x0000000000000000|MessageBus.dll|releaseMessageBusInterface|
0x00007FF8C2A9FD50+0x0000000000000141|MessageBus.dll|getMessageBusInterfaceWithConfig|
0x00007FF896E6F010+0x00000000000126A7|nvwgf2umx.dll|NVAPI_DirectMethods|
0x00007FF896E6F010+0x0000000000013A6E|nvwgf2umx.dll|NVAPI_DirectMethods|
0x00007FF896E6F010+0x0000000000003784|nvwgf2umx.dll|NVAPI_DirectMethods|
0x00007FF896E6F010+0x00000000000C688B|nvwgf2umx.dll|NVAPI_DirectMethods|
0x00007FF8970BBEF0+0x000000000010F5A0|nvwgf2umx.dll|NVAPI_Thunk|
0x00007FF8984A3340+0x000000000000004B|nvwgf2umx.dll|OpenAdapter12|
0x00007FF88C639920+0x000000000000BDD6|D3D12.dll|GetBehaviorValue|
0x00007FF88C628150+0x0000000000001E86|D3D12.dll|D3D12CoreCreateLayeredDevice|
0x00007FF88C628150+0x0000000000000000|D3D12.dll|D3D12CoreCreateLayeredDevice|
0x00007FF88C628150+0x0000000000000000|D3D12.dll|D3D12CoreCreateLayeredDevice|
0x00007FF88C628150+0x0000000000000000|D3D12.dll|D3D12CoreCreateLayeredDevice|
0x00007FF88C628150+0x0000000000007ED7|D3D12.dll|D3D12CoreCreateLayeredDevice|
0x00007FF88C639920+0x000000000000064D|D3D12.dll|GetBehaviorValue|
0x00007FF88C628150+0x0000000000010F14|D3D12.dll|D3D12CoreCreateLayeredDevice|
0x00007FF88C646000+0x000000000000003C|D3D12.dll|D3D12CreateDevice|
0x0000000140005440+0x0000000000000407|dx12.exe|getAdapter|dx12.cpp(326)

As you can see, the exception is thrown inside NVIDIA MessageBus.dll, which is like a black box to me. It’s not possible to extract C++ exception class name using this method, as another exception is thrown while trying to get it.

I realise that this is very uncommon problem, as very few people would develop 3D applications using their own debuggers. But still, maybe someone here can help me find the reason for this happening? Is there any workarounds to make my debugger compatiable with NVIDIA drivers? Is there a point to contact NVIDIA support for this?