ofxCv icon indicating copy to clipboard operation
ofxCv copied to clipboard

contourFinder crash with setSortBySize

Open davidlemarechal opened this issue 6 years ago • 1 comments

Hello,

On Windows 10, OF 0.10, ofxCv master branch, VS 2017, I can build and run the example contour-tracking without problem. But adding: contourFinder.setSortBySize(true) in the setup will make the app run for a few seconds and crash with this message :

Debug Assertion Failed
Program : C:\WINDOWS\SYSTEM32\MSVCP140D.dll
File : c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.14.26428\include\vector
Line : 1818

Expression : vector subscript out of range

And Visual Studio 2017 points to ofxCv::CompareContourArea in line 18 and says: Unhandled exception at 0x03CFED76 (ucrtbased.dll) in exampleContourTracking_debug.exe: An invalid parameter was passed to a function that considers invalid parameters fatal.

However, this doesn't happen when I build and run in Release mode.

Any ideas ?

davidlemarechal avatar Jun 25 '18 15:06 davidlemarechal

I am seeing a similar crash in CompareContourArea on android

ofZach avatar Sep 27 '18 21:09 ofZach