Stack overflow exception in nvwgf2umx.dll

A Windows Win32/DirectX app that I am working on has started crashing on launch with the latest version of the driver 32.0.15.7270. I am seeing this across multiple machines. My dev machine has a GeForce RTX 4060. If I run the app with earlier versions of the driver or on an Intel adapter there are no issues.

In the debugger I see 50+ threads all with the same call stack in nvwgf2umx.dll

Exception thrown at 0x00007FFCD691A3DD (nvwgf2umx.dll) : 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x000000B1F1701FB8).

nvwgf2umx.dll!00007ffcd691a3dd()
nvwgf2umx.dll!00007ffcd729842b()
nvwgf2umx.dll!00007ffcd6943a95()
nvwgf2umx.dll!00007ffcd687fb44()
nvwgf2umx.dll!00007ffcd688132d()
nvwgf2umx.dll!00007ffcd6d22b07()
nvwgf2umx.dll!00007ffcd6d11780()
nvwgf2umx.dll!00007ffcd6d1cdef()
nvwgf2umx.dll!00007ffcd6d1cd4f()
nvwgf2umx.dll!00007ffcd6d1162d()
nvwgf2umx.dll!00007ffcd71b0d2a()
nvwgf2umx.dll!00007ffcd76f42fa()
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()

Unfortunately there are no symbols for this version of the dll on the symbol server so I can’t really debug any further.

Is there anyone that can provide symbols, or point me at diagnostics logs that would allow me to debug this further?

Circling back to this in case it helps anyone else. I narrowed this issue down to a commit on my side. The commit was the introduction of a Sentry library that was statically linking against the MSVC runtime. Reverting to a dynamically linked variation stopped my crashes.

1 Like

Hello @rjamieson,

TL;DR:
We have the same problem, but we already use a dynamic library.

We had the same problem, with the same crash call stack as you.
We highlighted the fact that it was linked to updating our sentry-native version to 0.7.6.
We already dynamically link a .dll during runtime and it was working until the update.
Could you eventually elaborate on your issue and the way you resolved it ?

Thanks !

1 Like

Working with @g.petit, Could you provide how you build sentry-native ?
It looks like, sentry-native build-natively in /MT

	# set static runtime if enabled
	if(SENTRY_BUILD_RUNTIMESTATIC)
		set_property(TARGET sentry PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
	endif()
1 Like

@g.petit That is interesting. We have been using Sentry for years now without issue. For my latest release I recompiled the latest Sentry v0.7.10 enabling SENTRY_BUILD_RUNTIMESTATIC. It wasn’t until a few months later when the release went out that we started seeing the crash above. My assumption was that it was caused by the static linking since we have done multiple Sentry updates over the years.

Since the bug was in production I reverted the commit to the last known good, restoring the previous v.0.7.0 assemblies I was using, rather than recompiling v0.7.10 to link dynamically.

Between your experience and our experience it probably indicates a breaking change in Sentry between v0.7.1 and v0.7.6

1 Like

We started an issue on github sentry-native : crash inside nvidia drivers since 0.7.6 · Issue #1193 · getsentry/sentry-native · GitHub

1 Like