NVidia NSight 5.5 Performance Analysis crashes on startup if OpenGL tracing is enabled (solved: fixed in v5.6)

Hi there,

I am unable to debug / profile a minimal SDL OpenGL applications due to NVidia NSight 5.5 crashing
during startup. It also crashes with a minimal Unity OpenGL project, so the crash is not SDL-specific.

The crash is occuring due to invalid access (nullptr dereference) at Nvda.Graphics.Interception.Analysis.dll!00007ffb5b8d0f7a()

This is the (intercepted) entry point for wglGetExtensionsStringARB:

wglGetExtensionsStringARB = (const char *(WINAPI *) (HDC))
    _this->gl_data->wglGetProcAddress("wglGetExtensionsStringARB");
if (wglGetExtensionsStringARB) {
    extensions = wglGetExtensionsStringARB(hdc);  <==== crash occurs here
} else {
    extensions = NULL;
}

OS Version: Windows 10.0.16299
Driver: crash occurs with NVidia Desktop driver 388.59 and 390.65
NVidia NSight Version: 5.5.0.18014
IDE: Microsoft Visual Studio 2015

Hi,

I’m sorry for the problem you met.
Can you provide your sample please?then we can identify the issue quickly.

Thanks,
Letitia

Hi Letitia,

thanks for looking into this. You can download a barebones SDL2 sample app
(executable + sample app and SDL2 library source code) from

https://virtualities.de/owncloud/index.php/s/3aB7vRWl2guORPv

The archive contains a minidump of the nsight crash (performance analysis launched with OpenGL tracing module enabled).

My GPU is a nvidia GTX 980TI, with two active outputs: monitor (via DVI) and a Vive headset (via HDMI).

Interestingly, the Nsight HUD seems to work for OpenGL apps.

Hi m_massing,

Thanks for your information.
I double-clicked sdl-minimal-sample.exe, it showed blank view. Was it expected?

Regards,
Letitia

Yes, this is expected, it is a minimal code sample to illustrate that nsight crashes during initial OpenGL setup. The sample does not render anything. A crash dump and full source code for the sample and Sdl2 is included which covers the call stack up to the Nvidia OpenGL intercept.

Hi m_massing,

I can reproduce the issue locally.I’ve created an internal bug to track it.
The issue only happened with your sample.
Can you try OpenGL analysis with other opengl samples please when you’re convenient?

Thanks,
Letitia

Hi Letitia,

I’ve just tried with a minimal Unity OpenGL application, which
crashes during setup as well.

You can find the executable and minidump here:

https://virtualities.de/owncloud/index.php/s/rtoE8NtEXl7WSJV

Thanks for looking into this.

Manuel

Hi m_massing,

Thanks for your information.
I’ll track the issue and let you know if there’re some update.

Regards,
Letitia

Hi,

I have the same configuration and the same probleme but with a simpe OpenGL window (no SDL but using glew lib).

If I comment the glew lib initialization, all is ok:

/* GLenum errGlew = glewInit();
if (GLEW_OK != errGlew)
return;*/

Otherwise Nsight (monitor I think) crashs.

Benjamin

I’m having similar issues, too.
I’m using sdl2 with glew.

for me, commenting out the glewInit didn’t really help.
enabling Opengl in the trace pane causes the application to crash on startup.

visual studio 2015,
nsight 5.5
gtx 1080 390.77

Hi guys,

We just confirmed the crash of Nsight Performance Analysis when selected OpenGL, we are investigating it. Really sorry for the crash you meet and I will let you know the update.

Thanks
An

Hi all,

Thanks for identifying the crash! @AYan - any news on a fix for this?

Thanks,
Joao

Hi, joao.magalhaes,

I am sorry, but no news here.

Thanks
An

Hi Joao.maglhaes,

I use the latest Nsight (which contain the fix), the ogl app crash on Nsight analysis just gone. next release of Nsight should pick that fix.

Thanks
An

missed reply.

I have this problem too. Is there an estimate on the next release?

I have the same problem here. A fix would be great.

I’m using NSight 5.5 on Windows 10 Pro, 10.0.16299, with Visual Studio 15.4.2.

The fix is done and verified, It should be ready for next release of Nsight. We are working on the next release, but hard to tell a time.

Well, frustratingly, NVidia NSight Graphics 2018.4, as well as NVidia NSight Visual Studio Edition 5.6 both are still crashing when trying to trace OpenGL applications on Windows 10 (driver 399.07).

Not sure what your QA process is, but it doesn’t seem very thorough.

Hi m_massing,

  • For Nsight Graphics 2018.4, did you mean GPU Trace Activity? If yes, when you generate GPU trace, you would see a dialog telling you API is not supported. There’s also description in connection dialog saying that supported API is only D3D12.

  • For Nsight VSE 5.6, Analysis crash on OpenGL app is confirmed fixed. Could you please share more information?

  • GPU model
  • Win10 version
  • Visual Studio version
  • Please also confirm you have set the correct working dir and cmd arguments in Analysis activity.
  • If possible, could you please share your application with us for further investigation?

Thanks.