Results 1 to 8 of 8

Thread: exe exited with code -1073741819

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

    Default exe exited with code -1073741819

    Hi,

    I'm having a problem when i tried to execute my program.. I have met the same problem before and i can solve it. My problem before is some kind of missing .dll.. But now, i don't know what kind of problem is this.. I know this is an access violation, but i just don't know where.. Could you please help me ?
    Here is my code and the debugger result..

    Qt Code:
    1. #include "opencv/cv.h"
    2. #include "opencv/highgui.h"
    3. #include "opencv2/opencv.hpp"
    4. #include "stdio.h"
    5. #include <opencv/cvaux.h>
    6. #include <opencv/cxcore.h>
    7.  
    8. int main(int argc, char **argv)
    9. {
    10. CvCapture capture1;
    11. IplImage *frame;
    12.  
    13. double t,ms = 0;
    14. int key = 0;
    15.  
    16. capture1 = cvCaptureFromFile("chi-tabaywatch.avi");
    17. cvNamedWindow("JCXSUPERTAMARK5",1);
    18.  
    19. while (key != 'q')
    20. {
    21. t = (double)cvGetTickCount();
    22.  
    23. frame = cvQueryFrame(capture1);
    24. cvShowImage("JCXSUPERTAMARK5",frame);
    25. key = cvWaitKey(1);
    26.  
    27. t = (double)cvGetTickCount() -t;
    28. ms += t / ((double)cvGetTickFrequency() * 1000.0);
    29.  
    30. if (ceil(ms) >= 1000)
    31. {
    32. cvSaveImage("img.jpg",frame);
    33. ms = 0;
    34. }
    35. }
    36.  
    37. cvReleaseCapture(capture1);
    38. cvDestroyWindow("JCXSUPERTAMARK5");
    39.  
    40. return 0;
    41. }
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. Dump of assembler code from 0x9cfffe to 0x9d0076:
    2. 0x009cfffe: add %al,(%eax)
    3. 0x009d0000: add %al,0x0(%eax)
    4. 0x009d0003: add %al,(%ecx)
    5. 0x009d0005: add %al,(%eax)
    6. 0x009d0007: add %ah,%dl
    7. 0x009d0009: add %eax,(%eax)
    8. 0x009d000b: add %cl,(%edi)
    9. 0x009d000d: add %eax,(%eax)
    10. 0x009d000f: add %ah,0x5a(%esi)
    11. 0x009d0012: pop %es //here is where the arrow pointing at//
    12. 0x009d0013: add %dl,0x22(%ebp)
    13. 0x009d0016: add $0x0,%al
    14. 0x009d0018: push %esi
    15. 0x009d0019: add $0x3000000,%eax
    16. 0x009d001e: add %al,(%eax)
    17. 0x009d0020: and %al,(%eax)
    18. 0x009d0022: add %al,(%eax)
    19. 0x009d0024: add %eax,(%eax)
    20. 0x009d0026: add %al,(%eax)
    21. 0x009d0028: (bad)
    22. 0x009d0029: (bad)
    23. 0x009d002a: (bad)
    24. 0x009d002b: incl (%eax)
    25. 0x009d002d: add %al,(%eax)
    26. 0x009d002f: add %bh,%bh
    27. 0x009d0031: (bad)
    28. 0x009d0032: (bad)
    29. 0x009d0033: lcall *0x2400007e(%ecx)
    30. 0x009d0039: add %al,(%eax)
    31. 0x009d003b: add %ah,(%eax,%eax,1)
    32. 0x009d003e: add %al,(%eax)
    33. 0x009d0040: xor (%eax),%eax
    34. 0x009d0042: add %al,(%eax)
    35. 0x009d0044: pusha
    36. 0x009d0045: add %al,(%eax)
    37. 0x009d0047: add %ah,0x0(%eax)
    38. 0x009d004a: add %al,(%eax)
    39. 0x009d004c: add %al,(%eax)
    40. 0x009d004e: add %al,(%eax)
    41. 0x009d0050: sbb %al,(%eax)
    42. 0x009d0052: add %al,(%eax)
    43. 0x009d0054: add %al,(%eax)
    44. 0x009d0056: add %al,(%eax)
    45. 0x009d0058: add %al,(%eax)
    46. 0x009d005a: add %al,(%eax)
    47. 0x009d005c: add %al,(%eax)
    48. 0x009d005e: add %al,(%eax)
    49. 0x009d0060: add %al,(%eax)
    50. 0x009d0062: add %al,(%eax)
    51. 0x009d0064: pop %es
    52. 0x009d0065: js 0x9d0067
    53. 0x009d0067: add %bh,(%eax,%eax,1)
    54. 0x009d006a: add %al,(%eax)
    55. 0x009d006c: push %esi
    56. 0x009d006d: add $0x3000000,%eax
    57. 0x009d0072: add %al,(%eax)
    58. 0x009d0074: add %eax,(%eax)
    59. End of assembler dump.
    To copy to clipboard, switch view to plain text mode 

  2. #2
    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: exe exited with code -1073741819

    Do you have a question related to Qt, because this isn't?

    The assembler output you have above is not useful. Do yourself a favour:
    • build a debug version of the program, run it in your debugger and look at the backtrace when it crashes; and
    • read the error messages that OpenCV outputs to the console from the program.

    More than likely the file you are opening does not exist or cannot be interpreted and the attempt to get a frame returns a null pointer that you blindly use.

    BTW: The code you posted does not compile. cvCaptureFromFile() returns CvCapture* not a CvCapture structure and cvReleaseCapture() takes a **CvCapture argument. After fixing and running it I find very informative error messages from OpenCV.

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

    bajoelkid12 (2nd November 2011)

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

    Default Re: exe exited with code -1073741819

    thanks a lot for the explanation.. i'm writing this code in Qt Creator..

    BTW: The code you posted does not compile. cvCaptureFromFile() returns CvCapture* not a CvCapture structure and cvReleaseCapture() takes a **CvCapture argument. After fixing and running it I find very informative error messages from OpenCV.
    Could you please tell me, how can i fix it ?

  5. #4
    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: exe exited with code -1073741819

    Could you please tell me, how can i fix it ?
    I thought I already had Surely you managed to compile it so you must have fixed it also!

    Qt Code:
    1. #include "opencv/cv.h"
    2. #include "opencv/highgui.h"
    3. #include "opencv2/opencv.hpp"
    4. #include "stdio.h"
    5. #include <opencv/cvaux.h>
    6. #include <opencv/cxcore.h>
    7.  
    8. int main(int argc, char **argv)
    9. {
    10. CvCapture *capture1; // <<<<<<<<<<<<<<<<<<<<<<<<<
    11. IplImage *frame;
    12.  
    13. ...
    14.  
    15. cvReleaseCapture(&capture1); // <<<<<<<<<<<<<<<<<<<<<<<<<
    16. cvDestroyWindow("JCXSUPERTAMARK5");
    17.  
    18. return 0;
    19. }
    To copy to clipboard, switch view to plain text mode 

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

    Default Re: exe exited with code -1073741819

    ofcourse.. i'm sorry for asking a ridiculous question..
    btw.. could you please take a look at this
    error log.jpg

    here is the screenshot, when i use the debugger to my program.. In my opinion, this is a problem about .dll.. am i correct ?

  7. #6
    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: exe exited with code -1073741819

    Your program (with corrections) works correctly here provided the avi file exists.

    Does yours ever get into the main() function? If not then you need to make sure the OpenCV DLLs are where the operating system can find them.

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

    Default Re: exe exited with code -1073741819

    i have placed the dlls at the windows system32 directory.. how can the OS cannot find them ? i have also adding them on the system path.. Geez, is this somekind of bug ?
    when i try to use different function (e.g. cvCameraCapture(0)), it works fine, without having the dlls be placed at the windows system32 directory.

  9. #8
    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: exe exited with code -1073741819

    Make sure that the file you are trying to open exists in the current working directory of the program (i.e. where it is going to look) or use a full path.
    Single step you program until it fails then analyse the line that that causes it. Thrashing about trying to guess is not going to get you anywhere.

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

    bajoelkid12 (2nd November 2011)

Similar Threads

  1. exe exited with code -1073741819
    By szisziszilvi in forum Newbie
    Replies: 10
    Last Post: 1st September 2011, 16:55
  2. exited with code -1073741819
    By Con Nít in forum Newbie
    Replies: 7
    Last Post: 27th January 2011, 22:04
  3. Replies: 3
    Last Post: 2nd November 2010, 22:36
  4. program crashing randomly code -1073741819
    By feraudyh in forum General Programming
    Replies: 6
    Last Post: 21st September 2010, 17:07
  5. exited with code -1073741819 error
    By arpspatel in forum Qt Programming
    Replies: 8
    Last Post: 2nd March 2010, 09:47

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.