visual c++ - Access Violation exception when calling mingw dll from msvc -
so having trouble adding c++ dll compiled in mingw msvc project. have fixed issue linking people seem have, when call function in dll have added "access violation reading location 0x00000014" error, breaks on operator new method in new.cpp (in visual studio 2010). have read there differences apart memory management, , wondering if might source of troubles.
the specfic dll i'm trying build , run cvblobs, available here - https://code.google.com/p/cvblob/, reason unknown me many times faster when compiled mingw.
i'm pretty new these things, wondering if might happing mingw dll calling msvc new() method? make sense? have looked on mingw site, while has been useful getting me point, doesn't seem address problem. please let me know if theres else me provide.
edit: have included specific problematic code, visual studio compiled code, in hope might lend bit of clarity.
//grey greyscale image, thresh image thresholded cvthreshold(grey,thresh,0,255,cv_thresh_otsu); iplimage* outputimg = cvcreateimage(cvgetsize(thresh), ipl_depth_label, 1); //blobs found blobs outputted cvb::cvblobs blobs; unsigned int result; //this problematic method, in mingw compiled dll, //other methods dll seem work. i'm tempted //the problem comes in cvlabel method, varible "cvblob blob" //first initalized. due stack trace including //under edit result = cvb::cvlabel(thresh, outputimg, blobs);
here stack trace mentioned higher
cvblobs.dll!6e313f95() [frames below may incorrect and/or missing, no symbols loaded cvblobs.dll] cvblobs.dll!6e30135b() msvcr100d.dll!operator new(unsigned int size) line 59c++ nuon.dll!std::_allocate<std::_tree_nod<std::_tmap_traits<unsigned int,cvb::cvblob *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,cvb::cvblob *> >,0> >::_node>(unsigned int _count, std::_tree_nod<std::_tmap_traits<unsigned int,cvb::cvblob *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,cvb::cvblob *> >,0> >::_node * __formal) line 36 + 0x15 bytes c++ nuon.dll!std::allocator<std::_tree_nod<std::_tmap_traits<unsigned int,cvb::cvblob *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,cvb::cvblob *> >,0> >::_node>::allocate(unsigned int _count) line 187 + 0xb bytes c++ nuon.dll!std::_tree_val<std::_tmap_traits<unsigned int,cvb::cvblob *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,cvb::cvblob *> >,0> >::_tree_val<std::_tmap_traits<unsigned int,cvb::cvblob *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,cvb::cvblob *> >,0> >(const std::less<unsigned int> & _parg, std::allocator<std::pair<unsigned int const ,cvb::cvblob *> > _al) line 550 + 0xc bytes c++ nuon.dll!std::_tree<std::_tmap_traits<unsigned int,cvb::cvblob *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,cvb::cvblob *> >,0> >::_tree<std::_tmap_traits<unsigned int,cvb::cvblob *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,cvb::cvblob *> >,0> >(const std::less<unsigned int> & _parg, const std::allocator<std::pair<unsigned int const ,cvb::cvblob *> > & _al) line 699 c++ nuon.dll!std::map<unsigned int,cvb::cvblob *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,cvb::cvblob *> > >::map<unsigned int,cvb::cvblob *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,cvb::cvblob *> > >() line 107 c++ nuon.dll!nuon::markerdetector::detect(cv::mat & input, std::vector<nuon::marker,std::allocator<nuon::marker> > & detectedmarkers, nuon::cameraparameters camparams, float markersizemeters, bool setyperperdicular) line 201 c++
i hope edit might clarify someone
Comments
Post a Comment