nsight graphics GPU trace crashes in present call

I’m on an rtx 2080 ti on driver 431.36 and I’m trying to profile my d3d12 application using the new GPU trace features.

Looks like there’s some trouble with present(), looking at the disassembly, it’s trying to dereference a null this pointer. I’ve already tried disabling the debug layer in the dx control panel, and that didn’t do anything.

here’s the callstack:

Exception thrown at 0x00007FFD94B130ED (nvwgf2umx.dll) in example.exe: 0xC0000005: Access violation reading location 0x0000000000000028.

nvwgf2umx.dll!00007ffd94b130ed() Unknown
nvwgf2umx.dll!00007ffd955dfa9b() Unknown
nvwgf2umx.dll!00007ffd94af5f2f() Unknown
D3D12.dll!CGraphicsCommandList::VersionedPresent(struct D3D12DDI_HCOMMANDQUEUE,struct D3D12DDIARG_PRESENT_0001 const *,struct D3D12DDI_PRESENT_0051 *,struct D3D12DDI_PRESENT_CONTEXTS_0051 *,struct D3D12DDI_PRESENT_HWQUEUES_0051 *) Unknown
D3D12.dll!CGraphicsCommandList::Present(struct ID3D12CommandQueue *,struct D3D12_PRESENTSURFACE const *,unsigned int,struct ID3D12Resource *,struct tagRECT const *,unsigned int,unsigned int,unsigned int,int *,struct D3D12_PRESENT *) Unknown
dxgi.dll!CD3D12Device::Present(struct DXGI_PRESENTSURFACE const *,unsigned int,struct IDXGIResource *,void *,unsigned int,unsigned int,unsigned int *) Unknown
dxgi.dll!CFlipPresentToDWM::FlipPresentCore() Unknown
dxgi.dll!CDXGISwapChain::FlipPresentToDWM() Unknown
dxgi.dll!CDXGISwapChain::PresentImplCore() Unknown
dxgi.dll!CDXGISwapChain::PresentImpl() Unknown
dxgi.dll!CDXGISwapChain::Present() Unknown

help would be appreciated. Thanks!


Sorry that you are running into this issue!

Looking at the call stack, I don’t see any of the tool’s code in the stack. Would you be able to provide a full dmp for us?


I don’t think a full dump will be possible, unfortunately. I can try to reproduce this in a separate project, but it will be a little while.

Sounds good! Let us know when you have it ready and we can take a look.



I downloaded your attachment and deleted your post. feel free to PM me with it again if you would like a record of sending it. We can’t make attachments just for mods unfortunately. :(


We will take a look and let you know if we need any more info! [DG-5702]


Any update on this?

Hi Pyromuffin,

Thanks for reaching back out. We have the fix scheduled for our September release.


Is there any work-around or details on what is causing this? I’d like to be able to use this functionality before september.

Let me circle back with the team and I’ll let you know. Sorry for the delay.


Hi Pyromuffin,

Looking at the issue a bit deeper now. Would it be possible to share the application? Or a sample that exhibits the same behavior?


I have a similar issue with GPU Trace. When I run my application with GPU Trace, it crashes with an “Access violation reading location …” exception on the first call to Present.

The frame debugger and frame profiler both seem to work, but GPU Trace does not.

This repo contains several samples that can be used to reproduce the crash: https://github.com/jpvanoosten/LearningDirectX12.

I have created a branch (fix_gpu_trace) to try to fix the issue: https://github.com/jpvanoosten/LearningDirectX12/tree/fix_gpu_trace

There are (at least) 2 samples that can be used to reproduce the issue:

  • Samples\01-ClearScreen: This is a minimal sample that just clears the screen.
  • Samples\02-Cube: This sample just draws a cube.

In both of those samples, a message box should appear which allows the debugger to be attached to the running application started with GPU Trace.

I am unable to reproduce the crash using the Microsoft samples here (https://github.com/microsoft/DirectX-Graphics-Samples) but I can’t easily determine what I am doing different in my own application that causes the crash to occur.

I am using:
Nsight Graphics 2020.6.1.0 (build 29393650)
GPU: Titan RTX
Driver version: 460.89

Any help on this would be appreciated.




Thank you for using Nsight Graphics and your feedback. We have created a bug for our engineering team to investigate this issue.

Hello Jeremiah. So, the difference between the DX samples and yours is that you get the DXGIFactory back from the DXGIAdapter through GetParent to create your swapchain. We fail to handle that correctly - that’s a bug we need to fix. It will be done in a future version of GPU Trace. Meanwhile, you can keep a pointer to your DXGIFactory around within e.g. dx12lib::Adapter, and use that in SwapChain::SwapChain to create your swapchain. I did a quick hack to try that, and I could capture 02-Cube.