ZED crashing in Unity using BodyTracking module

this crash happens consistently, sometimes after just a few minutes, sometimes after several hours:

Managed Stacktrace:

  at <unknown> <0xffffffff>
  at sl.ZEDCamera:dllz_retrieve_bodies_data <0x008e5>
  at sl.ZEDCamera:RetrieveBodies <0x0003a>
  at ZEDManager:RetrieveBodyTrackingFrame <0x0007a>
  at ZEDManager:AcquireImages <0x00312>
  at ZEDManager:ThreadedZEDGrab <0x000d2>
  at System.Threading.ThreadHelper:ThreadStart_Context <0x000a5>
  at System.Threading.ExecutionContext:RunInternal <0x001b5>
  at System.Threading.ExecutionContext:Run <0x0002a>
  at System.Threading.ExecutionContext:Run <0x0005a>
  at System.Threading.ThreadHelper:ThreadStart <0x00042>
  at System.Object:runtime_invoke_void__this__ <0x000bb>

======================================================

and farther down the crash log:

0x00007FFB9CD4B7B2 (sl_zed64) slutils::cv::hal::LU32f
0x00007FFB9CD1C03B (sl_zed64) slutils::cv::hal::LU32f
0x00007FFC0DA9DDB2 (sl_unitywrapper) sl_update_self_calibration
0x00007FFC0DA87971 (sl_unitywrapper) sl_retrieve_bodies
0x00000170E135BC46 (Mono JIT Code) (wrapper managed-to-native) sl.ZEDCamera:dllz_retrieve_bodies_data (int,sl.BodyTrackingRuntimeParameters&,sl.Bodies&,uint)
0x00000170E135B30B (Mono JIT Code) [C:\Users\Interactive Computer\Documents\dance-console-2022\Assets\ZED\SDK\NativeInterface\ZEDCamera.cs:3037] sl.ZEDCamera:RetrieveBodies (sl.BodyTrackingRuntimeParameters&,sl.Bodies&)
0x00000170E135B01B (Mono JIT Code) [C:\Users\Interactive Computer\Documents\dance-console-2022\Assets\ZED\SDK\Helpers\Scripts\ZEDManager.cs:3341] ZEDManager:RetrieveBodyTrackingFrame ()
0x000001702093DBD3 (Mono JIT Code) [C:\Users\Interactive Computer\Documents\dance-console-2022\Assets\ZED\SDK\Helpers\Scripts\ZEDManager.cs:2448] ZEDManager:AcquireImages ()
0x000001702093D233 (Mono JIT Code) [C:\Users\Interactive Computer\Documents\dance-console-2022\Assets\ZED\SDK\Helpers\Scripts\ZEDManager.cs:2381] ZEDManager:ThreadedZEDGrab ()
0x00000170F1FF9E36 (Mono JIT Code) System.Threading.ThreadHelper:ThreadStart_Context (object)
0x00000170F1FDA976 (Mono JIT Code) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
0x00000170F1FDA47B (Mono JIT Code) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
0x00000170F1FF922B (Mono JIT Code) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
0x00000170F1FF90F3 (Mono JIT Code) System.Threading.ThreadHelper:ThreadStart ()
0x00000170F1FF8EBC (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007FFC093CE084 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\mini\mini-runtime.c:3445] mono_jit_runtime_invoke
0x00007FFC0930EB84 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\object.c:3066] do_runtime_invoke
0x00007FFC0931216C (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\object.c:4449] mono_runtime_delegate_try_invoke
0x00007FFC0933D331 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\threads.c:1292] start_wrapper_internal
0x00007FFC0933D4D6 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\threads.c:1344] start_wrapper
0x00007FFC700A26AD (KERNEL32) BaseThreadInitThunk
0x00007FFC7206A9F8 (ntdll) RtlUserThreadStart

System:
Unity 2022.3 LTS / URP / DX11
Windows 11 Pro
12th gen i7, 12 cores
GPU: Nvidia RTX 3060 Ti
ZED 2 / SDK 4.0.1

thanks for any guidance!

Hi @nickhubben ,

Can you try with the latest SDK + plugin (4.0.3) and share if this behavior is still happening?
Also, does it happen only in built exe, in the editor, both?

Best,
Jean-Loup

Unity version 2022.3.0f1c1

zed sdk version 4.0.3

zed diagnostic run well.no problem.The crash occurs when another person enters Zed’s field of view.

Hey - this is happening again. New computer, SDK version 4.0.7. Happy to supply any other specs. stack trace is basically identical to what I pasted at the top.

Am just as interested in a workaround if any C# folks have ideas. Try/Catch?