arturoc / FaceSubstitution

Face substitution experiments using ofxFacetracker
Other
437 stars 120 forks source link

SIGABRT when changing face image #10

Open ketz opened 11 years ago

ketz commented 11 years ago

Either when dragging images to the app, or when loading through the 'faces' folder, the app will take the image some times and crash with the following error some other times:

http://pastebin.com/GQDKcbjH

Whilst swapping between 2 images, it'll show the 1st one ok, the 2nd one ok, but when going back to the 1st one, it crashes. Usually it's on the 3rd image change.

Any idea why?

ketz commented 11 years ago

It seems to happen here:

inline void Mat::create(int _rows, int _cols, int _type) { _type &= TYPE_MASK; if( dims <= 2 && rows == _rows && cols == _cols && type() == _type && data ) return; int sz[] = {_rows, _cols}; create(2, sz, _type); }

the final line with the create function is the one causing the crash, it seems.

"OpenCV Error: Assertion failed (s >= 0) in setSize, file /Users/theo/Downloads/OpenCV-2.3.1/modules/core/src/matrix.cpp, line 113"

kylemcdonald commented 11 years ago

i just tried this and i can't reproduce the error. sorry! if you can provide a very reliable way to cause the error that works exactly the same each time, i can try again. otherwise, i'm not sure -- it could just be some weird issue with the size or image type of the images you're loading?

ketz commented 11 years ago

Thanks for checking Kyle.

I found out that it was happening due to me using different sized (dimensions) images. If all of them have them same size, whatever that may be, you can swap images as many times as you want.

Maybe that was a given and I just missed it?

kylemcdonald commented 11 years ago

i see, it's probably a bug with how i've wrapped the image loading, or somewhere i should be reallocating but i'm not. thanks for mentioning this, and i'll keep my eyes open -- but i can't say for certain what is "wrong" right now.

wongjustin99 commented 11 years ago

I'm trying to compile scrambleSuit and I get this same error upon every launch. Here's the OUTPUT of the compile.

http://pastebin.com/tFSpPij8

Anything I'm missing? Thanks

kylemcdonald commented 11 years ago

make sure you drop some faces in the bin/data/faces/ directory or the code will probably have trouble running without any input.

wongjustin99 commented 11 years ago

@kylemcdonald Hi there, thanks for getting back to me. This error was in fact, while there's some faces in that directory. Just tried it again to check.

Haven't had any success yet, but don't mind waiting to get a nice result.

Thanks.

pittyduncan commented 9 years ago

@kylemcdonald can you help me,am having the same problem with the OpenCV Error: Assertion failed (s >= 0) in setSize