Results 1 to 7 of 7

Thread: Linux QT4 app hangs on exit

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Linux QT4 app hangs on exit

    did you tried returning app.exe() ?

    edit:-> also use show() in maindialog instead of exec()

  2. #2
    Join Date
    Jun 2009
    Posts
    66
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Linux QT4 app hangs on exit

    I changed the code as follows:

    Qt Code:
    1. MainDialog dialog( 0, Qt::WindowMaximizeButtonHint | Qt::WindowMinimizeButtonHint );
    2. dialog.show();
    3.  
    4. return app.exec();
    To copy to clipboard, switch view to plain text mode 

    But I still get the hang on Linux. Looking at the output from GDB, it's still the same as in my initial post.

  3. #3
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Linux QT4 app hangs on exit

    i bail out

  4. #4
    Join Date
    Jun 2009
    Posts
    66
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Linux QT4 app hangs on exit

    I've resolved this issue in a strange way, but will investigate the cause later.

    In my App I had the following :-

    - Main app (exe).
    - A number of widget which are built as shared object (.so/.dll).
    - A static library which is linked into the main app and shared objects (.a/.lib).

    On windows and solaris, everything is fine, but on linux, this method, causes the main app to hang on exit, when cleaning up and closing the shared objects.

    I got around the problem by changing the structure to :-

    - Main app (exe).
    - A number of widget which are built as shared object (.so/.dll).

    Now rather than having a static library linked in, which contains the shared code, which is duplciated in each shared object, I include the C++ files in each individual *.pro file for each shared object. Building like this stops the hang.

    This is a very strange issue, but as I said, it resolves my issue for now, and enables me to conitnue with my dev on QT4.

Similar Threads

  1. Which Linux distribution is best for building compatible apps?
    By Oxidative in forum Installation and Deployment
    Replies: 8
    Last Post: 9th July 2009, 16:13
  2. Replies: 5
    Last Post: 15th January 2009, 09:03
  3. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  4. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13

Tags for this Thread

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.