Though this bug has been declared invalid, I experience something
similar with a much simpler example, shown under the double line of "="
symbols.

When main.cpp is compiled manually using g++ main.cpp -o VideoShow 
-I/usr/include/opencv -lcv -lcvaux -lcxcore -lhighgui
all works fine...

However, when exactly the same code is compiled using src.pro to
generate the Makefile using qmake, the program crashes creating the
following backtrace (attached backtrace.gif, also available at
http://telin.ugent.be/~frooms/backtrace.gif)

Anyone an idea? Any suggestions or help is greatly appreciated.

Kind regards,

Filip Rooms

//======================  main.cpp
=============================================================

#include <cv.h>
#include <cvaux.h>
#include <cxcore.h>
#include <highgui.h>

int main( )
{
   CvCapture* mpCapture = cvCaptureFromFile( 
"/v/frooms/projects/dataTrinean/testHD2half.avi" );
  
   // Create a window in which the captured images will be presented
   cvNamedWindow( "mywindow", CV_WINDOW_AUTOSIZE );

   // Show the image captured from the camera in the window and repeat
   while( 1 )
   {
      // Get one frame and show it
      cvShowImage( "mywindow", cvQueryFrame( mpCapture ) );
      // Do not release the frame!

      //If ESC key pressed, 
      if( (cvWaitKey(10) & 255) == 27 ) break;
   }

   // Release the capture device housekeeping
   cvReleaseCapture( &mpCapture );
   cvDestroyWindow( "mywindow" );
   
   cvNamedWindow( "mywindow", CV_WINDOW_AUTOSIZE );
   return 0;
}

//============================= src.pro
======================================================

SOURCES += main.cpp
TEMPLATE = app
CONFIG += warn_on \
          thread \
          qt
TARGET = videoshow

QT -= gui
INCLUDEPATH += /usr/include/opencv/

LIBS += -lhighgui \
  -lcxcore \
  -lcvaux \
  -lcv


** Attachment added: "backtrace.gif"
   http://launchpadlibrarian.net/40418610/backtrace.gif

-- 
OpenCV's cvNamedWindow("..") crashes when called within a QT application
https://bugs.launchpad.net/bugs/159650
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to