I am using the ZED Mini in Unity 2022.3.13 (BiRP), with the game locked to 30 fps. My laptop has a Ryzen 5800H and RTX 3060, nothing is at 100% usage.
The app has been crashing. Sometimes up to every other time I enter play mode. All stacktraces point to it going wrong somewhere on the ZED side. Has thisbeen reported before?
Is there any code snippets I need to get? (I mostly repurposed the object detection code)
The stacktrace seems to be in native code, so I cannot fully debug it.
I just promoted your user rank, you should be able to send files now.
Do you reproduce the issue with one of the sample scenes? (object detection 2D or 3D for example, or other scenes?)
If you don’t, can you share the steps/code to reproduce the issue?
Does the issue happen if you don’t lock the framerate?
Can you share the logs from the ZED SDK from a crashing session?
To enable the logs in Unity, you have to manually edit ZEDManager.cs around those lines [Github].
Please add initParameters.sdkVerbose = 1;
after them.
Then, every time the SDK logs something, it will be into C:\ProgramData\Stereolabs\zed\log on Windows (at the end of the last log file).
Here are all the logs I can get. And the script that does most of the ZED work. It does happen with fps unlocked. I did not reproduce it yet in the official scenes. It happens more often when my laptop is on battery, so maybe there is an async readback somewhere causing a race condition if it does not meet performance requirements?
About the initParameters.sdkVerbose = 1:
I highly recommend to add initParameters.sdkVerbose = wrapperVerbose ? 1 : 0;
Currently the wrapperVerbose value is unused, while it does have the description and bool setup. Maybe exposing it by making it public or using [SerializeField] is a good idea as well. If you want I can also PR that on git.
Thanks for the feedback an logs. (Indeed, that PR would be appreciated)
I only get what looks like an obscure SDK crash from the logs. Would you be able to send us a minimal scene reproducing the issue, either here or on support@stereolabs.com ?
The when laptop is on battery make me think of a power plan issue, maybe it’s worth trying if it happens when you set it to high performance or equivalent? Even tough it also happens when plugged.