Skip to content

sl_open_camera crashes in self-calibration (LU32f) instead of returning error on low USB bandwidth #748

@arghhhhh

Description

@arghhhhh

Preliminary Checks

  • This issue is not a duplicate. Before opening a new issue, please search existing issues.
  • This issue is not a question, feature request, or anything other than a bug report directly related to this project.

Description

When a ZED camera is connected to a USB port with insufficient bandwidth, sl_open_camera() (via the Unity wrapper) crashes the process instead of returning a recoverable error code. The crash occurs during the retry logic after an initial Camera Open Internal Error: 1893.

Steps to Reproduce

Reproduction

  1. Connect a ZED camera to a USB port with limited bandwidth (e.g., shared internal laptop hub)
  2. Open camera via Unity plugin or ZED Diagnostic tool
  3. Process crashes instead of returning an error

Switching to a Thunderbolt port with full bandwidth resolves the issue — confirming this is a bandwidth-triggered crash, not a calibration data issue.

Notes

  • ZED Explorer and ZED Depth Viewer work on the same port (they likely use a simpler init path)
  • ZED Diagnostic also crashes at the "Camera Test" step on the same port
  • Crash is identical across SDK versions 5.1, 5.2.1, and 5.2.2
  • The cameraDisableSelfCalib init parameter does NOT prevent this crash, since the self-calibration runs internally during sl_open_camera

Expected Result

sl_open_camera should return ERROR_CODE::LOW_USB_BANDWIDTH (or similar) so the application can handle it gracefully.

Actual Result

  1. SDK logs [ZED][ERROR] [ZED] Camera Open Internal Error: 1893
  2. SDK logs [Init] Failed to open camera. Trying to re-open for 5 seconds.
  3. During retry, the process crashes in sl_update_self_calibrationslutils::cv::hal::LU32f (null/uninitialized data passed to LU decomposition)

ZED Camera model

ZED2i

Environment

- ZED SDK: tested on 5.1, 5.2.1, 5.2.2
- Unity: 2022.3.62f2
- Unity Plugin: com.stereolabs.zed v5.2.1 (git), 5.1
- OS: Windows 11 Pro 10.0.26200
- GPU: NVIDIA GeForce RTX 4080 Laptop GPU, driver 32.0.15.9579
- Camera serial: 39748971

Anything else?

The crash appears to happen because the retry attempts self-calibration with partially initialized camera state.

Stack Trace

sl_unitywrapper!sl_update_self_calibration
sl_unitywrapper!sl_open_camera
sl.ZEDCamera:dllz_open
ZEDManager:OpenZEDInBackground```

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions