-
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
Segmentation fault in reading frames of *.bag file #8601
Comments
Hi @kir-ark In past cases, this kind of error with bag frame scripts has tended to occur when reading bags using a loop. The link below has an example of this: It sounds as though you want to playback the bag file and display its contents on-screen, and not extract the frames into files. If that is correct, the SDK's read_bag_example.py bag reading Python example program may be a useful test script. Though the above example reads depth frames, a RealSense user edited it to add support for RGB frames. |
I see your point, but that doesn't work for my purposes. This read_bag_example.py read frames one by one. Instead of that I need to read random frame at an arbitrary time. That is why I using seek() function. The example above bag_reader.zip is particular case just to show you the segmetation fault error. In more general case I need to read one random frame at a time. I suppose the crash happens because of using registration method. Could you please explain is there any other method to read random frame at a time or figure out why segmentation fault occurs in using registration and seek function? |
Jumping to a specific frame in a bag during playback does not usually work well when set_real_time = false. Starting at the first frame and skipping forward to the target frame has been recommended instead. A discussion about use of playback.seek() in Python can be found at the link below: |
Hi @kir-ark Do you require further assistance with this case, please? Thanks! |
Case closed due to no further comments received. |
This issue is similar to #5503.
I extract frames from a *.bag file by index (index maps to time and passes to seek() function) and then display depth and color frames. Then at some point when the pipeline stops (pipeline.stop()), my application crashes with segmentation fault error. I tried different bag files with different stream settings. Segmentation fault happens in a random time.
I attached the script that reproduces the problem. It plays a *.bag file frame by frame using seek() function to imitate access by index.
bag_reader.py.zip
The text was updated successfully, but these errors were encountered: