Search code examples
affdex-sdk

Photo/VideoDetector start method crashes on Ubuntu platform


I am seeing below crash while running detector->start() method in C++ examples. I am using affdex3-0 version on Ubuntu 14.10 platform. Can you help with figuring out the issue?

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff73f6b4d in cv::minMaxLoc(cv::_InputArray const&, double*, double*, cv::Point_<int>*, cv::Point_<int>*, cv::_InputArray const&) ()
   from /home/Research/emotion/affdex-sdk/lib/libaffdex-native.so
(gdb) bt
#0  0x00007ffff73f6b4d in cv::minMaxLoc(cv::_InputArray const&, double*, double*, cv::Point_<int>*, cv::Point_<int>*, cv::_InputArray const&) ()
   from /home/Research/emotion/affdex-sdk/lib/libaffdex-native.so
#1  0x00007ffff70e6c24 in SimpleInvMeanGuess::SetProperties(cv::Mat_<float>, cv::Mat_<float>) ()
   from /home/Research/emotion/affdex-sdk/lib/libaffdex-native.so
#2  0x00007ffff70e8496 in SimpleInvMeanGuess::LoadModel(portable_binary_iarchive&) ()
   from /home/Research/emotion/affdex-sdk/lib/libaffdex-native.so
#3  0x00007ffff71fc244 in Mapper::Load(boost::filesystem::path const&) () from /home/Research/emotion/affdex-sdk/lib/libaffdex-native.so
#4  0x00007ffff70d0ecd in LoadMapper(MapperConfig const&) () from /home/Research/emotion/affdex-sdk/lib/libaffdex-native.so
#5  0x00007ffff70d10df in LoadMultipleMappersFromConfig(std::vector<MapperConfig, std::allocator<MapperConfig> > const&) ()
   from /home/Research/emotion/affdex-sdk/lib/libaffdex-native.so
#6  0x00007ffff70d11e1 in LoadMultipleMappers(boost::filesystem::path const&) ()
   from /home/Research/emotion/affdex-sdk/lib/libaffdex-native.so
#7  0x00007ffff70d1238 in LoadMultipleRTMappers(boost::filesystem::path const&) ()
   from /home/Research/emotion/affdex-sdk/lib/libaffdex-native.so
#8  0x00007ffff7121ca1 in DynamicTracker::DynamicTracker(boost::property_tree::basic_ptree<std::string, std::string, std::less<std::string> > const&) () from /home/Research/emotion/affdex-sdk/lib/libaffdex-native.so
#9  0x00007ffff70d3af2 in boost::shared_ptr<Mapper> CreateMapperInstance<DynamicTracker>(boost::property_tree::basic_ptree<std::string, std::string, std::less<std::string> > const&) () from /home/Research/emotion/affdex-sdk/lib/libaffdex-native.so
#10 0x00007ffff70d0964 in CreatePtrMapper(std::string const&, boost::property_tree::basic_ptree<std::string, std::string, std::less<std::string> > const&, boost::property_tree::basic_ptree<std::string, std::string, std::less<std::string> > const&) ()
   from /home/Research/emotion/affdex-sdk/lib/libaffdex-native.so
#11 0x00007ffff70d0c35 in CreatePtrMapper(MapperConfig const&) () from /home/Research/emotion/affdex-sdk/lib/libaffdex-native.so
#12 0x00007ffff70d0d5c in LoadMapper(MapperConfig const&) () from /home/emotion/affdex-sdk/lib/libaffdex-native.so
#13 0x00007ffff70db2c2 in MapperFactory::Activate(std::set<std::string, std::less<std::string>, std::allocator<std::string> > const&) ()
   from /home/Research/emotion/affdex-sdk/lib/libaffdex-native.so
#14 0x00007ffff70c9d22 in AffdexMultiFace::UpdateActiveSet() () from /home/emotion/affdex-sdk/lib/libaffdex-native.so
#15 0x00007ffff70ca28d in AffdexMultiFace::Activate(std::string const&) () from /home//emotion/affdex-sdk/lib/libaffdex-native.so
#16 0x00007ffff70cadad in AffdexMultiFace::Initialize(IntegrationLayerParams const&) ()
   from /home/Research/emotion/affdex-sdk/lib/libaffdex-native.so
#17 0x00007ffff70b1df4 in affdex::MultiFaceDetectorBase::initWithParams(affdex::Config) ()
   from /homeResearch/emotion/affdex-sdk/lib/libaffdex-native.so
#18 0x00007ffff70637d6 in affdex::DetectorBase::init(affdex::Config const&) ()
   from /home/emotion/affdex-sdk/lib/libaffdex-native.so
#19 0x00007ffff706356b in affdex::DetectorBase::start() () from /home/Research/emotion/affdex-sdk/lib/libaffdex-native.so
#20 0x00007ffff705bc5d in affdex::Detector::start() () from /home/emotion/affdex-sdk/lib/libaffdex-native.so
#21 0x00007ffff709dfa4 in affdex::PhotoDetector::start() () from /home/emotion/affdex-sdk/lib/libaffdex-native.so
#22 0x0000000000438396 in main ()

Solution

  • Affdex supports gcc 4.8, opencv 2.4 and boost 1.59. Do you have the correct dependencies setup? I would recommend following the installation instruction on the README for the cpp-sdk-samples.We just released affdex-3.1you can find the Release Notes here.

    Here are the links for the installation guides: