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

Frame didn't arrived within 5000 with RS-D435 on Ubuntu14.04 #927

Closed
ytzhao opened this issue Dec 20, 2017 · 8 comments
Closed

Frame didn't arrived within 5000 with RS-D435 on Ubuntu14.04 #927

ytzhao opened this issue Dec 20, 2017 · 8 comments

Comments

@ytzhao
Copy link

ytzhao commented Dec 20, 2017

Required Info
Camera Model D435
Firmware Version 05.08.14.00
Operating System & Version Ubuntu14.04
Kernel Version (Linux Only) 4.4.0-101-generic
SDK Version rs2

Hi everyone, I developed a project with RealSense D435 under Qt5.9. I read the color frame and depth frame data by rs2 api default function.

The core code segment is as followed:

while(1) 
{
    rs2::frameset frameset = pipeline.wait_for_frames();
    rs2::frame depth_frame = frameset.get_depth_frame();

    matDepth = cv::Mat(cv::Size(640,480), CV_16UC1, (void*)depth_frame.get_data());
    
    cv::imshow("depth img", matDepth);
    cv::waitKey(10);
}

The program could run correctly for several minutes, but each time it will terminate unexpectly with error message :
terminate called after throwing an instance of 'rs2::error'
what(): Frame didn't arrived within 5000

@icarpis
Copy link
Contributor

icarpis commented Dec 21, 2017

Hello @ytzhao, do you see the same behavior with RealSense samples/tools such as realsense-viewer or rs-depth-quality?
If so, could you please provide RealSense log by adding "log_to_file(RS2_LOG_SEVERITY_DEBUG);" to your app?

There is also a possibility that your camera hangs up while streaming. In order to ensure it doesn't happen please try to monitoring the USB connect/disconnect events by doing the following:

  1. Open Terminal.
  2. Type udevadm monitor
  3. Try to reproduce the issue

If the camera hangs up you will see output from udevadm.

@ytzhao
Copy link
Author

ytzhao commented Dec 26, 2017

Hello @icarpis , firstly, thanks for your reply. :-)

  1. I tried with RealSense samples/tools/realsense-viewer, there are about 2 out of 10 times output:
