enumerateInstanceExtensionProperties crashing

(copy from reddit https://www.reddit.com/r/vulkan/comments/b3bqdn/enumerateinstanceextensionproperties_crashing_on)


while working on our vulkan engine, we encountered following problem. Call to vk::enumerateInstanceExtensionProperties sometimes (about 10% chance) crashes in driver.

Crash happens in thread spawned in nvoglv64.dll, but freezing crashed thread in debugger allows to continue program without any problems.

Crash seems to occur only when launching with debugger.

This is minimal example to reproduce:

#include "vulkan/vulkan.hpp"
int main() {
  auto extensions = vk::enumerateInstanceExtensionProperties();
  while (1);
  return 0;

linking only vulkan-1.lib

Visual Studio 2017
Windows 10
VulkanSDK 1.1.101
Driver 419.35

Crashed thread call stack

My guess is driver bug.

Any ideas how to fix it?