locked
Strange behavior with OpenCV RRS feed

  • Question

  •  Hi every one,

    When I compile my Windows application (called CrosslinesDetection) in Visual C++ 2005 including OpenCV 1.1, a computer vision library, I do not get any compile or link errors, but when I am running it, it gets to a point and freezes, and Windows says the following:

    "Unhandled exception at 0x7c915223 in CrosslinesDetection.exe:
    0xC0000005: Access violation writing location 0x00030ffc."

    The program is a common C++ Windows Applikation with two lines of OpenCV code:

    IplImage *img = cvCreateImage( cvSize( 1024, 768 ), IPL_DEPTH_8U, 1 );
    cvReleaseImage( &img );

    The strange behavior is now, if I
    - include the OpenCV lines, the program throws the exception
    - exclude the OpenCV lines, the program works properly.

    I used the OpenCV libraries in another project without any problems. In particular, I made a C# project for the GUI and a C++ project compiled as DLL in the background. If I create such a solution for the above lines, I have not problems during execution.

    Has anybody an idea, what might cause this error?


    Thanks for any help, Stefan

    Tuesday, January 27, 2009 11:04 AM

Answers

  • Try to create a smaller image and see what happens.
    • Marked as answer by Wesley Yao Monday, February 2, 2009 2:03 AM
    Thursday, January 29, 2009 2:09 PM

All replies

  • Shouldn't a question regarding OpenCV usage be asked on an OpenCV forum?
    Tuesday, January 27, 2009 5:10 PM
  • Thanks for the comment.

    Yes, I already consulted the OpenCV forum, but without success. On the other hand, I try to understand what caused the "unhandled exception" and how I can narrow down the problem. This is rather Visual C++ 2005 related and not to OpenCV. So, any advice on how to manage an "unhandled exception"?

     

    Wednesday, January 28, 2009 7:07 AM
  • Try to create a smaller image and see what happens.
    • Marked as answer by Wesley Yao Monday, February 2, 2009 2:03 AM
    Thursday, January 29, 2009 2:09 PM