librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

C Examples freeze on MacOS

Open edwinRNDR opened this issue 8 years ago • 15 comments

Required Info
Camera Model D435
Firmware Version 05.08.15.00
Operating System & Version MacOS 10.11 and 10.13
SDK Version 2.2.10.4 / 930b39cbfe381165e8c56df9299d9cad97ab1acb

All of the C examples wait indefinitely for data after rs2_pipeline_start_with_config. The other examples like rs-measure work fine.

Additionally. I am working on Java wrappers for librealsense and I am running into segfaults on OSX 10.11 and a similar (same?) freeze on MacOS 10.13. I have a stack trace of that here: https://gist.github.com/edwinRNDR/88adee566991e112f1a23087987ac258

edwinRNDR avatar Apr 20 '18 13:04 edwinRNDR

I have the exact same issue running RS 2.10.4 but with the D415 sensor.

drhalftone avatar Apr 25 '18 19:04 drhalftone

I can now confirm the issue using the latest firmware 5.9.9.2. Is there an older version that works on Mac to can go back to?

drhalftone avatar Apr 26 '18 20:04 drhalftone

same here. My current workaround is to add sleep(1); before rs2_pipeline_start_with_config.

Gnimuc avatar Apr 30 '18 09:04 Gnimuc

Adding that sleep worked for me.

drhalftone avatar Apr 30 '18 15:04 drhalftone

sleep won't work in the record-playback example where multiple pipelines are needed to be created and deleted in the process.

Gnimuc avatar May 03 '18 14:05 Gnimuc

Funniest thing, I just ran a version of my code that puts the RealSense inside a QTCPServer object so that I can stream video over a network. And a 1.0 second sleep didn't do it. I had to extend it to 2.0 seconds. I don't know if this is meaningful but it is a symptom. Maybe it can help out Intel in figuring out what's wrong.

drhalftone avatar May 03 '18 15:05 drhalftone

I can't help but wonder, given the lack of responses from Intel, if they consider this a problem with the library or with us?

drhalftone avatar May 07 '18 14:05 drhalftone

Hi @drhalftone @edwinRNDR @Gnimuc I apologize for long response time. This is definitely our bug that needs to be fixed, but the team wasn't able to get to it just yet.

dorodnic avatar May 08 '18 12:05 dorodnic

I just found the low-level API rs2_open has this problem too. I need to pause between choosing a profile and starting the sensor.

profile = choose_a_streaming_profile(sensor)

sleep(1)

rs2_open(sensor, profile, err)
checkerror(err)

This info might be helpful for narrowing down the bug.

Gnimuc avatar May 15 '18 15:05 Gnimuc

[Realsense Customer Engineering Team Comment] we are still working on this issue, and thanks for your information.

[Realsense Customer Engineering Team Comment] hi Gnimuc,

I tried with rs-distance.c, adding sleep(1); after line 66, rs2_config_enable_stream(), and it works here, thanks for sharing.

Hi, I had the same problem and a sleep didn't solve it for me. Realsense-viewer works for me in a limited capacity (the resolution is fixed at 480 x 270, the device has mounted as USB2 and there is no RGB stream - similar issues as other people in the thread). So in the example I changed the default Height and Width to 480 and 270 respectively and the example works.

stumacd avatar Jun 14 '18 11:06 stumacd

[Realsense Customer Engineering Team Comment] hi @edwinRNDR, @drhalftone, @Gnimuc,

Proper fix is now in the development branch, will be released soon

Should be resolved now in 2.14.0

dorodnic avatar Jul 22 '18 13:07 dorodnic

I assume this is resolved, if for some reason we are still missing something, please open a follow-up issue

dorodnic avatar Jul 26 '18 08:07 dorodnic