Crashing in onImageResults



I have been trying to fix this issue but to no avail. I am using 32-bit debug version of Affdex SDK and it always crashes in

void CPlottingImageListener::onImageResults(std::map<affdex::FaceId, affdex::Face> faces,
										affdex::Frame image) {}

. Here’s the call stack information when it crashes:

ucrtbased.dll!free_dbg_nolock(void * const block, const int block_use) Line 908 C++
ucrtbased.dll!_free_dbg(void * block, int block_use) Line 1030 C++
activity_tracker_module.dll!operator delete(void * block) Line 17 C++
activity_tracker_module.dll!std::_Deallocate(void * _Ptr, unsigned int _Count, unsigned int _Sz) Line 132 C++
activity_tracker_module.dll!std::allocatoraffdex::FeaturePoint::deallocate(affdex::FeaturePoint * _Ptr, unsigned int _Count) Line 720 C++
activity_tracker_module.dll!std::_Wrap_alloc<std::allocatoraffdex::FeaturePoint >::deallocate(affdex::FeaturePoint * _Ptr, unsigned int _Count) Line 988 C++
activity_tracker_module.dll!std::vector<affdex::FeaturePoint,std::allocatoraffdex::FeaturePoint >::_Tidy() Line 1643 C++
activity_tracker_module.dll!std::vector<affdex::FeaturePoint,std::allocatoraffdex::FeaturePoint >::~vector<affdex::FeaturePoint,std::allocatoraffdex::FeaturePoint >() Line 977 C++
activity_tracker_module.dll!affdex::Face::~Face() C++
activity_tracker_module.dll!std::pair<int const ,affdex::Face>::~pair<int const ,affdex::Face>() C++
activity_tracker_module.dll!std::pair<int const ,affdex::Face>::`scalar deleting destructor’(unsigned int) C++
activity_tracker_module.dll!std::allocator<std::_Tree_node<std::pair<int const ,affdex::Face>,void *> >::destroy<std::pair<int const ,affdex::Face> >(std::pair<int const ,affdex::Face> * _Ptr) Line 745 C++
activity_tracker_module.dll!std::allocator_traits<std::allocator<std::_Tree_node<std::pair<int const ,affdex::Face>,void *> > >::destroy<std::pair<int const ,affdex::Face> >(std::allocator<std::_Tree_node<std::pair<int const ,affdex::Face>,void *> > & _Al, std::pair<int const ,affdex::Face> * _Ptr) Line 865 C++
activity_tracker_module.dll!std::_Wrap_alloc<std::allocator<std::_Tree_node<std::pair<int const ,affdex::Face>,void *> > >::destroy<std::pair<int const ,affdex::Face> >(std::pair<int const ,affdex::Face> * _Ptr) Line 1003 C++
activity_tracker_module.dll!std::_Tree<std::_Tmap_traits<int,affdex::Face,std::less,std::allocator<std::pair<int const ,affdex::Face> >,0> >::_Erase(std::_Tree_node<std::pair<int const ,affdex::Face>,void *> * _Rootnode) Line 2041 C++
activity_tracker_module.dll!std::_Tree<std::_Tmap_traits<int,affdex::Face,std::less,std::allocator<std::pair<int const ,affdex::Face> >,0> >::clear() Line 1473 C++
activity_tracker_module.dll!std::_Tree<std::_Tmap_traits<int,affdex::Face,std::less,std::allocator<std::pair<int const ,affdex::Face> >,0> >::erase(std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<int const ,affdex::Face> > > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<int const ,affdex::Face> > > > _Last) Line 1448 C++
activity_tracker_module.dll!std::_Tree<std::_Tmap_traits<int,affdex::Face,std::less,std::allocator<std::pair<int const ,affdex::Face> >,0> >::_Tidy() Line 2168 C++
activity_tracker_module.dll!std::_Tree<std::_Tmap_traits<int,affdex::Face,std::less,std::allocator<std::pair<int const ,affdex::Face> >,0> >::~_Tree<std::_Tmap_traits<int,affdex::Face,std::less,std::allocator<std::pair<int const ,affdex::Face> >,0> >() Line 1092 C++
activity_tracker_module.dll!std::map<int,affdex::Face,std::less,std::allocator<std::pair<int const ,affdex::Face> > >::~map<int,affdex::Face,std::less,std::allocator<std::pair<int const ,affdex::Face> > >() C++
activity_tracker_module.dll!CPlottingImageListener::onImageResults(std::map<int,affdex::Face,std::less,std::allocator<std::pair<int const ,affdex::Face> > > faces, affdex::Frame image) Line 38 C++

Looks like it’s crashing when trying to invoke map face’s destructor. My app’s run-time library is set to Multi-threaded Debug DLL (/MDd). Do you guys have any idea on how to fix this issue?

Compatible versions of Visual C++?

I switched to Visual C++ 2013 and this issue has been solved. I was guessing runtime library was causing this issue and I was right. Looks like you guys really need to make it compatible with VC++ 2015.



I think I answered your question in your previous post.


Thanks for replying. You guys should mention about this compatibility issue in the SDK or some where else because I don’t see this information any where. Though it will compile and run with VC++ 2015 but will face issues like the one I mentioned above.


I think we have mentioned the support for the specific version in the documentation ( I also replied to the similar question in your other post (Compatible versions of Visual C++?). I would just post once and continue the conversation in one of the questions to avoid back and forth.