PDA

View Full Version : QWaitCondition: Destroyed while threads are still waiting



TimShnaider
20th July 2012, 11:46
I am using a node.js addon and have extended it with a QWebPage wrapper: https://github.com/arturadib/node-qt

when I do a QWebPage::load() on exit of the javascript I get the 'QWaitCondition: Destroyed while threads are still waiting' warning displayed on exit of the node instance.

If I just get the html() for the mainframe(), no issues, only when something that involves the event queue is executed.

Unfortunately I don't have the skills to figure out the threading issues here. The wrapper works great, I can load pages, get back the html etc, all sweet there.
But obviously something is not quite right.

Any whizzes have some ideas? There is a 'setInternval( function() { app.processEvents(); }, 0 )' that obviously wraps up QCoreApplication::processEvents to run all the time.

I've got no idea what thread everything is executed in, it may be different ones.

Cheers for any assistance in figuring this out.

TimShnaider
22nd July 2012, 02:07
As usual, simplest answer is the right one - hooked up node::AtExit to delete the QCoreApplication::instance() that is created early on.