arturadib / node-qt

C++ Qt bindings for Node.js
http://documentup.com/arturadib/node-qt
Other
1.62k stars 172 forks source link

QWaitCondition: Destroyed while threads are still waiting #15

Closed TimNZ closed 12 years ago

TimNZ commented 12 years ago

I added a wrapper for QWebPage, and when the JS exits after I have called QWebPage::load() this is output to std error/out.

It is a qWarning in the destructor of QWaitCondition.

If I just retrieve the html or call any QWebPage function that is a simple property wrapper, no error.

The standard setInternval( function() { app.processEvents(); }, 0) is in the script. Basically everything works fine except this message is output on exit.

a quit() was a added to QApplicationWrap that simply called QCoreApplication::quit(), and that is called, but makes no difference.

Any Qt whiz knows how this can be fixed? Obviously there is some threading/event issues with the async load() call, but I have minimal skills to figure this out..

Cheers for any help.

TimNZ commented 12 years ago

As usual, simplest answer is the right one - hooked up node::AtExit to delete the QCoreApplication::instance() that is created early on.