Results 1 to 4 of 4

Thread: Qt Application Weird Pause/Halt issue

  1. #1
    Join Date
    Feb 2009
    Posts
    11
    Qt products
    Qt4
    Platforms
    Windows

    Default Qt Application Weird Pause/Halt issue

    Hi there,

    I have encountered a weird problem recently. I created a new application that process HTML files with Qt. Here is basically what it does

    1. Loads up a HTML page using QWebView
    2. Extract some information from the HTML file
    3. Go back to Step 1 to process the next one.

    The problem is that after a while, the program stops processing. When it stops is totally random. Sometimes it stops after a long while, sometimes it stops half a minute after it starts.

    To resume it, all I need to do is just to hover the mouse cursor over the application window. I don't even need to click anything. Just hovering over it and it will start working again.

    This happens in Windows 7 and Windows Vista. Not sure about XP since I don't have a machine running it.

    I am having a hard time figuring out this problem. Maybe someone can help me with it? Thanks in advance.
    Last edited by roland8454; 8th March 2010 at 17:48.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt Application Weird Pause/Halt issue

    Well, that behavior would cause your message pump to be activated, so maybe it was stuck waiting for something to happen?

    I don't know why your program acts this way, but maybe the addition of a QTimer would give it an appropriate event to stop hanging?
    Last edited by squidge; 8th March 2010 at 22:32.

  3. #3
    Join Date
    Feb 2009
    Posts
    11
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt Application Weird Pause/Halt issue

    fatjuicymole, thanks for your reply.

    The code does rely on catching "loadFinished" signal from QWebView to make sure an HTML is fully rendered.

    Can you please explain a bit more about the "message pump"? I'm not quite sure what that is. Thank you.

  4. #4
    Join Date
    Aug 2008
    Location
    Cherry Hill, NJ USA
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Application Weird Pause/Halt issue

    Did you figure out why this was happening, and what to do to prevent it? I'm having a similar problem...

Similar Threads

  1. Weird application crash
    By MarkoSan in forum Qt Programming
    Replies: 10
    Last Post: 20th May 2008, 14:13
  2. I need a pause (QTimer)
    By baray98 in forum Qt Programming
    Replies: 3
    Last Post: 17th January 2008, 05:37
  3. Replies: 1
    Last Post: 14th June 2007, 15:52
  4. Pause executing QProcess
    By bravetanveer in forum Qt Programming
    Replies: 1
    Last Post: 3rd December 2006, 07:55
  5. Replies: 1
    Last Post: 13th February 2006, 10:02

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.