Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. 在运行程序的时候出现 exited with code -1073741819 的错误
Forum Updated to NodeBB v4.3 + New Features

在运行程序的时候出现 exited with code -1073741819 的错误

Scheduled Pinned Locked Moved Chinese
5 Posts 3 Posters 8.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    WillTruman
    wrote on last edited by
    #1

    本人是小白,请给位大神赐教~~
    我是用Qt 5.2.1+Qt creator 3.0.1,还有用cmake把opencv添加到Qt中
    然后写了一个现实图片的程序;
    进行构建的时候没有问题,但是在运行的时候就出现了exited with code -1073741819 的错误
    调试也被异常中断了。

    已经排除了opencv方面的问题了,问题应该出现在Qt上面.
    下面是程序:

    #include <opencv2/core/core.hpp>
    #include <opencv2/highgui/highgui.hpp>

    int main()
    {
    //read an image
    cv::Mat image=cv::imread("d:/1.jpg");
    //creat image window named "My Image"
    cv::namedWindow("My Image");
    cv::imshow("My Image",image);
    //wait key for 5000ms
    cv::waitKey(5000);
    return 1;
    }

    应用程序输出:
    Starting D:\QTpro\build-qt5showimage-未命名_MinGW_x86_32bit_in_D_Qt5_Qt5_2_1_Tools_mingw48_32_bin-Debug\debug\qt5showimage.exe...
    D:\QTpro\build-qt5showimage-未命名_MinGW_x86_32bit_in_D_Qt5_Qt5_2_1_Tools_mingw48_32_bin-Debug\debug\qt5showimage.exe exited with code -1073741819

    希望各位大神帮帮忙谢谢~

    1 Reply Last reply
    0
    • B Offline
      B Offline
      brcontainer
      wrote on last edited by
      #2

      使用“的iostream”,“cv”和“std”

      尝试:

      @#include <opencv2/core/core.hpp>
      #include <opencv2/highgui/highgui.hpp>
      #include <iostream>

      using namespace cv;
      using namespace std;

      int main( int argc, char** argv )
      {
      if( argc != 2)
      {
      cout <<" Usage: display_image ImageToLoadAndDisplay" << endl;
      return -1;
      }

      Mat image;
      image = imread(“d:/1.jpg”, CV_LOAD_IMAGE_COLOR);   // Read the file
      
      if(! image.data )
      {
          cout <<  "Could not open or find the image" << std::endl ;
          return -1;
      }
      
      namedWindow( "My Image", WINDOW_AUTOSIZE );
      imshow( "Display window", image ); 
      waitKey(5000);
      return 0;
      

      }@

      QT project: https://github.com/brcontainer/qt-helper

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jiangcaiyang
        wrote on last edited by
        #3

        退出代码是:FFFFFFFFC0000005
        应该是写入了不该写入的数值。

        建议创建一个空的控制台程序再试。

        1 Reply Last reply
        0
        • W Offline
          W Offline
          WillTruman
          wrote on last edited by
          #4

          谢谢~~

          1 Reply Last reply
          0
          • W Offline
            W Offline
            WillTruman
            wrote on last edited by
            #5

            在读入数据那行代码imread在构建的时候出了很多问题啊但是还是谢谢你
            [quote author="Guilherme Nascimento" date="1392989564"]使用“的iostream”,“cv”和“std”

            尝试:

            @#include <opencv2/core/core.hpp>
            #include <opencv2/highgui/highgui.hpp>
            #include <iostream>

            using namespace cv;
            using namespace std;

            int main( int argc, char** argv )
            {
            if( argc != 2)
            {
            cout <<" Usage: display_image ImageToLoadAndDisplay" << endl;
            return -1;
            }

            Mat image;
            image = imread(“d:/1.jpg”, CV_LOAD_IMAGE_COLOR);   // Read the file
            
            if(! image.data )
            {
                cout <<  "Could not open or find the image" << std::endl ;
                return -1;
            }
            
            namedWindow( "My Image", WINDOW_AUTOSIZE );
            imshow( "Display window", image ); 
            waitKey(5000);
            return 0;
            

            }@[/quote]

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved