trying example hangs system

asked 2014-07-06 21:51:09 -0500

Goddard gravatar image

updated 2014-07-06 21:52:00 -0500

I'm trying to use the example located here https://github.com/Itseez/opencv/blob/master/samples/cpp/tutorial_code/objectDetection/objectDetection2.cpp

Every time I try and run the program after it compiles successfully my system hangs.

I compiled OpenCV from source via a github clone from Itseez.

What am I doing wrong here?

I am running Ubuntu 14.04.

Thanks

edit retag flag offensive close merge delete

Comments

Could you run through debugger and see how far do you go?

unxnut gravatar imageunxnut ( 2014-07-06 22:04:41 -0500 )edit
1

Or may be you should try the stable version (2.4.9) before the unstable one (3.0.0) from github. In my experience, the development version of OpenCV often contains bugs that are hard to find and debug, especially after some removing sub-libraries, namespaces or legacy data structures.

tuannhtn gravatar imagetuannhtn ( 2014-07-07 04:03:51 -0500 )edit

I tried attaching ptrace and it doesn't show anything useful before locking up.

I also uninstall the latest github from the master branch and installed 2.4.9-prep and it also has the same issue. The program runs for a little while, but when I enter the frame it locked up. Not sure if this is because I entered the frame or it just locked up for what ever reason.

Please help. thanks

Goddard gravatar imageGoddard ( 2014-07-07 16:08:25 -0500 )edit

ptrace is not a good tool for this. I was thinking more like gdb or one of its variants. You will also need to see what OpenCV calls are successfully executed.

unxnut gravatar imageunxnut ( 2014-07-07 17:27:26 -0500 )edit

The debugger never fails, or shows any errors. It just locks up. No rhyme or reason that I can see. I painstakingly walked through the program 1 step at a time and no errors.

single stepping through gdb http://pastebin.com/xEpyiniC

What happens when i try and quit the program http://pastebin.com/9gVxhdPh

I'm pretty sure this happens once some one walks into the frame, but not 100% sure of that.

Goddard gravatar imageGoddard ( 2014-07-07 21:10:21 -0500 )edit

It looks like a hang on sem_wait. Must be an issue in the unstable version. You may want to get back to stable version 2.4.9.

unxnut gravatar imageunxnut ( 2014-07-07 21:51:29 -0500 )edit
1

I got it working. I followed the instructions here http://miloq.blogspot.com/2012/12/install-opencv-ubuntu-linux.html

I install a few extra packages I guess I was missing which is odd because compilation completed perfectly on the git repo. Not sure if it was the fact I did that, or the fact I didn't use ccmake or the fact I used the zip file provided for linux/mac.

Either way everything is wroking fine.

thanks

Goddard gravatar imageGoddard ( 2014-07-08 21:00:49 -0500 )edit