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

The tool rs-convert does not terminate its execution #3297

Closed
frankfalse opened this issue Feb 20, 2019 · 5 comments
Closed

The tool rs-convert does not terminate its execution #3297

frankfalse opened this issue Feb 20, 2019 · 5 comments
Labels

Comments

@frankfalse
Copy link

frankfalse commented Feb 20, 2019

Required Info
Camera Model D400
librealsense SDK realease 2.18.1
Operating System & Version Linux Ubuntu 16.04
Language C++

Issue Description
I use the tool rs-convert to get png files from a bag file.
But every times I start the program it doesn't terminate. I launch the program from a terminal in Ubuntu 16.04, so to terminate it, I must press the combination of keys Ctrl-C.

I add a screenshot which shows the execution end of the tool. In this case, it extracts frames from the bag file called: 20190220_145430_880.bag.

The screenshot shows that rs-convert extract 45 frame from the bag file:

rs-convert-screenshot

On the bottom-left of the screenshot it's visible the blinking cursor.
To close the application I need to press Ctrl+C.

I need to use the code of the rs-convert tool to create an analog application which extract png files from a bag files.
So I can't accept that the execution of this application doesn't terminate!

Someone have the same problem or can help me about this trouble?

Thank you
Frank

@frankfalse frankfalse changed the title The tool rs-convert does not terminate The tool rs-convert does not terminate execution Feb 21, 2019
@frankfalse frankfalse changed the title The tool rs-convert does not terminate execution The tool rs-convert does not terminate its execution Feb 21, 2019
@frankfalse
Copy link
Author

frankfalse commented Feb 22, 2019

Probably I have found a work-around for my problem.
I note that the tool rs-convert doesn't terminate because the condition for exit from the main loop, while(true), is:

if (frameset[0].get_frame_number() < frameNumber) {
break;
}

This condition is verified at the end of the file bag, and the program restart to get the first frame of the bag file.
In that moment the program exits from the main loop but it doesn't terminate.

work-around

The work-around consists to continue playing the file bag and, after the frame number 1, read the frame number 2 and the frame number 3 too, but without write anything on the disk (this means that I don't call the function stbi_write_png())
With this strange modified the tool stops its execution!

Someone can explain this behavior?

Thanks

@dorodnic dorodnic added the bug label Feb 24, 2019
dorodnic added a commit to dorodnic/librealsense that referenced this issue Feb 24, 2019
@dorodnic dorodnic mentioned this issue Feb 24, 2019
@YangJiao1996
Copy link

Hi Frank, that is interesting. I believe that it is also the weird if statement you mention that causes the problem in both your issue and #3208.
I noticed that @dorodnic referred this issue in a recent push request, is this issue solved in #3318?

@dorodnic
Copy link
Contributor

@YangJiao1996, yes, should be solved and part of a release in a day or two.
The solution is more of a work around, but it seems to get the job done, and I want to unblock this before diving deeper into the root cause of the issue.

@frankfalse
Copy link
Author

Thank you very much now all it works.

@RealSenseCustomerSupport
Copy link
Collaborator


Hi frankfalse,

Glad to know that fix from dorodnic works for you.

Thanks!

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

4 participants