gadomski / cpd

C++ implementation of the Coherent Point Drift point set registration algorithm.
http://www.gadom.ski/cpd
GNU General Public License v2.0
385 stars 122 forks source link

double free or corruption (out) #159

Closed qing130 closed 1 year ago

qing130 commented 1 year ago

when I add this library to ORB SLAM3(https://github.com/UZ-SLAMLab/ORB_SLAM3) And it had error:double free or corruption (out). the test code: ''' Eigen::MatrixXd eMatrix1 ; eMatrix1.resize(3, 2); int i=0; eMatrix1(i, 0) = 0; eMatrix1(i, 1) = 0; i++; eMatrix1(i, 0) = 1; eMatrix1(i, 1) = 0; i++; eMatrix1(i, 0) = 0; eMatrix1(i, 1) = 1; i++; Eigen::MatrixXd eMatrix2 =eMatrix1; cpd::AffineResult affineResult = cpd::affine(eMatrix2,eMatrix1); '''

I try to remove the "-march=native" form the cmakelists int orb slam3, the test code works , but the code in orb slam3 had other errors. So I want to fix this in other ways. It may cause by eigen.

qing130 commented 1 year ago

It has been solved This is the way: https://stackoverflow.com/questions/22825794/double-free-or-corruption-run-time-error-while-running-pclmovingleastsquares-c