Runtime error on execution start (Bug #3015)


Added by Foaly Foaly almost 12 years ago. Updated over 9 years ago.


Status:Open Start date:2013-05-08
Priority:Low Due date:
Assignee:Foaly Foaly % Done:

0%

Category:build/install
Target version:-
Affected version:2.4.5 (latest release) Operating System:
Difficulty: HW Platform:
Pull request:

Description

I am working on a windows 8 machine with Code::Blocks and MinGW gcc 4.7.2
I have downloaded the latest prebuilt binaries (2.4.5) and installed it correctly. My include path looks like this:
F:\Libraries\opencv\build\include
and my linker path like this
F:\Libraries\opencv\build\x86\mingw\lib
F:\Libraries\opencv\build\x86\mingw\bin

I link against:
opencv_core245
opencv_imgproc245
opencv_highgui245

It compiles and links fine, but as soon as I start the appliction it crashes with the error: The application failed to initialize properly (0xc0000142). Click on OK to terminate the application.
When I run it with the debugger I get a SIGSEGV on start up. The call stack looks like this: http://pastebin.com/MdnYF86E
The code I am using is very simple and looks like this:

#include <stdio.h>
#include <opencv2/opencv.hpp>

int main( int argc, char** argv )
{
    cv::Mat image;
    image = cv::imread( "example.jpg", 1 );

    if(!image.data )
    {
        printf( "No image data \n" );
        return -1;
    }

    cv::namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
    cv::imshow( "Display Image", image );

    cv::waitKey(0);

    return 0;
}

At first I thought it was a problem with my machine setup, but the exact same problem happened with another machine of mine (windows xp laptop). All the details (pretty much the same, slightly different call stack) are here: http://answers.opencv.org/question/8479/runtime-error-0xc0000005-on-windows-with-244-and/


History

Updated by Anna Kogan almost 12 years ago

Hello,
Seems that the error is caused by mismatch between tagret build platforms: x86 and x64. Here you can find a guy who faced this problem either and found a solution. If this way to install doesn't work either, please report!

  • Category set to build/install
  • Priority changed from Normal to Low
  • Assignee set to Foaly Foaly

Updated by Foaly Foaly almost 12 years ago

Thank you! This looks pretty much like my problem, but I am working with MinGW and Code::Blocks. Do you know how to solve the problem for that? I would be super thankful. This is driving me crazy!

Updated by Foaly Foaly almost 12 years ago

Sorry I forgot to add: I searched on google, but I couldn't find anything for code::blocks...

Updated by Maksim Shabunin over 9 years ago

Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4567

Also available in: Atom PDF