I try to compile Body Fusion with SDK 5.0.1 but i get errors

Dear Community
we have this new PC with the Blackwell GPU, so i had to update the ADK and also recompile the Fusion livelink app. (cSharp version)

no matter how hard i try im not able to make the compiler give me a working exe.

im also not sure why i cant use the sdk folder from github so i tried with the one from the ZED SDK examples tomake the fusion fro unity work:

C:/Program Files (x86)/ZED SDK/samples/body tracking/multi-camera/

Cmake does not show any errors, the problem is in Visual Studio, i tried using Community 15 & 17 like in the tutorial:

Using the ZED C# API on Windows - Stereolabs

What is also weird is when i open the solution in visual studio it shows Win32 as default and i have to enter x64 manually, not sure there that is the right way.

I get these errors when i build in visual Studio:

The type 'Rectangle' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

and

Could not copy the file "C:\Users\User\Downloads\_latest SDK\Fbuild\bin\x64\Release\ZED_Body_Fusion.exe" because it was not found.```

Hi,

I’m a bit lost here, you are mentioning live link, unity, c# and body fusion. What exactly is not compiling?

Stereolabs Support

Hi Benjamin

yes its the fusion app that broadcasts to Unity, i tried to compile the Csharp folder into a exe. But that never worked.

At the weekend then remembered that i could try the ccp c++ version and then the compiling was working. :innocent:

Im now trying to figure out how to specificly configure the c++ exe to match my configuration on the Blackwell GPU pc.

There is no csharp sample to send fused data to Unity, can you link me to what you were using?

Then, once the c++ sender is compiled, you need to specify the calibration file as argument when running the executable.
For that, open a terminal in the folder containing the executable and run

ZED_Unity_Livelink_Fusion.exe path/to/calib/file

for example,

image

I know how to start the fusion in cmd, i use it with non blackwell GPU in other setups.

But im not sure how to reproduce the Fusion, maybe i use the wrong source in the SDK?
The only guidance i have is the tutorial with the SDK examples from your website.

I used this with Cmake:

C:/Users/User/Downloads/_latest_SDK/zed-sdk-master/body tracking/multi-camera/cpp

I wanted to reproduce my old setup with 720p, 30fps fusion for unity. (2 cameras)

But this is obviously the wrong source…

I found now the right source:

i also compiled it and the fusion is now kinda working.

However i get this error very often:

C:\Users\User>C:\Users\User\Downloads\_latest_SDK\liveLinkBuild\Release\ZED_Unity_Livelink_Fusion.exe C:\Users\User\VHS-dev-calibration.json
Try to open ZED 31993813..[2025-05-27 11:42:40 UTC][ZED][INFO] Logging level INFO
Error: CAMERA NOT DETECTED
Try to open ZED 38295136..[2025-05-27 11:42:41 UTC][ZED][WARNING] CAMERA NOT DETECTED in enum sl::ERROR_CODE __cdecl sl::Camera::open(struct sl::InitParameters)
[2025-05-27 11:42:41 UTC][ZED][INFO] Logging level INFO
Error: CAMERA NOT DETECTED
Unable to subscribe to 31993813 . MEMORY ALREADY USED
Unable to subscribe to 38295136 . MEMORY ALREADY USED
no connections

that is something i nevery see on the other pc’s with fusion active.
Any clues what that could be?

I also answer this question by myself, for all after me with not so much experiences in this stuff.

How i got Fusion working on windows with SDK 5.0.1

  1. Use this source in Cmake: from github - stereolabs/zed-unity-livelink
  2. follow the Cmake tutorial but use paths to the zed-unity-livelink. only the how to make the visual studio solution → stereolabs website /docs/app-development/csharp/use
  3. use latest visual studio community (with unity)
  4. once you compiled the first (release) build try optimizing, the zed-unity-livelink has old settings within: “senderRunner.cpp” replace them with the new settings: stereolabs website /docs/depth-sensing/depth-settings
  5. recalibrate your ZED cam with neural as in the senderRunner.cpp
  6. if not yet train all AI models
  7. if you get the Unable to subscribe to [cam ID]. MEMORY ALREADY USED error your cable is almost certain the problem. If you have an original zed cable with this error it is broken. And if you use fiber cable like me, be sure the Cable plus ist perfectly stable and secure in the cam or it will fail!

cheers

@BenjaminV Hi Benjamin
I made now the first build from the Unity Project and for a few Minutes everything works fine.

After about 3 minutes suddently the fusion stops working and cmd has errors.
The Unity Experience still runs.

[2025-05-27 14:59:41 UTC][ZED][WARNING] IExecutionContext::enqueueV3: Error Code 1: Cuda Runtime (an illegal memory access was encountered)
[2025-05-27 14:59:41 UTC][ZED][WARNING] [Grab]  CUDA error returned: an illegal memory access was encountered ( 700 )
[2025-05-27 14:59:41 UTC][ZED][ERROR] Skeleton detection inference failed!
[2025-05-27 14:59:41 UTC][ZED][WARNING] CUDA ERROR in enum sl::ERROR_CODE __cdecl sl::Camera::grab(struct sl::RuntimeParameters)
in enum sl::ERROR_CODE __cdecl sl::Mat::updateGPUfromCPU(struct CUstream_st *,int) : Err [700]: an illegal memory access was encountered.
in enum sl::ERROR_CODE __cdecl sl::Mat::copyTo(class sl::Mat &,enum sl::COPY_TYPE,struct CUstream_st *) const : Err [700]: an illegal memory access was encountered.
CUDA error at C:\builds\sl\ZEDKit\lib\src\sl_zed\DetectionHandler.cpp:2148 code=700(cudaErrorIllegalAddress) "cudaEventRecord(ev_image, sdk_stream)"
CUDA error at C:\builds\sl\ZEDKit\lib\src\sl_zed\DetectionHandler.cpp:2236 code=700(cudaErrorIllegalAddress) "cudaStreamWaitEvent(cu_strm, ev_image, 0)"
CUDA error at C:\builds\sl\ZEDKit\lib\src\sl_zed\DetectionHandler.cpp:2178 code=700(cudaErrorIllegalAddress) "cudaEventRecord(ev_depth, sdk_stream)"
in void __cdecl ai::BatchedBuffer::memcpy_d2h(unsigned __int64,struct CUstream_st *) : Err [700]: an illegal memory access was encountered.
in void __cdecl ai::BatchedBuffer::memcpy_d2h(unsigned __int64,struct CUstream_st *) : Err [700]: an illegal memory access was encountered.
CUDA error at C:\builds\sl\ZEDKit\lib\src\sl_zed\DetectionHandler.cpp:2252 code=700(cudaErrorIllegalAddress) "cudaEventRecord(ev_bt, cu_strm)"
CUDA error at C:\builds\sl\ZEDKit\lib\src\sl_core\utils\util.cu:482 code=700(cudaErrorIllegalAddress) "cudaCreateTextureObject(tex, &resDesc, &texDesc, NULL)"
in enum sl::ERROR_CODE __cdecl sl::Mat::updateCPUfromGPU(struct CUstream_st *) : Err [700]: an illegal memory access was encountered.
in enum sl::ERROR_CODE __cdecl sl::Mat::updateCPUfromGPU(struct CUstream_st *) : Err [700]: an illegal memory access was encountered.
CUDA error at C:\builds\sl\ZEDKit\lib\src\sl_zed\DetectionHandler.cpp:2274 code=700(cudaErrorIllegalAddress) "cudaStreamWaitEvent(cu_strm, ev_depth, 0)"
in enum sl::ERROR_CODE __cdecl sl::Mat::updateCPUfromGPU(struct CUstream_st *) : Err [700]: an illegal memory access was encountered.
CUDA error at C:\builds\sl\ZEDKit\lib\src\sl_zed\DetectionHandler.cpp:2306 code=700(cudaErrorIllegalAddress) "cudaStreamWaitEvent(cu_strm, ev_bt, 0)"
[2025-05-27 14:59:41 UTC][ZED][WARNING] IExecutionContext::enqueueV3: Error Code 1: Cuda Runtime (an illegal memory access was encountered)
[2025-05-27 14:59:41 UTC][ZED][WARNING] [Grab]  CUDA error returned: an illegal memory access was encountered ( 700 )
[2025-05-27 14:59:41 UTC][ZED][WARNING] CUDA ERROR in enum sl::ERROR_CODE __cdecl sl::Camera::grab(struct sl::RuntimeParameters)
[2025-05-27 14:59:41 UTC][ZED][ERROR] Skeleton detection inference failed!

Any Idea what this can cause?

We are using:
Nvidia GeForce RTX 5080
32gig ram
I9 CPU 14900KF
Win 11 Pro
Cuda compilation tools, release 12.9, V12.9.41
Build cuda_12.9.r12.9/compiler.35813241_0

Thanks for the report,
Could you please specify which depth mode you are using? I’m mostly interested in knowing if you were using one of the “NEURAL” modes?

1 Like

Yes i use the this setting: .depth_mode = DEPTH_MODE::NEURAL;