-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 withing 15000' exception #7376
Comments
Hi @MikhailUskin Could you tell us what computer / computing device you are using the camera with please, and whether you are using a USB2 or USB3 connection? Thanks! |
The camera is recognized as USB3 device by 'Intel RealSense Viewer'. The app that throws this exception is running on Desktop/Win10 |
Is it your experience with this error that once it occurs then the program is unrecoverable and the error continues generating constantly until the camera is reset by being unplugged and then plugged back in? |
Everything looks fine with 'Intel RealSense Viewer' but when I run any code to catch frames using rs2::pipeline::wait_for_frames() call it throws. I've also tried to call hardware_reset() before starting a pipeline and after each throw but it didn't help. |
You can use try_wait_for_frames() instead of wait_for_frames() as it works similarly but returns a False state when timeout occurs instead of throwing an error. The stream may still be effectively paralysed but removing the error throw may be a step in the right direction. |
Are there any functions like hardware_reset() that could fix the the stream if try_wait_for_frames() return False? |
It does not always work in these situations but there is no harm in trying hardware_reset() since it does not take long to set up in a script. Some example C++ code for this is in the link below. |
I put try_wait_for_frames() and hardware_reset() calls instead of wait_for_frames() that throws as you suggested and then during debug session I saw that _aggregator->dequeue(frame, timeout_ms) returns false beacuse underlying queue remained empty. Also, I found that _post_process_callback->on_frame((rs2_frame*)fr) is never called in sensor.cpp. So, what functions I could debug next, to reveal more about the root cause of the issue? |
Given that a pipeline.stop() may not work when the program is in this state, I suggested in another case about the frame didn't arrive within 15000 recently that sensor.stop() could be tried as the stop instruction instead. Then this could be followed up with a hardware_reset() after the stop if it stops the pipeline successfully. |
Seems it doesn't help. I tested it on the following code based on #4158 (comment):
|
I have another app using RealSense cameras that works fine on other machines but if I put sensor.stop() in this app and call it on my machine it throws: |
Are you using the short official USB cable supplied with the camera or a longer cable of your own choice, please? |
The short one |
Does the frames didn't arrived within 15000 error occur as soon as the program starts or some time later? |
Unfortunately, it occurs every call of rs2::pipeline::wait_for_frames() function. So, my app doesn't receive frames at all. |
I note in your test script earlier that it makes use of syncer. If you are using syncer, could you try poll_for_frames() instead of wait_for_frames() or try_wait_for_frames(). The difference between poll and wait is that poll_for_frames() does not wait for complete frames to arrive, and is especially recommended when creating programs where multiple cameras will be accessed, |
I replaced wait_for_frames() with poll_for_frames() and removed restart_stream() function call each time new_frames container is empty but it didn't help |
Thank you very much for your patience during this diagnostic process. It may be useful to test with a sample program that is simpler than rs-capture to eliminate the possibility that the computer or the USB is being over-burdened with processing. Could you run rs-hello-realsense in the SDK Tools folder of examples please and see whether you experience errors? |
This sample throws the same exception |
There was a similar case to yours recently, where the RealSense Viewer worked fine but rs-hello-realsense and self-created programs generated the Frame didn't arrived within 15000 error. Cases where the camera works fine with some applications (such as the Viewer) but not others are problematic to diagnose, as it is more difficult to narrow the problem down to a specific cause (because the successes suggest that hardware is not at fault). A RealSense user who experienced the error with rs-hello-realsense posted a simple test script: |
Hi @MikhailUskin Do you still require assistance with this problem, please? Thanks! |
Hi, We've got the same issue on another machine (PC/Win10). The issue dissappeared after reinstalling Win10. I'm going to dig deeper inside the components responsible for communicating with drivers but a little bit later. Could you advice me in advance which components I should debug to see if there any data arrives from the camera? |
I would think that the simplest way to test the connection on Windows would be to run the simple rs-hello-realsense example, which just provides a live-updating text readout of measured distance without any graphics. A pre-built version of the example can be found in the SDK's Tools folder. You can find this easily on Windows by right-clicking on the desktop launch icon for the RealSense Viewer and selecting the Open file location option from the menu. |
Unfortunately, rs-hello-realsense example throws the exception we discussed earlier. |
Can you upgrade your camera to firmware 5.12.8.200 (the newest one) please if you have not done so already and see if it makes any difference? |
@MartyG-RealSense |
Hi @JANGSOONMYUN I will reply at the case that you have created. Thanks! |
Hi @MikhailUskin Do you require further assistance with this case, please? Thanks! I would add that in a couple of recent cases involving the Frame didn't arrived within 15000 the solution was to upgrade the SDK and firmware to the latest versions (SDK 2.39.0 and firmware 5.12.8.200 at the time of writing this). |
Case closed due to no further comments received. |
after all these solutions, just changing a power source worked for me. the camera needs enough power to get the frame otherwise it also throws above error |
Thanks so much @Captain299792458 for sharing your experience with the RealSense community! |
Hi,
I have installed the latest SDK v2.38.1 and checked whether everything is correct using 'Intel RealSense Viewer'. Both channels 'Stereo Module' and 'RGB Camera' functioning looked normal but my test app throws an exception when rs2::pipeline::wait_for_frames() is called with message 'Frame didn't arrive within 15000'. The same issue is reproducible if I run 'capture' sample provided by SDK.
The text was updated successfully, but these errors were encountered: