Program crashes at vkGetAccelerationStructureBuildSizesKHR when capturing frames in Nsight Graphics

Hi,
I have a Vulkan ray tracing program and it works well (maybe). However if I capture frame in Nsight Graphics, the program crashes immediately at vkGetAccelerationStructureBuildSizesKHR. It does not crash if I do not capture frame.

Here is my environment and I hope it can help to find the problem.

OS: Windows 11 Enterprise 22631.3155
CPU: i7-12700K
GPU: RTX 3060
Driver Version: 551.76
Nsight Graphics Version: 2023.4.1.0 (build 33678028) (public-release)

Stacktrace:

Exception has occurred: W32/0xC0000005
Unhandled exception at 0x00007FF8D1E25E66 (Nvda.Graphics.Interception.dll) in *****: 0xC0000005: Access violation reading location 0x0000000000000010.

Nvda.Graphics.Interception.dll!00007ff8d1e25e66() (Unknown Source:0)
Nvda.Graphics.Interception.dll!00007ff8d1dd82fd() (Unknown Source:0)
******::get_acceleration_structure_build_size(ash::vk::definitions::AccelerationStructureBuildGeometryInfoKHR * self, unsigned int geometry_build_info) Line 521

Hi myhvec,

Thank you for using Nsight Graphics and providing us with your feedback. I am sorry for the issue you encountered. It’s hard for me to check your issue based on the stacktrace, could you share us some simple sample to reproduce your issue locally? This will assist us in quickly investigation and resolving the problem.

Thanks
An

Hi,

Unfortunately the crash only happens in our large code base and I failed to reproduce it in small samples. I did similar operations in Vulkan-Samples and it did not crash at all :(