fromCvMat in camcalib produce segFault #1979
Labels
Component: Library - YARP_sig
Fixed in: YARP v3.2.0
Issue Type: Bug
Involves some intervention from a system administrator
This bug has been found and solve with the help of Andrea Ruzzenenti (@aerydna)
Describe the bug
When running
camCalib
fromicub-main
and more specifically in thePinholeCalibTool::apply
function produce a null image afterfromCvMat<PixelRgb>
resulting in a segfault.We found that the issue is in reality in
libYARP_sig/src/Image.cpp
for the functionImage& Image::operator=(Image&& other)
.To Reproduce
Connect
camCalib
module toyarpdev
(grabberDual
)Expected behavior
The image returned from
fromCvMat<PixelRgb>
after applying the calibration with remap is not valid so accessing is pixel produce a segfault.Configuration :
devel
Temporary fix
The actual bug happen in the
libYARP_sig/src/Image.cpp
:When performing the swap if moved.implementation is not set to
nullptr
, the Image destructor is called on moved destroying also the implementation of the current object (this).A way to fix it is to explicitly set
moved.implementation
tonullptr
before the synchronize or before theswap
.For more details you can contact me or Andrea Ruzzenenti (@aerydna)
The text was updated successfully, but these errors were encountered: