Results 1 to 4 of 4

Thread: "exited with code -1073741819" Application crashes abruptly

  1. #1
    Join Date
    Nov 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default "exited with code -1073741819" Application crashes abruptly

    To
    Dear People

    In my project I am using two classes, MainWindow and trailDialog(a class derived from QDialog)

    my objective is to create a library for trailDialog and invoke it through MainWindow class, upto now evry thing is fine, I am able to create library, invoke the trailDialog from the MainWindow.

    For some reason, I have declared extern MainWindow*mainwnd; in trailDialog.cpp file and in that I have called "mainwnd->setGeometry(100,100,200,200);" in the constructor of trailDialog class. Now I have built a library for the trailDialog class, included and compiled my project using this library.

    Evertthing worked fine upto compilation, but while executing the exe, the application is getting crashed and throwing the follwing exception "Sample_Qt.exe exited with code -1073741819"

    Thanks in Advance
    Regards
    A J Prakash Naveen

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: "exited with code -1073741819" Application crashes abruptly

    When you program on Windows, keep a link to MSDN open.
    This will tell you that the error means an access violation.

    Reading your post only gives more questions than it can answer.
    So, please post your code. Or, if that is not possible, create a minimal working and compiling example demonstrating the error.

  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: "exited with code -1073741819" Application crashes abruptly

    Quote Originally Posted by ajpnaveen View Post
    To
    For some reason, I have declared extern MainWindow*mainwnd; in trailDialog.cpp file and in that I have called "mainwnd->setGeometry(100,100,200,200);" in the constructor of trailDialog class. Now I have built a library for the trailDialog class, included and compiled my project using this library.
    Well, what is the reason? Where is mainwnd declared and where is its value set? These sorts of crashes are quite often the result of using a NULL or undefined pointer.

    In any case, the idea of the constructor of a GUI class directly altering its parent widget geometry seems like a poor design to me.

  4. #4
    Join Date
    Sep 2010
    Posts
    145
    Thanks
    1
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: "exited with code -1073741819" Application crashes abruptly

    Just by virtue of the declaration containing "extern" I gather that mainwnd is global. Is this true? If so, you've gotten yourself into the static initialization fiasco. (google it)

Similar Threads

  1. Replies: 4
    Last Post: 11th August 2011, 09:02
  2. Replies: 1
    Last Post: 7th April 2010, 22:46
  3. exited with code -1073741819 error
    By arpspatel in forum Qt Programming
    Replies: 8
    Last Post: 2nd March 2010, 10:47
  4. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 20:05
  5. QFile Problem~ "Unknow error" in "open(QIODevice::ReadWrite)"
    By fengtian.we in forum Qt Programming
    Replies: 3
    Last Post: 23rd May 2007, 16:58

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.