Crash when using Unreal Engine ZEDSamples

I’m starting to experiment with the ZED 2 and Unreal Engine but I get an Unreal Engine crash with the dialog error “GPU Crashed or D3D Device Removed.” when running the sample levels.

For example, when running the level L_BodyTrackingSingle and then reviewing the generated log, I see the following line, which seems to be the actual problem:

[2023.05.20-22.42.30:347][716]SlCameraProxy: Error: Can't enable BodyTracking: "EC_CorruptedSDKInstallation"

Tracing that error code in the source, I see this:

case sl::ERROR_CODE::CORRUPTED_SDK_INSTALLATION: /**< The SDK wasn't able to load its dependencies or somes assets are missing, the installer should be launched. */
					return ESlErrorCode::EC_CorruptedSDKInstallation;

But when I run the ZED Diagnostic tool, it shows no installation errors.

Has anyone else encountered this problem?

I’m running

  • Windows 10 (22H2) [10.0.19045.2965]
  • Visual Studio 2022
  • Unreal Engine 5.1.1-23901901+++UE5+Release-5.1
  • CUDA 12.1.105
  • ZED SDK 4.0.3

All AI models have been optimized.

Here are the diagnostics and logs
ZED_Diagnostic_Results.json (16.3 KB)
ZEDSamples.log (426.2 KB)


Following up on this, reverting back to CUDA 11.8 and the matching ZED 4.0.3 SDK solves this problem.

Hi @steved,

Maybe it’s a recently reported CUDA 12.1 path issue.
It seems that the UE5 plugin looks for CUDA 12.1 in the wrong path, we’ll fix this soon.

Did the ZED Tools / samples run correctly? ZED Depth Viewer for instance.


I’m actually the same person that reported the CUDA 12.1 path problem. I discovered that when working to get the ZEDSamples to compile. Interestingly the precompiled tools/samples do run correctly with CUDA 12.1.

I’m unblocked now that I’ve moved back to CUDA 11.8, but I’m happy to try something on my end with 12.1 if you have suggestions.

I tried quickly installing CUDA 12.1, and it seems that at least after a restart, it sets the variable CUDA_PATH too (along with the others)


I also had no trouble building, rebuilding or running the ZEDSamples project after the installation of the 12.1.

So yeah, not really sure why it happened. Basic question, but did you restart your computer after your 12.1 installation?

I’m pretty sure I rebooted after installing 12.1, but I’m not 100%. One thing I did notice is that when I downgraded to CUDA 11.8, that installer set both CUDA_PATH and CUDA_PATH_V11_8. I wonder if the CUDA installer only sets the general CUDA_PATH variable if it already exists?

I’ll try to find some time in the next day or so to go through the install process again and see if I can figure out what went wrong.

1 Like

I’m also having this crash.
I have a fresh install of CUDA 12.1 (+reboot), ZED SDK 4.0.3 (+reboot), Optimized all AI Models (+reboot) and the ZED UE5.1 Samples.
It will regenerate VS project files andcompile, but when I launch the editor and try to run any of the sample levels, I get the same above crash.

I have my ZED Diagnostics output (cannot upload, yet), but all is reported with green ticks.

Is there anything that I might have missed?
Is there any way to get more verbose logging?

I’ve now followed the installation instructions on two machines.

On a fresh Windows install of my RTX2070 machine, with only CUDA 12.1, ZED SDK4.0.5, Optimised AI and the Unreal project - everything builds and works as expected.

On my other machine, an RTX3080Ti, the AI Optimizes, ZED Diagnostics reports everything is green, UE project builds… but most of the maps in the sample project crash, with the error reported in this thread.

I’ve tried to remove CUDA and the ZED SDK, so as to get as fresh a base on the 3080 machine, as I can… but even (re)installing the CUDA/ZED/etc backon the 3080, using the same versions that worked on the 2070, it still doesn’t work.

Is there some other dependency that I might need?
Is there something that could be hanging around that I might need to make sure I remove?
I’ve checked the CUDA_PATH env variable (and restarted between each [re]install) and everything seems to be fine.

We have a few ZED 2’s, but I’m stuck being able to push the project forward, due to my main dev’ machine not being able to test the samples - so any help/guidance would be greatly appreciated!!

Found a fix for this, in case anyone else hits upon this issue.
In my case, there are reported issues between UE5, certain RTX series cards and DX12.

I changed the following line in my DefaultEngine.ini


Switching from DX12 down to DX11 - and on the RTX3080, this “fixed” the issue.

It definitely looks to not be a problem with Stereolabs/ZED SDK nor CUDA, but something in Unreal and/or DX12. I’d also like to say a huge thank you to Stereolabs’ support team for their great back-and-forth discussion with me, to narrow down what is or is not the problem!