Results 1 to 5 of 5

Thread: Error when close Qt program : "The program has unexpectedly finished "

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Thanks
    75
    Thanked 24 Times in 21 Posts
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Error when close Qt program : "The program has unexpectedly finished "

    Hi all..
    I'm writing a big project with Qt and it works well until now, but there's something that concerns me.
    When i close the program there is an error in debug window(Application output window):

    "The program has unexpectedly finished."

    I thought it must be threads but I've checked all the threads in the program and they are safe.

    What are possibilities of this error?? Thanks

  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: Error when close Qt program : "The program has unexpectedly finished "

    The usual cause is using a pointer that is invalid. Your debugger will likely tell show you exactly which line crashed if you inspect the stack back trace.

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

    alizadeh91 (17th September 2012)

  4. #3
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Thanks
    75
    Thanked 24 Times in 21 Posts
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Re: Error when close Qt program : "The program has unexpectedly finished "

    What do you mean by that is invalid???

  5. #4
    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: Error when close Qt program : "The program has unexpectedly finished "

    Quote Originally Posted by alizadeh91 View Post
    What do you mean by that is invalid???
    That it is not pointing to an area of memory holding a valid object that is expected to be there.
    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.


  6. The following user says thank you to wysota for this useful post:

    alizadeh91 (22nd September 2012)

  7. #5
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Error when close Qt program : "The program has unexpectedly finished "

    Another way to get to that kind of error (related to pointer being invalid) is by allocating child widgets on the stack and if the parent is deleted (or goes out of scope) first it calls delete with the child address (that is actually not allocated on heap so delete will cause the error).

Similar Threads

  1. the program has unexpectedly finished
    By narlapavan in forum Qt Programming
    Replies: 9
    Last Post: 9th July 2012, 09:04
  2. Replies: 6
    Last Post: 24th June 2012, 18:32
  3. Program has unexpectedly finished
    By Maluko_Da_Tola in forum Newbie
    Replies: 5
    Last Post: 1st December 2010, 09:54
  4. "Cannot run program "C:\Qt\4.3.3\bin\qmake": file not found
    By PeteH in forum Installation and Deployment
    Replies: 1
    Last Post: 7th February 2009, 00:48
  5. Program error : [9;0] [?1cCreating mouse "Auto"
    By Cyrus in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 12th October 2006, 15:22

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.