Results 1 to 5 of 5

Thread: Runtime error while executing a project

  1. #1
    Join Date
    May 2011
    Location
    Indonesia, Surabaya
    Posts
    24
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Runtime error while executing a project

    Hello everybody.. .

    i've got a problem when compiling my project

    Here is my error message.

    C:\Qt\2010.05\qt\mamayoquiero-build-desktop\release\mamayoquiero.exe exited with code -1073741515

    Here is my code,

    Qt Code:
    1. #include "opencv/cv.h"
    2. #include "opencv/highgui.h"
    3. #include "opencv2/opencv.hpp"
    4.  
    5.  
    6. int main(int argc, char **argv)
    7. {
    8. CvCapture *capture;
    9. IplImage *frame;
    10.  
    11. double t,ms = 0;
    12. int key;
    13.  
    14. /* MURUPKAN KAMERANYA */
    15. capture = cvCaptureFromCAM(0);
    16. cvNamedWindow("video",1);
    17.  
    18. while (key != 'q')
    19. {
    20. t = (double)cvGetTickCount();
    21.  
    22.  
    23. /* TAMPILKAN VIDEONYA */
    24. frame = cvQueryFrame(capture);
    25. cvShowImage("video",frame);
    26. key = cvWaitKey(1);
    27.  
    28. /* DAPATKAN ELAPSED TIME */
    29. t = (double)cvGetTickCount() -t;
    30. ms += t / ((double)cvGetTickFrequency() * 1000.0);
    31.  
    32. /* OTOMATIS MENYIMPAN 3 DETIK SEKALI */
    33. if (ceil(ms) >= 3000)
    34. {
    35. cvSaveImage("img.jpg",frame);
    36. ms = 0;
    37. }
    38. }
    39.  
    40. /* BEBASKAN MEMORI */
    41. cvReleaseCapture(&capture);
    42. cvDestroyWindow("video");
    43.  
    44. return 0;
    45. }
    To copy to clipboard, switch view to plain text mode 

    In your opinion, why this is happening ? is it because i don't use any Qt Classes ?
    thank you.


    Added after 58 minutes:


    hey i have solved the error by including stdio.h

    but then, when i compile this project, another warning occured.

    'key' is used uninitialized in this function.

    what does this warning mean ? and how can i solve it ?


    Added after 13 minutes:


    ahh.. i can solve the previous warning by un-including the opencv.hpp

    but still i can't compile it, this error message occured :

    C:\Qt\2010.05\qt\mamayoquiero-build-desktop\release\mamayoquiero.exe exited with code -1073741515

    i have googled about this error message, but still i can't find the explanation.

    Any advice ?
    Last edited by bajoelkid12; 9th June 2011 at 07:36.

  2. #2
    Join Date
    Aug 2008
    Posts
    45
    Thanks
    1
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Runtime error while executing a project

    Maybe the opencv code calls exit() prematurely. Try adding a breakpoint to the exit()-function and see if someone is calling it.
    Could be also some unhandled exception that has been thrown.

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Runtime error while executing a project

    In your opinion, why this is happening ?
    In my opinion, the error number is meaningful.

    Search this forum for "-1073741515" and you will find it a few times, usually with the same solution. Also, -1073741515 = 0xC0000135: If you Google that you will find that it means that the program failed to initialise, i.e. it isn't even loading. Make sure everything it needs in the way of dynamically loaded libraries are available (probably missing OpenCV). If you don't know what is missing try using Depends.exe.
    but still i can't compile it, this error message occured :
    C:\Qt\2010.05\qt\mamayoquiero-build-desktop\release\mamayoquiero.exe exited with code -1073741515
    You have compiled it. The error message is a run time error, not a compile or link error.
    'key' is used uninitialized in this function.
    what does this warning mean ? and how can i solve it ?
    It means exactly what it says. As far as the compiler can tell the first time you use the variable "key" is before you ever assign it a value. You fix it by making sure all variables are given an initial value before you try to use them in other ways.

    is it because i don't use any Qt Classes ?
    No, that is the reason this question doesn't belong in a Qt forum.

  4. The following user says thank you to ChrisW67 for this useful post:

    bajoelkid12 (10th June 2011)

  5. #4
    Join Date
    May 2011
    Location
    Indonesia, Surabaya
    Posts
    24
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Runtime error while executing a project

    thanks a lot for your answer chris.. but i still don't know what is missing ??? how can i use depends.exe ?

  6. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Runtime error while executing a project

    Google for it. Download it. Run it. Open your executable with it. Look at the list of dependencies it cannot find.

  7. The following user says thank you to ChrisW67 for this useful post:

    bajoelkid12 (10th June 2011)

Similar Threads

  1. Replies: 1
    Last Post: 25th September 2010, 08:20
  2. Error while executing the exe release file
    By harmodrew in forum Newbie
    Replies: 7
    Last Post: 21st September 2010, 10:21
  3. Replies: 2
    Last Post: 11th August 2010, 10:13
  4. Error while executing a application - Gtk WARNING
    By augusbas in forum Qt Programming
    Replies: 1
    Last Post: 12th June 2010, 12:25
  5. Error executing SELECT query with QSQLITE
    By garfield85 in forum Qt Programming
    Replies: 6
    Last Post: 25th May 2009, 18:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.