Crash on the very 1st drawcall using Nsight.

Hi, I am using Nvidia Nsight 3.0, GTS 450 card, 320.45 drivers, Windows Vista 64 bit, Visual Studio 2008. When launching graphics debugger the application crashes on the very 1st drawcall. The callstack looks something like this:

nvwgf2um.dll!5bdd7d53()
[Frames below may be incorrect and/or missing, no symbols loaded for nvwgf2um.dll]
nvwgf2um.dll!5be9c7f7()
nvwgf2um.dll!5bde377e()
nvwgf2um.dll!5bc02afb()
nvwgf2um.dll!5bc0257b()
nvwgf2um.dll!5bc0259e()
nvwgf2um.dll!5bdd0612()
nvwgf2um.dll!5bcb2292()
nvwgf2um.dll!5bc45072()
nvwgf2um.dll!5bcbff8c()
D3D11SDKLayers.dll!5ea52f2f()
Nvda.Graphics.Interception.100.dll!5dbb2853()
Nvda.Graphics.Interception.100.dll!5dba317e()
Nvda.Graphics.Interception.100.dll!5db99b21()
Nvda.Graphics.Interception.100.dll!5df0150f()

I have a suspicion this might be related to dynamic shader linking usage in my application, since other programs work fine with Nsight.

PIX for windows doesnt crash and manages to do a frame capture, but complains about not being able to replay due to a failure while setting a pixel shader.

On an ATI card; GPU PerfStudio runs fine with my application.

DirectX SDK dynamic shader linkage sample runs fine in both PIX and Nsight, I ported my pixel shader to run inside that SDK sample and it also runs fine, so it must be something else in my app. But it obviously runs fine by itself and I get no warnings or errors from DirectX.

Any suggestions on how I can narrow this down further or perhaps get more debug info from Nsight before it crashes are appreciated.

Thanks,
Paul.

Ok, so after some trial and error I succeeded in getting PIX for windows to work with my app. The workaround was to set some dummy pixel and vertex shaders that don’t use dynamic linkage just before the call to IDXGISwapChain::Present

I can finally do some PIX graphics debugging!

Nsigght still crashes with following callstack:

nvwgf2um.dll!05efec8c() 	
[Frames below may be incorrect and/or missing, no symbols loaded for nvwgf2um.dll]	
nvwgf2um.dll!05ef69c7() 	
nvwgf2um.dll!05d57c00() 	
nvwgf2um.dll!05ddc30c() 	
D3D11SDKLayers.dll!6b0f2f2f() 	
Nvda.Graphics.Interception.100.dll!5244b9fb() 	
Nvda.Graphics.Interception.100.dll!5243c27c() 	
Nvda.Graphics.Interception.100.dll!524319f8() 	
Nvda.Graphics.Interception.100.dll!52431a3d() 	
Nvda.Graphics.Interception.100.dll!52affc7f() 	

The disassembly instruction it crashed on is this:
05EFEC8C mov edi,dword ptr [ecx+8]

ecx is 0, so I am assuming NULL ptr dereferencing?

Would really like to be able to use Nsight, any advice would be appreciated.

Thanks,
Paul

Hi Paul,

Any way to get a reproducible from you?

Hi rafi,

Sure, I can make one up pretty quickly. Where do I send it to?

Shared on google drive

https://docs.google.com/file/d/0B-S62xqvIAGcc0tzREEzVVlpWW8/edit?usp=sharing

Its a directx sdk sample modified to use dynamic shader linkage in the vertex shader.
If you need source I can upload that too.

Let me know of any progress on this.

Thanks,
Paul.

Also trying to add it as an attachment, but seems to be stuck in scanning.
VS_Dynamic_Linkage_Nsight_Crash.rar (34 KB)

thanks Paul (sorry for delay, was out on a conference).
I tried running the app with the .fx file, but it runs and closes right away (without Nsight). I ran it on a machine that had the VC90 debug runtime installed (actually it had VS 2008 installed), so that’s not the problem.
If you can upload the files/projects, that way I can rebuild on my side and make sure I can run/reproduce the problem.
BTW, have you had a chance to see if Nsight 3.1 Release Candidate that shipped last week fixes the problem?

Thanks

Hi Rafi, not sure why it crashed, maybe it was looking for a version of MSVCRT dlls that you don’t have?

Here is a link to the source:

https://docs.google.com/file/d/0B-S62xqvIAGcMzZneUQwVzdTZEE/edit?usp=sharing

I changed it to use static runtime just in case.

I havent tried Nsight 3.1, because it says that it no longer supports Vista, and I still have Vista here.

Thanks,
Paul.

Hey Paul,
Got the sources, and it seemed to be running (outside of Nsight) ok on my GK107, but it fails on my Fermi (which is what I was using before), maybe you have some specific DX11 in there?
Anyway, I’ll look into it a bit deeper on my Kepler with our Nsight builds.

Hi Rafi,

Hmm not sure about anything dx11 specific, its just a tutorial sample from DX SDK, converted to use the shader that reproduces the Nsight crash for me. Glad you got it running! Please let me know what you find.

Thanks,
Paul.

Hi Paul,

Good news, there has been a number of fixes to the driver (and Nsight), and I am not able to reproduce with the latest beta driver. Could you update to 326.41 that is on nvidia.com and let me know if things work ok for you? From your initial post, you are on Vista 64-bit and on Fermi, so the driver should be: http://www.nvidia.com/object/win8-win7-winvista-64bit-326.41-beta-driver.html

Just so you know, in Nsight 3.1 we did drop Vista and DX10 support, however, we are not doing anything in the installer, etc to stop you from using Vista, it is more that it is unsupported and if you have issues, we can try to help but we are not actively testing or fixing issues on Vista. For DX10 though, we did remove code and will not be able to debug a DX10 app.

I hope it helps.

Hi Rafi,

So just to be clear, you couldn’t reproduce with drivers 326.41 and nsight 3.1, but were you able to reproduce at all with 320.49 driver and 3.0 nsight versions?

Thanks,
Paul.

Hey Paul,
I was able to reproduce with Nsight 3.1 RC and a 320 driver. Once I moved to the 326.41 driver build, I couldn’t reproduce any longer. Most likely, you will be fine with Nsight 3.0 and the new 326.41 driver (if you really want stick to 3.0).

Hi Rafi,

Yup looks like 326.41 fixes the problem, also the frame rate in one of the games I play (World of Tanks) has magically gone back up to what it was before the 320 drivers. So all in all a good driver update. I hope the problem doesn’t come back with any of the future driver releases.

Thanks,
Paul.