FaceSubstitution icon indicating copy to clipboard operation
FaceSubstitution copied to clipboard

SIGABRT when changing face image

Open ketz opened this issue 12 years ago • 8 comments

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 avatar Aug 07 '12 11:08 ketz

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"

ketz avatar Aug 07 '12 15:08 ketz

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?

kylemcdonald avatar Aug 11 '12 23:08 kylemcdonald

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?

ketz avatar Aug 12 '12 19:08 ketz

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.

kylemcdonald avatar Aug 12 '12 20:08 kylemcdonald

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

wongjustin99 avatar Nov 12 '12 03:11 wongjustin99

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

kylemcdonald avatar Dec 10 '12 23:12 kylemcdonald

@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.

wongjustin99 avatar Dec 12 '12 08:12 wongjustin99

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

pittyduncan avatar May 12 '15 23:05 pittyduncan