IntelRealSense / librealsense

Intel® RealSense™ SDK
https://www.intelrealsense.com/
Apache License 2.0
7.49k stars 4.8k forks source link

Realsense Viewer App instability while enabling and disabling sensor streams #2057

Closed napurvey closed 5 years ago

napurvey commented 6 years ago
Required Info
Camera Model D435
Firmware Version 5.9.14
Operating System & Version MacOS High Sierra 10.13.4 (17E199)
Platform Macbook Air
SDK Version v2.13 Development branch + Master
Language C
Segment VR/AR

We have been trying to diagnose instability problems with our own Realsense capture app on Mac OSX, and as a test we have been running the Realsense viewer app to isolate the problem further.

After running the Realsense viewer app we have discovered that the same instabilities exist there. When first starting the app, selecting the stream configuration options and starting the color and depth streams, the following problems occur:

  1. sometimes one of the Depth or Color streams will not even start resulting in the following:

screen shot 2018-07-13 at 11 07 34 am

  1. sometimes when selecting streams you get this error:

screen shot 2018-07-13 at 11 10 55 am

  1. most of the time after selecting and deselecting streams around ~6 times the sensor gets into a bad state and can lead to the Viewer app locking up (we have seen this happen in our own app):

screen shot 2018-07-13 at 11 09 17 am

The call stack when pausing in the Xcode debugger is like so:

screen shot 2018-07-13 at 11 17 53 am

We have the same symptoms in our own app, and therefore Realsense is not stable enough for us to ship due to instabilities when switching streams so would appreciate any fixes that address these issues. In this case I have been testing with the D435 but this also occurs on Mac OSX using a D415 sensor.

We have been previously using the master branch in our application but for these tests we have made sure we are up-to-date with the latest firmware and SDK and checked out to the Development branch just to soak up all the new fixes that have gone in, some of the solved bugs were also crashing our application.

Thanks!

MartyG-RealSense commented 6 years ago

Collectively, the range of problems that you reported (frame timeouts, streams unavailable, etc) would make me suspect a stability issue with the USB port on your Mac, rather than a software issue. This is more commonly reported on PCs, though perhaps because the number of people using RealSense on PC is greater and so the number of problems reported is proportionately greater. There were a small number of reported USB-related issues with Macs on the older SR300 model of camera though.

napurvey commented 6 years ago

Hi Marty,

Thanks for the the reply.

We have tested this on more than one Mac OSX machine; we have tested on two Macbook Air's (one of which was delivered and setup last week fresh), and a 2014 Mac Pro. I would deduce that this is more an OSX problem than a particular USB port problem unless a lot of Mac USB ports are not adequate enough to run a Realsense sensor on? This would cause a lot of problems for shipping Realsense support on Mac if this is the case.

MartyG-RealSense commented 6 years ago

As of SDK version 2.13.0, the main unresolved Known Issue with OSX at the moment is that example programs written in the C language can freeze. I guess you are probably not writing your app in C? (I mean "C" C, not C++ or C#)

A couple of other Known Issues currently relating to the firmware that may fit your symptoms are:

napurvey commented 6 years ago

Thanks for that info Marty; my takeaway is it seems at the moment that both sensor firmware and USB driver issues are present on Mac currently. I hope they become more stable in the future so we can confidently ship with this range of sensors.

RealSense-Customer-Engineering commented 6 years ago

[Realsense Customer Engineering Team Comment] hi @napurvey,

would like to know if you are NDA customer to intel? if yes, would suggest you to file ticket on Zendesk for direct support.

there are multiple issues here: issue 1), i think i can reproduce this issue by below steps, please help to confirm it's same as you

  1. connect D435 and start realsense viewer
  2. open stereo module control and uncheck "Infrared 1"
  3. start stereo module stream, no frame received for depth steam.

issue 2), seems like frame time out issue, when you stop and start streaming quickly, looks the previous frames not fully released and new stream start, will look into this issue. and from my test, if we stop/start slowly (after messages in the terminal stopped) then it is no problem, may be your short term workaround. please also confirm repo steps:

  1. connect D435 and start realsense viewer
  2. start /stop depth stream quickly.

issue 3), Viewer app locking up issue, can you please provide more detail reproduce steps? is this happened right after issue 2? do you unplug and plug the camera or after restart the viewer?

thanks.

RealSense-Customer-Engineering commented 6 years ago

[Realsense Customer Engineering Team Comment] update repo step for 1):

  1. connect D435 and start realsense viewer
  2. start Depth + IR streaming
  3. open stereo module control and uncheck "Infrared 1"
  4. start stereo module stream, no frame received for depth steam.
napurvey commented 6 years ago

Hi,

issue 3) will happen if you switch streams via the on/off button many times the app locks up. In my test case this was around 6 times.

The test was to emulate what we had been seeing in our own app where we would switch stream configurations many times and then we would get the app locking up, the xcode stack trace in the last image of the original post shows where it is locking up within the realsense viewer app; within a lock_guard call.

We are NDA customer / partner with Intel so I will follow up in due course through the Zendesk support channel or with our account manager.

Thanks!

napurvey commented 6 years ago

And thanks so much for following up on this, we appreciate the support to resolve these stability issues.

RealSense-Customer-Engineering commented 6 years ago

[Realsense Customer Engineering Team Comment] hi @napurvey,

thanks for the repo steps and yes, please file to Zendesk, thanks.

dorodnic commented 5 years ago

Sorry for late reply, number 1 seem to be resolved on the development branch (according to the reproduction steps by @RealSense-Customer-Engineering ) We are still working on the rest.

dorodnic commented 5 years ago

All the issues reported here should be resolved in v2.16.1

RealSense-Customer-Engineering commented 5 years ago

[Realsense Customer Engineering Team Comment] Hi @napurvey,

Did you try librs 2.16.1 to see how it works?

napurvey commented 5 years ago

Hi,

Sorry, we are not in a position to test this currently due to higher priorities driven by product, however this could change in the near future.

Thanks for the attention and support.

Neil

On Tue, 9 Oct 2018 at 11:40, RealSense Customer Engineering < notifications@github.com> wrote:

[Realsense Customer Engineering Team Comment] Hi @napurvey https://github.com/napurvey,

Did you try librs 2.16.1 to see how it works?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/IntelRealSense/librealsense/issues/2057#issuecomment-428242685, or mute the thread https://github.com/notifications/unsubscribe-auth/AC5ubjScU2eJ6sUgANbIiZnl47gkmNv2ks5ujMOCgaJpZM4VPGbg .

-- Neil Purvey Creative Technologist & real-time graphics developer Digital Graffiti Design t: 1 (929) 2384520 e: neil@digitalgraffitidesign.com w: digitalgraffitidesign.com

dorodnic commented 5 years ago

I will close this issue for now. If you encounter any problem feel free to open new issues and / or contact support.