Camera::open() never returns when connecting to an invalid stream IP (Windows, Receiver sample)

Hi everyone,

First of all, thank you for all the work you’ve put into the ZED SDK. We’ve been using it in our project and it’s been a great experience overall. I think I may have found an issue with the streaming receiver and wanted to check whether this is expected behavior or a bug.

Environment

Issue

When I try to connect to an invalid stream IP, the SDK reports a timeout internally, but Camera::open() never returns.

To reproduce:

  1. Build and run the official Streaming Receiver sample.

  2. Enter an invalid IP address (or an IP where no ZED streamer is running).

  3. The console outputs:

[ZED][INFO] Logging level INFO
[Streaming] Warning: Failed to retrieve camera settings from sender
[Streaming] Error: Stream Opening returned TIMEOUT (350)

However, the call to zed.open(init_parameters) never returns.

For example, if I add:

auto returned_state = zed.open(init_parameters);

std::cout << "Returned: "
          << sl::toString(returned_state)
          << " ("
          << static_cast<int>(returned_state)
          << ")" << std::endl;

the "Returned:" line is never printed because zed.open() blocks indefinitely.

Expected behavior

I would expect Camera::open() to return an appropriate sl::ERROR_CODE after the timeout so the application can handle the connection failure and notify the user.

Actual behavior

The SDK reports:

[Streaming] Error: Stream Opening returned TIMEOUT (350)

but Camera::open() never returns, leaving the application blocked indefinitely.

Has anyone experienced this with SDK 5.3 on Windows, or is this a known issue?

Thank you in advance for your help!

I also noticed that @sherod reported what appears to be the same issue in another thread:
https://community.stereolabs.com/t/camera-open-seems-to-ignore-open-timeout-seconds-if-set-from-stream/11441

In InitParameters, setting open_timeout_sec doesn’t seem to have any effect when connecting to a streaming camera using setFromStream(). Even with open_timeout_sec set, Camera::open() never returns if the stream is unreachable.

Could someone from the Stereolabs team confirm whether open_timeout_sec is expected to apply to setFromStream() connections? If not, is there currently a recommended way to prevent Camera::open() from blocking indefinitely when the remote stream is unreachable?

Thank you!

1 Like

Hi @LUP
Welcome to the StereoLabs community.

Thank you for reporting this issue. It has been logged, and it will be fixed in one of the next releases of the ZED SDK.

1 Like

Thank you for the quick reply and for looking into it!

I really appreciate the responsiveness of the team. Keep up the great work on the SDK!