PDA

View Full Version : Qt Application Weird Pause/Halt issue



roland8454
8th March 2010, 17:40
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.

squidge
8th March 2010, 22:28
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?

roland8454
8th March 2010, 22:38
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.

martinb0820
27th November 2010, 04:43
Did you figure out why this was happening, and what to do to prevent it? I'm having a similar problem...