Results 1 to 6 of 6

Thread: .exe exited with code -1073741819 (Using QFrame or Qwidget)

  1. #1

    Default .exe exited with code -1073741819 (Using QFrame or Qwidget)

    Hi there, I've been looking here about this error, but couldn't find anything about my particular problem

    Whenever I try to use a QFrame or a QWidget (like doing frame->SetVisible(true)) the simulator stops working with this error: "archive.exe exited with code -1073741819""

    Could anybody help me?

    Thanks in advance.

  2. #2
    Join Date
    Feb 2011
    Location
    Bangalore
    Posts
    207
    Thanks
    20
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: .exe exited with code -1073741819 (Using QFrame or Qwidget)

    Have you done frame = new QFrame() anywhere in your code. Most probably the pointer is a dangling pointer. It has been deleted/not new'ed and you are trying to access it...

  3. #3

    Default Re: .exe exited with code -1073741819 (Using QFrame or Qwidget)

    Thanks. It was that.

    I'm kind of new on this of C++ and Qt. Would you tell me why I have to declare a Qt Frame or Widget and not a pushButton for example?

    Thanks again.

  4. #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 (Using QFrame or Qwidget)

    Nothing to do with Qt. This is basic C/C++ knowledge. You must declare any variable before you can use it. You must initialise pointer variables before using them in anger.

    Pointer variables, like your "frame" variable, must point at an instance of the object or attempting to use the object will be a Bad ThingTM. This is equally true of a pointer to a QPushButton, QFrame, CoolAndGroovyNonQtClass, or any other. You allocate an object on the heap using operator new, which returns a pointer to the object.

  5. #5

    Default Re: .exe exited with code -1073741819 (Using QFrame or Qwidget)

    Thanks. About that of declaring everything...I haven't declared those buttons or mostly anything else but the frame and it still works. Is that a "Bad Thing" that C++ still allows?

    And where should I declare those things in C++? I declared the QFrame on my MainWindow, is that orthodox? The other declarations where should they be?

    Thanks again.

  6. #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 (Using QFrame or Qwidget)

    Show the code you are referring to. We cannot comment otherwise.

    Is your UI built with Designer? If so, the UI file is compiled into equivalent C++ that includes relevant declarations and initialisations.

Similar Threads

  1. exited with code -1073741819
    By cic in forum Qt Programming
    Replies: 4
    Last Post: 11th November 2011, 23:39
  2. exe exited with code -1073741819
    By bajoelkid12 in forum Newbie
    Replies: 7
    Last Post: 2nd November 2011, 08:05
  3. exe exited with code -1073741819
    By szisziszilvi in forum Newbie
    Replies: 10
    Last Post: 1st September 2011, 16:55
  4. exited with code -1073741819
    By Con Nít in forum Newbie
    Replies: 7
    Last Post: 27th January 2011, 22:04
  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.