Skip to content

Fix crashes in OpenPoseEstimation when onDisconnectImageProcessor is called

Christian Dreher requested to merge bug/fix-double-free into master

This fixes OpenPoseEstimation crashing whenever onDisconnectImageprocessor was called (for example when the ImageProvider was restarted).

Rationale

The problem was, that the member variable OpenPoseEstimation::calibration was deleted, and afterwards OpenPoseEstimation::stereoCalibration (instance of IVT StereoCalibration), resulting in a double-free or corruption. Double free in this case, since the destructor of StereoCalibration deletes the instance as well, as can be seen here. OpenPoseEstimation::calibration is initialised here from OpenPoseEstimation::stereoCalibration::GetLeftCalibration().

Edited by Christian Dreher

Merge request reports

Loading