How Can we detect when fusion is crashing on startup?

Dear Stereolabs Team,
dear Community

We are currently using the ZED Fusion with two cameras in an interactive experience.

Our setup is as follows:

  • The Windows system starts up, followed by the Fusion setup after a short timeout (to allow Windows enough time to initialize).

  • After that, Unity is launched, and in most cases everything works as expected.

However, the museum staff reports that the Fusion often does not start properly. It seems that the autostart occasionally fails for unknown reasons.

Is there a recommended way, tool, or known workaround to detect if Fusion has crashed during startup and automatically restart it? At the moment, we are using AutoHotkey to start the terminal with Fusion and the JSON configuration. (we are open to any workaround)

We would be very grateful for any tips, tricks, or best practices you could share to improve the stability of this process.

Thank you in advance for your support and ideas
Best regards Pascal

link to the usecase

Do you know which step of the startup fails? Having the logs of the application would be helpful.

My theory is that the camera is not ready to be opened yet, so waiting a bit longer would help.
With that being said, I would recommend using the getDeviceList() function from the API to make sure the camera is available before trying to open it.
That would ensure you are not trying to open it “too early” during the startup process.

Best,

Edit: added link to getDeviceList doc api

Stereolabs Support

1 Like

Thank you so much, Benjamin for this quick solution/answer!

So this getDeviceList() function, is it something we can’t do with unity then.
We have to start the unity app first, then the fusion, will that work? Unity is just waiting for the UDP broadcast so it should kinda work right?

The fusion app would to do a self test then is that correct?

Best,

What’s your workflow, are you using the “live link” plugin to stream the data to Unity ?

I guess you can start the Unity app first, it won’t receive any data at the start but It should not be a problem).

1 Like

Yes its the livelink exe
Very exciting, now i have to find a C++ guy, we are only experienced with C Sharp :sweat_smile:

We try this approach, thank you so much!

Well ok, so you need to modify the fusion sender (zed-unity-livelink/zed-unity-livelink-fusion/src/main.cpp at main · stereolabs/zed-unity-livelink · GitHub) by adding a function that checks if the cameras are detected (using getDeviceList) at the start, before starting the fusion and all the stuff.

I think you can ask chatgpt actually, and c++ is not that far from csharp anyway.