Segfault on disableRecording()

Hi folks,

I am getting a error where I am unable to disable SVO recording without segfaulting. I have a single C++ program where I have 4 ZED Xs in different threads capturing frames and recording to an SVO file. When I shutdown and call .close() or .disableRecording() I get a segfault in the SVO writer. I’ve tried everything but I can’t shutdown without crashing. It seems to be some sort of bug or double free in the sl::TegraEncoder

I tried pauseRecording(true) and sleeping for 2 seconds before closing/disabling recording to see if that made a difference but it didn’t.

I’m getting this with both SVO1 and SVO2 modes.

Setup:
AGX Orin
4x ZED Xs
Quad capture card
Jetpack 6.2
ZED SDK 5.0.3
[Temporary package fix] (Apt upgrade fails on fresh zed box flash - #8 by Waelyn)

With SVO2:

PC@       ffffa699a7bb (unknown)
PC@       fffedd9b01c0 __pthread_clockjoin_ex at /glibc-2.35/nptl/pthread_join_common.c:43
PC@       fffef8865ed7 NvV4l2ElementPlane::waitForDQThread(unsigned int)
PC@       fffef88666b7 NvV4l2ElementPlane::deinitPlane()
PC@       fffef9d4980f sl::TegraEncoder::~TegraEncoder()
PC@       fffef9d5189b SLHW_Destroy
PC@       fffef86f07f3 TemporalImageSerializer::~TemporalImageSerializer()
PC@       ffffa5fbf9eb std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release()
PC@       fffef85cd7cf sl::svorw::SVOGen2Writer::~SVOGen2Writer()
PC@       fffef85cdc13 sl::svorw::SVOGen2Writer::~SVOGen2Writer()
PC@       fffef85e3d43 sl::svorw::SVOVideo::close()
PC@       fffef9af3fef sl::Camera::disableRecording()

With SVO1:

PC@       ffff9853f7bb (unknown)
PC@       fffecf5501c0 __pthread_clockjoin_ex at /glibc-2.35/nptl/pthread_join_common.c:43
PC@       fffeea405ed7 NvV4l2ElementPlane::waitForDQThread(unsigned int)
PC@       fffeea4066b7 NvV4l2ElementPlane::deinitPlane()
PC@       fffeeb8e980f sl::TegraEncoder::~TegraEncoder()
PC@       fffeeb8f189b SLHW_Destroy
PC@       fffeea18fd23 sl::svorw::HEVCBasedWriter::~HEVCBasedWriter()
PC@       fffeea13a80f sl::svorw::SVOGen1Writer::~SVOGen1Writer()
PC@       fffeea183d43 sl::svorw::SVOVideo::close()
PC@       fffeeb693fef sl::Camera::disableRecording()

Hi @Waelyn
Please share the code you are using. We will use it for debugging and eventually find bugs with the ZED SDK v5.0.3.

If you do not want to share it publicly, please send it to support@stereolabs.com