Playback of recorded bag causes segfault


I am using SDK 1.8.3 for Linux to try and playback a recorded .bag file, using the Example/cpp/Sample-Playback/Playback.cpp demo. The bag was recorded from a Femto W if that matters, and has both depth + color images in it.

The playback works initially and displays both color and depth side-by-side in a GUI window. However, after several hundred frames, the playback abruptly stops with a segfault.

This is unfortunate because the frames I care about are somewhat later in this recording…

What I’ve Tried

  • The backtrace seems to point to SDK/lib/ RvlCompression::mdecompressBuffer()
  • SDK 1.7 gives similar results.
  • The Python SDK also crashes similarly.


  1. Is this a known issue?
  2. Are there any recommendations for further debugging?
  3. Is there any way I could “jump past” the problematic frame(s) using existing APIs? I’m curious if playback would work if I jumped to frame ~1000 for instance.

Could you please using the Sample Recorder to record then Sample Playback to play? The bag file recorded by other application is not compatible with Orbbec SDK.

Hi Nathan, that is how the .bag file was recorded. I used from the Python SDK

I was able to use Python bagpy to determine some details of the .bag file:

From this, I was able to parse the /cam0/color_raw messages and convert to cv2 format for display. So basically working around the segfault issue in the Orbbec SDK by not using it.

I have not been successful decoding /cam0/depth_raw using a similar flow. I suspect depth has a custom encoding, but haven’t been able to determine the format.

There is source code with and The samples work on my side. Do your problems come with play side?

Yes, the issue is on the playback end. I have recorded a handful of .bag files that work fine, but these specific files are larger (3GB) and throw an error partway into playback. As mentioned above, I tried both the C and Python SDKs for playback, and saw the same segfault issue using either approach.

If it’s possible to provide details on the format of the /cam0/depth_raw topic in the bag file, I believe I could proceed with implementing my own decoder.