vkCreateSwapchainKHR doesn't respond periodically

Hello, guys.
I need help. Only on one machine does the Vulkan backend not work. It just hangs on vkCreateSwapchainKHR without any errors. I also tried to update the drivers and Vulkan SDK.
A few lines at the end of the API dump:

Thread 0, Frame 0, Time 728914 us:
vkGetPhysicalDeviceSurfaceSupportKHR(physical Device, queue Family Index, surface, supported) returns Vk Result VK_SUCCESS (0):
    physicalDevice:                 V k Physical Device = 000001B69670E430
    queueFamilyIndex:               uint32_t = 0
    surface:                        VkSurfaceKHR = FAB64D0000000002
    pSupported:                     VkBool32* = 1

Thread 0, Frame 0, Time 733299 us:
vkCreateSwapchainKHR(device, pCreateInfo, allocator, pSwapchain) returns VkResult

As you see vkCreateSwapchainKHR doesn’t respond and this one doesn’t send any VkResult.
App log (by Debug messenger)

04/03/23 20:26:54.397293675 INFO [22280] Reading config file from: D:\Documents\programming\myapp-vk/usr/userconfig.bfbs
04/03/23 20:26:54.397537636 INFO [22280] Init GLFW
04/03/23 20:26:54.408397579 INFO [22280] Init window 800x600 0x91116fee88
04/03/23 20:26:54.427737916 INFO [22280] Creating VK_Instance
04/03/23 20:26:54.487459795 INFO [22280] Validation layer: Meta-layer VK_LAYER_LUNARG_override component layer VK_LAYER_LUNARG_api_dump adding device extension VK_EXT_tooling_info
04/03/23 20:26:54.488000607 INFO [22280] Validation layer: Searching for ICD drivers named .\nvoglv64.dll
04/03/23 20:26:54.488023098 INFO [22280] Validation layer: Build ICD instance extension list
04/03/23 20:26:54.490900519 INFO [22280] Validation layer: Loading layer library D:/VulkanSDK/1.3.243.0/Bin\.\VkLayer_monitor.dll
04/03/23 20:26:54.500838209 INFO [22280] Validation layer: Loading layer library D:/VulkanSDK/1.3.243.0/Bin\.\VkLayer_khronos_validation.dll
04/03/23 20:26:54.502156904 INFO [22280] Validation layer: Loading layer library D:/VulkanSDK/1.3.243.0/Bin\.\VkLayer_api_dump.dll
04/03/23 20:26:54.502173344 INFO [22280] Validation layer: Loading layer library C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_d1bd230cd08e7436\.\nvoglv64.dll
04/03/23 20:26:54.503969971 INFO [22280] Validation layer: Build ICD instance extension list
04/03/23 20:26:54.543984830 INFO [22280] Validation layer: loader_phys_dev_ext_gpa: Adding unknown physical function vkGetPhysicalDeviceOpticalFlowImageFormatsNV to internal store at index 0
04/03/23 20:26:54.543996560 INFO [22280] Validation layer: loader_phys_dev_ext_gpa: Driver C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_d1bd230cd08e7436\.\nvoglv64.dll returned ptr 00007FFE7579B522 for vkGetPhysicalDeviceOpticalFlowImageFormatsNV
04/03/23 20:26:54.544062691 INFO [22280] Validation layer: loader_phys_dev_ext_gpa: Driver C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_d1bd230cd08e7436\.\nvoglv64.dll returned ptr 00007FFE7579B522 for vkGetPhysicalDeviceOpticalFlowImageFormatsNV
04/03/23 20:26:54.586327611 INFO [22280] Checking for required extensions
04/03/23 20:26:54.586335105 INFO [22280] [OK] VK_KHR_surface
04/03/23 20:26:54.586336035 INFO [22280] [OK] VK_KHR_win32_surface
04/03/23 20:26:54.586336635 INFO [22280] [OK] VK_EXT_debug_utils
04/03/23 20:26:54.586341025 DEBUG [22280] Setup debug messenger
04/03/23 20:26:54.586341905 DEBUG [22280] Creating debug messenger
04/03/23 20:26:54.598017012 INFO [22280] Creating window surface
04/03/23 20:26:54.607887823 INFO [22280] Searching physical device
04/03/23 20:26:54.855899703 INFO [22280] Using: NVIDIA GeForce RTX 2070
04/03/23 20:26:54.855902892 INFO [22280] Searching logical device
04/03/23 20:26:54.897091197 INFO [22280] Validation layer: Loading layer library D:/VulkanSDK/1.3.243.0/Bin\.\VkLayer_monitor.dll
04/03/23 20:26:54.897114430 INFO [22280] Validation layer: Loading layer library D:/VulkanSDK/1.3.243.0/Bin\.\VkLayer_khronos_validation.dll
04/03/23 20:26:54.897118240 INFO [22280] Validation layer: Loading layer library D:/VulkanSDK/1.3.243.0/Bin\.\VkLayer_api_dump.dll
04/03/23 20:26:54.897126790 INFO [22280] Validation layer: Loading layer library C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_d1bd230cd08e7436\.\nvoglv64.dll
04/03/23 20:26:55.151840058 INFO [22280] Init renderer

After rebooting my PC, my app works without recompiling. Other Vulkan functions work (create a physical or logical device, for example). This issue arises periodically only. Any ideas?

Check for Implicitly running Layers and Hooks. They come with any kind of crap from game launchers, screen cap software, to mouse and keyboard software.

You will see those as a *.dll loaded\injected in your app that has no business being there.

I looked at the DLL list and compared this list with the results on my laptop, and as I suspected (it was just my suspicions), it was the antivirus (Avast). But the antivirus didn’t show any warnings. The threat list is empty. I would wanna figure out the real reasons for the issue and send a ticket to the antivirus developers, which I use.
Are there any ways to make a minidump for Vulkan-1.dll and then look at the subprocess that stops the Vulkan function execution?

I opened their website. Support is only for B2B. i.e. for their users.
I think that with this attitude, continuing to hammer this problem is a bad idea. This is not my problem, but an antivirus problem.

You can do a minidump (or start Debug session) in inbuilt Task Manager in Windows. IDE such as Visual Studio should show list of which dlls are loaded\injected into the app, as well as which function it was in when the app was snapshotted (i.e. even if you don’t have debug symbols, it should™ still show dll+memory address).

1 Like

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.