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

Getting Call Stack for Multiple C++ Programs - sometimes after program appears to start. #3146

Closed
johnbirk opened this issue Jan 25, 2019 · 12 comments
Assignees
Labels

Comments

@johnbirk
Copy link

| Camera Model | { D435, D435i } have both |
| Firmware Version | (5.11.01; 5.10.13.0) |
| Operating System & Version | { Linux (Ubuntu 16.04.5 LTS|
| Kernel Version (Linux Only) | (e.g. 4.4.0-141-generic) |
| Platform | Intel i7 Dell 2018 |
| SDK Version | { 2.18.0} |
| Language | {C/C++ } |
| Segment | {Robot } |
USB 3.2

Please offer suggestions to help resolve a problem that suddenly appeared, after months of successful programming, that has halted all progress.

Issue Description

On terminal:
terminate called after throwing an instance of 'rs2::backend_error'
what(): xioctl(VIDIOC_S_FMT) failed Last Error: Device or resource busy
In Codelite:
Program Received signal SIGABRT
Stack trace is available in the 'Call Stack' tab

screenshot from 2019-01-24 17-44-04

screenshot from 2019-01-24 18-13-10

Error on starting realsense-viewer on D435: Invalid Value in rs2_get_option(options:0x7fa44c005ad0, option:Emitter On Off):
hwmon command 0x7d failed. Error type: Invalid Command (-1).

Realsense-Viewer Messages:
$ realsense-viewer
24/01 16:42:05,662 WARNING [140302001657600] (types.cpp:57) hwmon command 0x7d failed. Error type: Invalid Command (-1).
24/01 16:42:05,663 WARNING [140302001657600] (sensor.cpp:338) Unregistered Media formats : [ UYVY ]; Supported: [ ]
24/01 16:42:10,735 WARNING [140302001657600] (types.cpp:57) set_pu(id=3) failed! Last Error: Input/output error
24/01 16:42:10,735 WARNING [140302001657600] (sensor.cpp:725) Exception was thrown when inspecting properties of a sensor
24/01 16:42:15,793 WARNING [140302001657600] (types.cpp:57) set_pu(id=9) failed! Last Error: Input/output error
24/01 16:42:15,793 WARNING [140302001657600] (sensor.cpp:725) Exception was thrown when inspecting properties of a sensor

Other camera:
24/01 17:21:21,343 WARNING [139825117026048] (types.cpp:57) hwmon command 0x4f failed. Error type: No data to return (-21).
24/01 17:21:21,373 WARNING [139825117026048] (sensor.cpp:338) Unregistered Media formats : [ UYVY ]; Supported: [ ]
24/01 17:21:26,450 WARNING [139825117026048] (types.cpp:57) set_pu(id=3) failed! Last Error: Input/output error
24/01 17:21:26,451 WARNING [139825117026048] (sensor.cpp:725) Exception was thrown when inspecting properties of a sensor
24/01 17:21:31,511 WARNING [139825117026048] (types.cpp:57) set_pu(id=9) failed! Last Error: Input/output error
24/01 17:21:31,511 WARNING [139825117026048] (sensor.cpp:725) Exception was thrown when inspecting properties of a sensor
24/01 17:22:08,087 ERROR [139825412901440] (ds5-options.cpp:82) Asic Temperature value is not valid! (Last not consistently present)

Even got the Call Stack notice when running the following simple program. (But rarely this program actually works despite the predominance of the call stack notice, preventing the program from running??)

//Distance Intel Example
#include <librealsense2/rs.hpp> // Include RealSense Cross Platform API
#include

int main() {

// Create a Pipeline - this serves as a top-level API for streaming and processing frames
rs2::pipeline p;

// Configure and start the pipeline
p.start();

while (true)
{
// Block program until frames arrive
rs2::frameset frames = p.wait_for_frames();

// Try to get a frame of a depth image
rs2::depth_frame depth = frames.get_depth_frame();

// Get the depth frame's dimensions
float width = depth.get_width();
float height = depth.get_height();

// Query the distance from the camera to the object in the center of the image
float dist_to_center = depth.get_distance(width / 2, height / 2);

// Print the distance
std::cout << "The camera is facing an object " << dist_to_center << " meters away \r";

}
}

@johnbirk
Copy link
Author

screenshot from 2019-01-24 18-36-02

@johnbirk
Copy link
Author

Here is line 812 where one of the stack traces ended:

screenshot from 2019-01-24 19-25-32

@johnbirk
Copy link
Author

Here is line 94 where the trace started, in the three step trace. Line 95 also produced the stack trace.
screenshot from 2019-01-24 19-29-08

@ev-mp
Copy link
Collaborator

ev-mp commented Jan 25, 2019

Hello @johnbirk,
This issued will be addressed in PR_3127. See #3137

@johnbirk
Copy link
Author

D435 has call stack problem. It has firmware 5.11.01.00. Realsense-viewer works, despite this error message: Invalid Value in rs2_get_option(options:0x7fbad0005ad0, option:Emitter On Off):
hwmon command 0x7d failed. Error type: Invalid Command (-1). Also these errors showed up on the terminal:
25/01 07:48:18,985 WARNING [140440564586240] (types.cpp:57) hwmon command 0x7d failed. Error type: Invalid Command (-1).
25/01 07:48:18,987 WARNING [140440564586240] (sensor.cpp:338) Unregistered Media formats : [ UYVY ]; Supported: [ ]
25/01 07:48:24,057 WARNING [140440564586240] (types.cpp:57) set_pu(id=3) failed! Last Error: Input/output error
25/01 07:48:24,057 WARNING [140440564586240] (sensor.cpp:725) Exception was thrown when inspecting properties of a sensor
25/01 07:48:29,116 WARNING [140440564586240] (types.cpp:57) set_pu(id=9) failed! Last Error: Input/output error
25/01 07:48:29,116 WARNING [140440564586240] (sensor.cpp:725) Exception was thrown when inspecting properties of a sensor
25/01 07:49:27,223 WARNING [140440860461632] (types.cpp:57) hwmon command 0x7d failed. Error type: Invalid Command (-1).
25/01 07:50:28,457 WARNING [140440860461632] (types.cpp:57) hwmon command 0x7d failed. Error type: Invalid Command (-1).
25/01 07:53:14,441 ERROR [140440409974528] (types.h:214) xioctl(VIDIOC_DQBUF) failed for fd: 22 Last Error: No such device
25/01 07:53:14,441 ERROR [140440409974528] (backend-v4l2.cpp:1335) xioctl(VIDIOC_DQBUF) failed for fd: 22 Last Error: No such device
25/01 07:53:14,490 ERROR [140440547800832] (types.h:214) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: No such device
25/01 07:53:14,516 ERROR [140440547800832] (error-handling.cpp:66) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: No such device
25/01 07:53:14,943 ERROR [140440860461632] (types.h:214) xioctl(VIDIOC_STREAMOFF) failed for buf_type=1 Last Error: No such device
25/01 07:53:14,943 ERROR [140440860461632] (sensor.cpp:257) An error has occurred while stop_streaming()!
25/01 07:53:25,195 WARNING [140440860461632] (types.cpp:57) hwmon command 0x4f failed. Error type: No data to return (-21).
25/01 07:53:25,285 WARNING [140440860461632] (sensor.cpp:338) Unregistered Media formats : [ UYVY ]; Supported: [ ]

D435i also has call stack problem (typically after program runs for ~one second). It came with firmware 5.10.13.0, which has not been changed. Realsense-viewer works with no startup error, but the following error messages on the terminal:
25/01 07:54:39,971 WARNING [139934648227584] (types.cpp:57) hwmon command 0x4f failed. Error type: No data to return (-21).
25/01 07:54:40,000 WARNING [139934648227584] (sensor.cpp:338) Unregistered Media formats : [ UYVY ]; Supported: [ ]
25/01 07:54:45,076 WARNING [139934648227584] (types.cpp:57) set_pu(id=3) failed! Last Error: Input/output error
25/01 07:54:45,077 WARNING [139934648227584] (sensor.cpp:725) Exception was thrown when inspecting properties of a sensor
25/01 07:54:50,136 WARNING [139934648227584] (types.cpp:57) set_pu(id=9) failed! Last Error: Input/output error
25/01 07:54:50,136 WARNING [139934648227584] (sensor.cpp:725) Exception was thrown when inspecting properties of a sensor

Another problem is that displayed stationary active images go dark after several seconds of a program running. Some indication of life after move camera, but not fully operational.

@vatbrain
Copy link

I started getting hwmon errors in realsense-viewer when I upgraded my D435 to firmware 5.11.01.
The firmware upgrade also seemed to cause other downstream errors for me when using realsense-ros.
Downgrading my firmware to 5.10.13.0 got me back up and running.

@Achllle
Copy link

Achllle commented Feb 3, 2019

@ev-mp #3137 did not solve the problem for me either, only downgrading FW worked.
[D435, branch:development, librealsense2=v2.18.0]

@ev-mp
Copy link
Collaborator

ev-mp commented Feb 4, 2019

@Achllle , can you elaborate what behavior you observe with FW 5.11.1.0 ?

@Achllle
Copy link

Achllle commented Feb 4, 2019

I get the same behavior as @vatbrain and the OP I believe hwmon command 0x7d failed. Error type: Invalid Command (-1).

@ev-mp
Copy link
Collaborator

ev-mp commented Feb 5, 2019

@Achllle ,
The #3137's symptom (identical to this one), was fixed in PR 3127.
Did you try to use it?
Since it has already been merged into development branch, you can get it directly from github source tree.

@Achllle
Copy link

Achllle commented Feb 5, 2019

I did not, I didn't see that PR so I'll assume it's fixed in there and wait until it's released in the next version. Thanks!

@johnbirk
Copy link
Author

johnbirk commented Feb 5, 2019

I checked the status of this issue today. I used the same two cameras with the same firmware as previously reported on two apps. At first with one app, the 435i was working and the 435 was not (The signal on my Codelite IDE showed that the app stopped running, but I didn't stop it). This experiment was repeated by switching cameras several times with the same result.

I tried another app with the same result (one camera worded, the other didn't). After switching cameras several times and running the realsense-viewer, the second app started working with the 435.

I switched to the first app and the 435 was also working with it.

So now I have two cameras working on at least two apps. Hopefully that status will persist.

I haven't seen the Call Stack problem in about a week.

The realsense-viewer shows an error for only the 435 (not the 435i). The error is "Invalid Value in rs2_get_option". This may well be due to the use of the latest firmware in the 435.

I don't know why the Call Stack behavior stopped or why the 435 wasn't working one minute and then started working the next.

Given the current status of my cameras, it's probably appropriate to close this issue.

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

No branches or pull requests

5 participants