Results 1 to 11 of 11

Thread: exe exited with code -1073741819

  1. #1
    Join Date
    Nov 2010
    Location
    Budapest, Hungary
    Posts
    125
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default exe exited with code -1073741819

    Hi,

    I have a problem that looks pretty strange to me.

    I'm making an application that uses gui. I have a QStackedWidget somewhere where I am going to use some other widgets, so I made my custom widget that is defaultWidget. This was made very simply by adding a Qt c++ form class using the QtCreator so nothing should be wrong with it.

    The only thing I've done is that I put a QLabel on the ui (using the built-in Designer) and I included the header into the mainwindow.h

    and it crashes like this. I don't even have an instance of that defaultWidget. I just added the
    #include "metawidgets/defaultwidget.h"
    line into the mainwindow.h

    and it crashes with the named code. Why? What did I do wrong? I already have other classes added with the very same method and they don't crash. What is happening? I'm really confused, I have no idea how to search for the bug.

    I attached a small code where I tried to remake the problem. This one works fine however this one looks the VERY same as the big one (except for the miss of all the other work from the previus week...). but really. only this simple thing causes the error that I add the 3 new files to the project and add the header to the mainwindow.h. If I comment out this line and remove the 3 files from the project everything works fine but it is impossible to move on with working.
    Attached Files Attached Files
    Last edited by szisziszilvi; 30th August 2011 at 16:47.
    Szilvi

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: exe exited with code -1073741819

    run the application in a debugger, and post here the code that includes the line on which it crashed.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

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

    This particular error has been addressed quite a few times in these forums.
    -1073741819 = 0xC0000005 = Access violation.

    You are looking for things like using uninitialized or NULL pointers in your code.

  4. #4
    Join Date
    Nov 2010
    Location
    Budapest, Hungary
    Posts
    125
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: exe exited with code -1073741819

    actually it crashes at the very end when I try to close the application.
    I started the debugger but I am very new to this topic. I found that it stops at specific points but first I cannot really see why and second none of them are in my classes but in such Qt creations like class "Q_GUI_EXPORT QCheckBox : public QAbstractButton" or "QTableWidgetItem::~QTableWidgetItem()". Well it would be handy to find a good description of this sort of debugging because I can see I am a "hard-core-beginner" to the topic but it is really hard to find a good description for absolute beginners. I found some but for example the one example aplication is not very informative to me.
    Szilvi

  5. #5
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: exe exited with code -1073741819

    When the app crashes while running in the debugger, look for the last line in your code that was executed. (in call stack)
    Post a section of the code above that line that that line (including the line itself).
    But from the information you supplied in the last post, I can already tell you that it *probably* has to do with a destructor called on an dangling pointer.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  6. #6
    Join Date
    Nov 2010
    Location
    Budapest, Hungary
    Posts
    125
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: exe exited with code -1073741819

    why does the debugger stop at some points? what does that mean? Should I simply click and click "continue" until it crashes? How do I know where is the crash if the debugger closes when I close the application?
    what does that mean what you wrote "in call stack"?
    Szilvi

  7. #7
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: exe exited with code -1073741819

    http://doc.qt.nokia.com/qtcreator-sn...debugging.html
    http://en.wikipedia.org/wiki/Call_stack

    You should really first be comfortable with using the tools you are using before doing any work with them...
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  8. #8
    Join Date
    Nov 2010
    Location
    Budapest, Hungary
    Posts
    125
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: exe exited with code -1073741819

    honestly now that I seem to succesfully implement everything withiout using forms (design everything manually) I have the bad feeling that there went wrong something with this feature. Now it is more complicated as there will be several things on some of my widgets - that is why I wanted to use the creator - but if it will be good than worths the trouble.
    Szilvi

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: exe exited with code -1073741819

    Please don't blame the tools for your own mistakes.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. #10
    Join Date
    Nov 2010
    Location
    Budapest, Hungary
    Posts
    125
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: exe exited with code -1073741819

    no, I didn't mean it like that. I just tought there must be some confusion maybe because I am simply not awere of some features how forms are treated. See, if everything works without using forms then the problem was around the forms, yes, very likely that I did not set something or misset or... well, no clue. When I'll have time I will try to find the real answer (I'm not stopping learning forward nor Qt, nor debugging itself) but now it is better to move on working instead of letting time go whilst I'm stacked into this bug. I'm too close to the end of this work and I have too little time to finish it. But knowing how powerful softwares have already been written in Qt I do agree with you that the error is on my side.
    Szilvi

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: exe exited with code -1073741819

    Your problem has nothing to do with Designer or Creator. You have written some C++ code that is invalid, most likely it operates on an uninitialized pointer.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. exited with code -1073741819
    By Con Nít in forum Newbie
    Replies: 7
    Last Post: 27th January 2011, 22:04
  2. Replies: 3
    Last Post: 2nd November 2010, 22:36
  3. program crashing randomly code -1073741819
    By feraudyh in forum General Programming
    Replies: 6
    Last Post: 21st September 2010, 17:07
  4. name.exe exited with code 1.
    By Fallen_ in forum Qt Programming
    Replies: 2
    Last Post: 2nd September 2010, 01:17
  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.