Results 1 to 3 of 3

Thread: "The program has unexpectedly finished." after successful execution

  1. #1
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    121
    Thanks
    9
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default "The program has unexpectedly finished." after successful execution

    When executed from within Qt Creator, my program does everything it is intended to do, but when I terminate it by clicking the X button, it hesitates for about 5 seconds then shows this message in the Application Output window:

    The program has unexpectedly finished.
    E:\spheroid-abm\spheroid_GUI-static-build-desktop\release\spheroid_GUI-static.exe exited with code -1073741819

    In main.cpp I check the return code from app.exec() and it is 0.

    res = app.exec();
    return res;

    If I run the executable outside of Qt Creator I do not get the unexpected finish message. It seems to be something about Qt Creator. I am running version 2.4.1, built with Qt 4.7.4 (32bit), on Windows 7, using MS Visual Studio 2005.

    The above error-free execution does not apply on another Windows 7 machine. On this one the program runs correctly, but when it is terminated by the 'X' button, when executed either from within Qt Creator or from the .exe file, there is a pop-up:
    spheroid_GUI-static.exe has stopped working
    then options for check online, close or debug.
    The value of res is still 0.
    Last edited by gib; 26th March 2013 at 02:06.

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: "The program has unexpectedly finished." after successful execution

    show the main() function
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  3. #3
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    121
    Thanks
    9
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: "The program has unexpectedly finished." after successful execution

    Hi Santosh. I managed to localize the problem by commenting out various sections of code, and discovered my error, which was a pretty basic C++ error with pointer usage. It is surprising that the program ran successfully. All OK now

Similar Threads

  1. Replies: 4
    Last Post: 17th September 2012, 15:23
  2. the program has unexpectedly finished
    By narlapavan in forum Qt Programming
    Replies: 9
    Last Post: 9th July 2012, 09:04
  3. Replies: 6
    Last Post: 24th June 2012, 18:32
  4. Program has unexpectedly finished
    By Maluko_Da_Tola in forum Newbie
    Replies: 5
    Last Post: 1st December 2010, 09:54
  5. QSystemTrayIcon closed " unexpectedly"
    By tzioboro in forum Qt Programming
    Replies: 2
    Last Post: 10th December 2006, 17:12

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.