- librealsense version: 2.8.2
- Intel RealSense 435 was selected as a default device
- Incomplete frame detected!
Size 328712 out of 614655 bytes (53%)
  1. I add "log_to_file(RS2_LOG_SEVERITY_DEBUG);" to my app, the app runs correctly about 15 mins and then crashes. The log file shows that:
 26/12 15:35:01,000 DEBUG [139909046900480] (archive.cpp:157) CallbackFinished,Color,0,DispatchedAt,1514273701000.158447
 26/12 15:35:01,000 DEBUG [139909046900480] (archive.cpp:164) Frame Callback [Color#0] overdue. (Duration: 1514273701000.158447ms, FPS: 30, Max Duration: 32ms)
 26/12 15:35:01,000 DEBUG [139909046900480] (sync.cpp:26) SYNCED: Color 21169, 884825.766000
Infrared 21343, 884834.943000
Infrared 21343, 884834.943000
Depth 21343, 884834.943000

 26/12 15:35:01,000 DEBUG [139909046900480] (archive.cpp:361) CallbackStarted,Color,21169,DispatchedAt,1514273701000.286865
 26/12 15:35:01,000 DEBUG [139909046900480] (archive.cpp:157) CallbackFinished,Infrared,21341,DispatchedAt,1514273701000.330566
 26/12 15:35:01,000 DEBUG [139909046900480] (archive.cpp:164) Frame Callback [Infrared#21341] overdue. (Duration: 68.186035ms, FPS: 30, Max Duration: 32ms)
 26/12 15:35:01,000 DEBUG [139909055293184] (archive.cpp:157) CallbackFinished,Infrared,21341,DispatchedAt,1514273700999.356201
 26/12 15:35:01,000 DEBUG [139909055293184] (archive.cpp:164) Frame Callback [Infrared#21341] overdue. (Duration: 66.955811ms, FPS: 30, Max Duration: 32ms)
 26/12 15:35:01,000 DEBUG [139909055293184] (archive.cpp:157) CallbackFinished,Color,21168,DispatchedAt,1514273701000.613525
 26/12 15:35:01,000 DEBUG [139909055293184] (archive.cpp:157) CallbackFinished,Color,0,DispatchedAt,1514273701000.657227
 26/12 15:35:01,001 DEBUG [139909046900480] (archive.cpp:157) CallbackFinished,Depth,21341,DispatchedAt,1514273701000.951904
  1. The USB monitor shows messages with following information:
KERNEL[9611.143775] change   /devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/ADP0 (power_supply)
KERNEL[9611.220639] change   /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:17/PNP0C09:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
UDEV  [9611.220667] change   /devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/ADP0 (power_supply)
UDEV  [9611.221850] change   /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:17/PNP0C09:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
KERNEL[9611.222854] change   /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:17/PNP0C09:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
UDEV  [9611.223300] change   /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:17/PNP0C09:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
KERNEL[9953.149914] change   /devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/ADP0 (power_supply)
KERNEL[9953.228574] change   /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:17/PNP0C09:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
UDEV  [9953.229960] change   /devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/ADP0 (power_supply)
UDEV  [9953.229978] change   /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:17/PNP0C09:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
KERNEL[9953.231518] change   /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:17/PNP0C09:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
UDEV  [9953.232156] change   /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:17/PNP0C09:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
KERNEL[11980.450929] change   /devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight (backlight)
UDEV  [11980.451529] change   /devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight (backlight)

And I also tried realsense-viewer running for about 3 hours, the USB monitor outputs the following information:

KERNEL[1604.411961] change   /devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight (backlight)
UDEV  [1604.413000] change   /devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight (backlight)
KERNEL[1959.258963] change   /devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight (backlight)
UDEV  [1959.259795] change   /devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight (backlight)
KERNEL[2688.026811] change   /devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight (backlight)
UDEV  [2688.027418] change   /devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight (backlight)
KERNEL[3613.654798] change   /devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight (backlight)
UDEV  [3613.656349] change   /devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight (backlight)
KERNEL[3931.766834] change   /devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight (backlight)
UDEV  [3931.767489] change   /devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight (backlight)
KERNEL[4244.501962] change   /devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight (backlight)
UDEV  [4244.502572] change   /devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight (backlight)
KERNEL[4668.974907] change   /devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight (backlight)
UDEV  [4668.975966] change   /devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight (backlight)
KERNEL[6297.188052] change   /devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight (backlight)
UDEV  [6297.189263] change   /devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight (backlight)

@icarpis
Copy link
Contributor

icarpis commented Dec 28, 2017

Thank you for the detailed outputs.
The prints of Incomplete frame detected means that either the machine or the USB controller are weak.
Regarding the realsense-viewer crash, please provide core dump file by the following steps:

  1. Open a Terminal
  2. Type ulimit -c unlimited
  3. Reproduce the crash of realsense-viewer
  4. A core file should be appears at the working directory
  5. Revert back the core dump settings to default by typing ulimit -c 0

@mjscosta
Copy link

mjscosta commented Mar 2, 2018

Hi, I had this issue now and then.
@icarpis What do you mean with:

The prints of Incomplete frame detected means that either the machine or the USB controller are weak.

Do you mean, it has power issues (not enough power for the device)? do you mean the controller has not enough bandwidth to transfer the full frames ?

@dorodnic
Copy link
Contributor

dorodnic commented Mar 25, 2018

@mjscosta, Sorry for delay, the partial frames issue usually indicate that the uvcvideo driver does not get enough USB buffers from the USB subsystem. This can be either because the system is overloaded (possibly thermal-throttled), CPU utilisation is near 100%, or the USB controller is not handling the requests in time.

@ytzhao do you still see the problem? Could you please provide the information recommended by @icarpis ?

@RealSense-Customer-Engineering
Copy link
Collaborator

[Realsense Customer Engineering Team Comment]
hi @mjscosta , @ytzhao

do you still need support on this topic?
thanks.

@RealSense-Customer-Engineering
Copy link
Collaborator

[Realsense Customer Engineering Team Comment]
let me close this ticket here, please feel free to open new ticket if any question.

@mjscosta
Copy link

Fell free to close it on my side. I've got this under a VM, either using vmware or virtualbox.
So dorodnic's reply, just explains it. Thanks for the info.

Best.

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

No branches or pull requests

5 participants