Hello All
I'm running into this problem with ceres regardless of how I use it.
It can be dynamically or statically linked, using glog or minilog, it happens anyway.
I'm using Visual studio
All projects are compiled as MT / MTd 64bit .
When a std::string object used by ceres gets out of scope and its destructor is called, it throws
Several examples:
When using ceres as DLL:
/* Next line throws at _ASSERTE(_pFirstBlock == pHead);
since the outputted string its allocated in ceres and freed in my code. Don't have a clue what's wrong with it, it's the same compiler : */
std::cout << summary.FullReport() << "\n";
(Removing this line actually runs fine)
When using ceres as LIB:
When ceres::Solver::Options object goes out of scope (after solve finished) and its dtor is called, a different heap-corruption error is thrown, at "_Orphan_all" function (std).
The odd thing is, that it doesn't happen at the first time its called, and that summary.FullReport() doesn't thorw when running ceres as lib but Solver::Options dtor does (options has "temp library" member which is a string)
Any ideas ?
Thanks in advance.