Nsight fails to launch application with Injecting failed error


I was happily using Nsight (2020.1.0 and recently 2020.1.1) and “all of a sudden”, I systematically get this error:

I could not find any references to this type of error and there is no log or information about the cause.
I tried to reinstall Nsight and the Vulkan SDK without success.

It fails really fast so at this time I am not suspecting changes in my app.
Am I correct in this assumption?

Nsight works well with the vkcube.exe that comes with the Vulkan SDK.
So the issue is on my side…

Nsight works well when I switch to the debug build of my app (it is a Rust app).

Sorry you ran into the initial issue where Nsight Graphics was failing to launch your application. Sounds like it is working with other Vulkan apps though and you confirm that the issue is on your side.
As always thank you for using Nsight Graphics and continuing to provided feedback on our tool.

What are possible causes of the “Launch failure: Injecting failed” error ?

And now the release build works again when running under Nsight.
Looks like a full rebuild helped…

I have a lot of moving parts in my app. Got to be more careful when upgrading parts.

Thanks for the update. Sounds like you have a path forward now. Let me know if that is not the case.

So I’ve been having these “Launch failure: Injecting failed” errors on and off since last posting here.
I am still getting them with the latest Nsight version (2021.2.1).

Good news is that I am now able to reproduce them at will by putting my application in a given state.

My application optionally uses ray tracing features and the “Injecting failed” error will happen when turning off these features. When these features are turned off then ray tracing extensions are not enabled, etc.

Once the error happens, I can work around it by :

  • enabling just the VK_KHR_acceleration_structure device extension,
  • and, it gets crazy here, calling a NOP function that only prints a message to the log.

I am pretty sure my code is not very clean when it comes to disabling the features that need RT.

Would be great if Nsight could give some indications as to why injection failed. AFAIK there is no such indications.

Also, if you think that the injection failures are not supposed to happen then I can provide more details on my repro case.

Thank you for your feedback on Nsight Graphics and I’m sorry you ran into this issue. From brief discussions with the engineering manager this may be tough to resolve without access to the app you used. Let’s discuss via email. My email address is dwoods@nvidia.com

Well I can’t reproduce anymore. Seems like the phase of the moon or something else has an influence…

Having some insight into what the injecting phase does could help me pinpoint what’s going on.

Injection fails fast so it is doing something very early during app startup. Is it using a vulkan layer or is it doing something more involved ?


Injection is generally very complicated, but I can say that the error you were encountering was actually reported by Microsoft Detours (GitHub - microsoft/Detours: Detours is a software package for monitoring and instrumenting API calls on Windows. It is distributed in source code form.), a technology that we use within our injection. It would be incredibly difficult to debug why detours is reporting an issue for your specific application without debugging in-situ, unfortunately.

If you failure is non-deterministic for a build, and the same build can succeed of fail based on the phase of the moon, this would be perhaps the most difficult case. If you have observed that a specific build will repeatedly fail, however, that would be useful to save and set to the side and send to us to see if we can reproduce on our side.

Hope this offers at least some steps forward,


Hi Dan,

Thanks a lot for the detailed answer. It is exactly the level of information I was hoping for.

Moving forward, I’ll do what you suggest: next time it happens I’ll set the binary aside and send it your way.

Thanks and regards,