Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Again getting "terminate called after throwing an instance of 'rs2::backend_error'" error #7313

Closed
milan-r-shah opened this issue Sep 11, 2020 · 11 comments

Comments

@milan-r-shah
Copy link

milan-r-shah commented Sep 11, 2020

Required Info
Camera Model D435i
Firmware Version 05.12.06.00
Operating System & Version Linux (Ubuntu 18.04)
Kernel Version (Linux Only) 5.3.0-28-generic
Platform PC
SDK Version 2.0 (v2.36.0)
Language C++
Segment others

Issue Description

In the past, I was already having the following error when I was trying to run pcl-color example using the command ./rs-pcl-color:

terminate called after throwing an instance of 'rs2::backend_error'
  what():  set_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Device or resource busy
Aborted (core dumped)

and for that, I had created #6940 . At that time, somehow I got rid of that error

  1. By installing the SDK again (through building from the source method).
  2. Just to be safe, every time when my Linux 18.04 LTS boots up, manually selecting the Kernel 5.3.0-28-generic.

But, now, I'm again getting the same error. The weird part is I get this error almost every time except for the rare occasions.

Is there any permanent way to fix this error (without trying any other installation method)?
Or uninstalling the current SDK and reinstalling it using the backend method is the only option now? (In fact, that method would solve this problem permanently?)

@milan-r-shah
Copy link
Author

One more thing is why running pcl-color example gives error most of the time except for a few random exceptions? If there is something wrong then it should give error every single time, right?

@milan-r-shah
Copy link
Author

milan-r-shah commented Sep 12, 2020

Update 01:
I noticed that this error occurs frequently if I open or have opened realsense-viewer recently.
Afterward, I keep getting this error multiple times, and then later on at some point in time, randomly, it would run without any error for 2-3 times and would again start giving the same error!
At least, as of now, it looks like somehow realsense-viewer is affecting or changing something. But, later on, how it gets fixed... automatically... for very few numbers of times?

Also, why only this example i.e. pcl-color gets affected? I don't see such error/behavior for any other examples e.g. "rs-hello-realsense" or "capture" or "rs-motion". They work all the time, without any error!

@milan-r-shah
Copy link
Author

milan-r-shah commented Sep 12, 2020

Update 02:
I noticed that after getting the above-mentioned error for the pcl-color example, if I run & stop any other example (I have tried "rs-hello-realsense") in a different terminal for a few times and then if I try again running the "pcl-color" example in the original terminal, it works (for 2-3 times).
In case, if it doesn't then I try doing the first thing i.e. running & stopping any other example code for a few times and then try again for "pcl-color" and it works!

But, as you can imagine, this is quite boring/frustrating and not an actual solution.

Please suggest any way to fix this rs2::backend_error problem permanently. Thanks in advance!

@RealSenseSupport
Copy link
Collaborator

Hi @milan-r-shah

Can you please update the versions of FW and SDK to the latest ones and let us know if you still see the same issue?

Thank you!

@RealSenseSupport
Copy link
Collaborator

@milan-r-shah

Do you still need help with this question?

@milan-r-shah
Copy link
Author

milan-r-shah commented Sep 25, 2020

Hi @RealSenseSupport ,

For updating the FW, I know the steps but could you please let me know how can I update the SDK?

I found steps in distribution_linux.md but those steps are for pre-built packages. On the other hand, I had installed the SDK using installation.md i.e. building from source. Over there, I couldn't find any steps on how to upgrade the SDK. Also, do I have to uninstall the existing version? If yes then could you please let me know where can I find detailed steps on that as well?

Thanks in advance!

@RealSenseSupport
Copy link
Collaborator

Hi,

Are you still experiencing issues with this? Have you tried starting fresh by removing all RealSense™ SDK-related packages with:

dpkg -l | grep "realsense" | cut -d " " -f 3 | xargs sudo dpkg --purge

and then install the latest SDK as per here:

https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md#installing-the-packages

Thanks

@RealSenseSupport
Copy link
Collaborator

Hi,

Were you able to give that a try? Did that work for you or will you be needing further help?

If we don’t hear from you in 7 days, this issue will be closed.

Thanks

@milan-r-shah
Copy link
Author

Hi @RealSenseSupport

Apologies for the late reply. After updating the firmware as well as the SDK (through backend method), I'm no longer getting the above error. However, is this backend method not very stable? Because sometimes while trying to launch the SDK from the terminal, I get Segmentation fault (core dumped) error:

$ realsense-viewer
15/12 21:21:18,376 ERROR [140267424298752] (handle-libusb.h:51) failed to open usb interface: 0, error: RS2_USB_STATUS_ACCESS
 15/12 21:21:18,378 WARNING [140267441084160] (sensor.cpp:632) Exception was thrown when inspecting Raw RGB Camera property Enable / disable backlight compensation
 15/12 21:21:18,378 WARNING [140267441084160] (sensor.cpp:632) Exception was thrown when inspecting Raw RGB Camera property UVC image brightness
 15/12 21:21:18,379 WARNING [140267441084160] (sensor.cpp:632) Exception was thrown when inspecting Raw RGB Camera property UVC image contrast
Segmentation fault (core dumped)

One more thing: now, I'm facing a somewhat similar issue with Intel RealSense LiDAR Camera L515. Upon running rs-pcl-color for L515, I'm getting this error:

terminate called after throwing an instance of 'rs2::error'
  what():  Couldn't resolve requests
Aborted (core dumped)

or sometimes, this one:

terminate called after throwing an instance of 'rs2::error'
  what():  No device connected
Aborted (core dumped)

For the errors with L515, I would create another issue!

@RealSenseSupport
Copy link
Collaborator

Hi,

Apologies for the late reply as well. It sounds like it might be easier to clear your system of all previous installs and start fresh than to try and root cause what might have went wrong. Is this viable?

Have you tried to follow the method here?
https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md

Or build the SDK from source?

Thank

@RealSenseSupport
Copy link
Collaborator

Hi,

Will you be needing further help with this?

If we don’t hear from you in 7 days, this issue will be closed.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants