[Graphics capture:] Fatal failed object lookup (api: Vulkan, id: 157 [vkCreateSwapchainKHR])

Hello, I am developing Vulkan (v1.4) application and I wanted to use NVIDIA Nsight Graphics Capture and i am encountering followign error message

Incompatibility encountered
A blocking incompatibility was encountered:
fatal failed object lookup (api: Vulkan, id: 157 [vkCreateSwapchainKHR])
This may result in instability or corruption. If a crash is encountered following this message, this incompatibility is a likely source of the error.
Set the -no-block-on-first-incompatibility launch option to disable this message box.

Which is suggesting that the swap chain could not be created. I have tried the frame capture which was able to run the application but was not able to capture the frame despite the fact that I have 0 validation errors and application runs without any problem. I have also tried other Vulkan applications like vkcube and there everything worked as expected (both for Frame capture and Graphics capture).

I really don`t know what might be the issue in both cases.

My swap chain creation code looks like this.

    auto capabilites   = m_device.GetPhysicalDevice().getSurfaceCapabilitiesKHR(m_instance.GetSurface());
    auto minImageCount = capabilites.minImageCount + 1;

    if(capabilites.maxImageCount > 0 && minImageCount > capabilites.maxImageCount)
    {
        minImageCount = capabilites.maxImageCount;
    }

    vk::SwapchainCreateInfoKHR swapChainCreateInfo;
    swapChainCreateInfo.surface          = m_instance.GetSurface();
    swapChainCreateInfo.minImageCount    = minImageCount;
    swapChainCreateInfo.imageFormat      = m_format.format; // vk::Format::eR16G16B16A16Sfloat
    swapChainCreateInfo.imageColorSpace  = m_format.colorSpace; //vk::ColorSpaceKHR::eSrgbNonLinear
    swapChainCreateInfo.imageExtent      = m_extent;
    swapChainCreateInfo.presentMode      = m_presentMode;
    swapChainCreateInfo.imageArrayLayers = 1;
    swapChainCreateInfo.imageUsage       = vk::ImageUsageFlagBits::eColorAttachment;
    swapChainCreateInfo.preTransform     = capabilites.currentTransform; //vk:SurfaceTransformFlagBitsKHR::eldentity
    swapChainCreateInfo.compositeAlpha   = vk::CompositeAlphaFlagBitsKHR::eOpaque;
    swapChainCreateInfo.presentMode      = m_presentMode; // fifo
    swapChainCreateInfo.clipped          = VK_TRUE;
    swapChainCreateInfo.oldSwapchain     = VK_NULL_HANDLE;

    std::vector<uint32_t> queueFamilyIndices = {m_device.GetConcreteQueueFamilyIndex(EQueueFamilyIndexType::Graphics),
                                                m_device.GetConcreteQueueFamilyIndex(EQueueFamilyIndexType::PresentKHR)};

    //graphics vs transfer
    if(queueFamilyIndices[0] != queueFamilyIndices[1])
    {
        swapChainCreateInfo.imageSharingMode      = vk::SharingMode::eConcurrent;
        swapChainCreateInfo.queueFamilyIndexCount = static_cast<uint32_t>(queueFamilyIndices.size());
        swapChainCreateInfo.pQueueFamilyIndices   = queueFamilyIndices.data();
    }
    else
    {
        swapChainCreateInfo.imageSharingMode = vk::SharingMode::eExclusive;
    }

    m_swapChain = m_device.GetDevice().createSwapchainKHR(swapChainCreateInfo, nullptr);
    assert(m_swapChain != VK_NULL_HANDLE); // assertion triggered

When i run the Graphics capture via terminal it will inject following extensions

$: ./ngfx-capture --exe ~/Vulkan-RTX/build/Vulkan-RTX

=================================================
                                              
Launching /home/wpsimon09/Vulkan-RTX/build/Vulkan-RTX ...
[Vulkan-RTX] Connection Established: 2025-06-04 10:35:23.137904370 (pid: 22924)
Plugin "GTK3 plugin" uses conflicting symbol "png_free".
[Vulkan-RTX] Detected enabled Vulkan layer: VK_LAYER_KHRONOS_validation (version 1.4.313)
[Vulkan-RTX] Buffer address capture/replay enabled
[Vulkan-RTX] Injecting device extension: VK_EXT_private_data
[Vulkan-RTX] Injecting device extension: VK_KHR_storage_buffer_storage_class
[Vulkan-RTX] Injecting device extension: VK_KHR_8bit_storage
[Vulkan-RTX] Injecting device extension: VK_KHR_16bit_storage
[Vulkan-RTX] Injecting device extension: VK_KHR_ray_tracing_maintenance1
[Vulkan-RTX] Injecting device extension: VK_EXT_external_memory_host
[Vulkan-RTX] Injecting device extension: VK_EXT_memory_budget
[Vulkan-RTX] Overriding vkAllocateMemory to demote host visible device local memory off device (memoryTypeIndex: 4 -> 2)

And also will preform this actiont

[Vulkan-RTX] Overriding image usage flags to remove VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT so image data can be captured
[Vulkan-RTX] Overriding image usage flags to remove VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT so swapchain image data can be captured

My system information:
GPU: NVIDIA GeForce RTX 4050 Max-Q / Mobile [Discrete]
Driver version: 570.153.02
Nsight Version: 2025.3.0
OS: Fedora 42, GNOME, with Wayland

Any help is appreciated !

the issue was that I had all validation layers enabled, once I disabled all validation layers excluding those necessary for capturing the frame the error went away, however I am still not able to capture the frame probably because I am not accessing my storage buffers correctly

Hi wpsimon09,

Thank you for using Nsight Graphics and providing your feedback. Do you mean the issue still exists? I noticed you have several different feedback sources (feedback email, topic in the forums), could we just keep posting in a sole source?

Thanks
An

You could try experimenting with some of the flags under the Troubleshooting tab. For example, the flag “Capture Full GPU Allocations” might help here.

1 Like

Hi wpsimon09,

There might be several different threads about your different issues, and I take some time to do some try:

  • Graphics Capture
    • I didn’t see Fatal failed object lookup (api: Vulkan, id: 157 [vkCreateSwapchainKHR]) while using ngfx-capture --exe Vulkan-RTX
    • The GUI of Nsight Graphics also works fine (capture and reply)
  • Frame Debugger
    • As I mentioned in the email thread, Capture for Live Analysis will show an error dialog box “Vulkan device lost: Device lost attempting to replay event: 54 Most feature of Nsight will not work correctly”, but the Nsight Graphics UI doesn’t give crash (actually, it’s still work and give you limited info, and some feature doesn’t work like texture view), and capture doesn’t hang on progress bar.

I am using nvidia-ticket branch of your Vulkan-RTX project.

Thanks
An

Hello, thank you for your extensive help I really do appreciate it.

I have managed to get the full frame debugger to work but to do so I had to tweak Vulkan layers that are required for frame capture through Vulkan configurator application. After that I could at least do the Frame capture. The enabled layers look like following.

Additionally, I have tried to fix potential off-by-one errors, which might have also helped Frame Debugger to work. (I have updated the nvidia-ticket branch with the latest changes.)

Graphics capture, on the other hand, keeps giving me the swap chain error no matter what I do. This might be an issue with Fedora 42 and the new GNOME, especially since the Graphics capture works on your computer. I’ve also started noticing weird window update behaviors. For example, for Nsight to display the frame dissection, I have to unfocus the window or to trigger break point in the frame loop (in C++ debugger) I have to do the same .

Lastly I have tried to fiddle around with Troubleshooting tab like your colleague suggested but the error persists.

Is there anything I can do/provide that might help you ?

Thanks, wpsimon09.

If Frame Debug works on your side, then let us focus on Graphics Capture. Do you mean you still get Fatal failed object lookup (api: Vulkan, id: 157 [vkCreateSwapchainKHR]) error on Graphics Capture activity?

Hmmm, I noticed you mentioned the Wayland on GNOME, could you take a try on X11?

Thanks
An

1 Like

Everything works flawlessly on the X11, thank you !

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