Results 1 to 5 of 5

Thread: QThread stack overflow when exiting

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QThread stack overflow when exiting

    I guess you shouldn't call QApplication::exit() from the close event. If you accept the event and make sure the app gets closed when this particular window closes, you'll achieve the same effect.

  2. #2
    Join Date
    Jan 2006
    Posts
    17
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QThread stack overflow when exiting

    After much beating of heads against walls, I found that I was reaching my return statement at the end of my main function and the exceptions being thrown occurr in one of the Windows DLL's. With the help of a friend of mine here at work, we compared Makefiles between a multi-threaded application that wasn't QT and the qmake-generated Makefile. It turns out that the qmake-generated Makefile had the compiler option set for it to have been built as a DLL instead of an executable, so we changed the CFLAGS and CXXFLAGS from -MDd to -MTd along with adding /nodefaultlib:"msvcrt.lib" to the LFLAGS. This seemed to fix the problem. Is this a known problem? I do have TEMPLATE: app in my .pro.

    Thanks for your help.
    The end of time is reached around the year 8000, by which time we expect Qt to be obsolete.

    -Note in QDate documentation. It's nice that Qt has been able to predict when the world will end.

Similar Threads

  1. Replies: 8
    Last Post: 25th February 2009, 08:29

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
  •  
Qt is a trademark of The Qt Company.