trying example hangs system [closed]
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
Could you run through debugger and see how far do you go?
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.
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
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.
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.
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.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