[Solved] Simple application crash without errors
The application is this:
#include "opencv2/opencv.hpp"
using namespace cv;
int main(int, char**)
{
VideoCapture cap(0); // open the default camera
if(!cap.isOpened()) // check if we succeeded
return -1;
Mat edges;
namedWindow("edges",1);
for(;;)
{
Mat frame;
cap >> frame; // get a new frame from camera
cvtColor(frame, edges, COLOR_BGR2GRAY);
GaussianBlur(edges, edges, Size(7,7), 1.5, 1.5);
Canny(edges, edges, 0, 30, 3);
imshow("edges", edges);
if(waitKey(30) >= 0) break;
}
cap.release();
return 0;
}
This used to run with OpenCV3, but recently I upgraded and rebuilded (as static library because of other reasons, but the same was prior upgrading) and now when I run the executable it hang without any error. (the only difference is that now I have installed Qt5, but also reverting to Qt4 lead to the same result) If I run it with GDB i get this:
(gdb) run
Starting program: /root/programs/pc_camera/build/pc_camera
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[Inferior 1 (process 7290) exited with code 0377]
Which for me is not really helpful.
Does someone know at least how to get a hint on what is failing?