Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
5.5.0, 5.5.1, 5.6.0 Beta
-
OS X
Description
The user wants to use moveToThread method for executing some long-run operations. The user wants to run threads with the High-priority. The user wants to shutdown those threads on application exit. The things user noticed:
Linux Ubuntu 14.04:
- QThread::quite(); and then QThread::wake() methods are working as expected (worker thread is shutdown and the application exits without crash)
OS X 10.10:
- QThread::quite() - application gets stuck
- QThread::terminate() - application exits normally (Please see the code attached on how does it was implemented)
Steps to reproduce:
- Unpack both applications
- Run both applications on OS X and Linux Ubuntu
- Close both applications (one-by-one or simultaneously if you wish)
- See the difference on how those applications exits
The developer should use application attached to reproduce the issue.
The application with QThread::terminate() should throw in output console this message:
Qt has caught an exception thrown from an event handler. Throwing exceptions from an event handler is not supported in Qt. You must reimplement QApplication::notify() and catch all exceptions there. bleKilled Qt has caught an exception thrown from an event handler. Throwing exceptions from an event handler is not supported in Qt. You must reimplement QApplication::notify() and catch all exceptions there. hidKilled QXcbWindow: Unhandled client message: "_COMPIZ_TOOLKIT_ACTION" QXcbWindow: Unhandled client message: "_COMPIZ_TOOLKIT_ACTION" /home/build-QThread_MTT-Desktop_Qt_5_5_1_GCC_64bit-Debug/QThread_Subclass exited with code 0
UPDATE 1:
QThread::terminate() can make the application get stuck on the second thread wait() method call (OS X 10.10)
UPDATE 2:
The attached application with postfix "_hack" will work well on both platforms...
Attachments
Issue Links
- relates to
-
QTBUG-23759 QEventLoop::quit fails with nested calls to processEvents when using the unix event dispatcher
- Closed
-
QTBUG-53947 QCocoaEventDispatcher may stay stuck after QEventLoop::exit() is called
- Closed
For Gerrit Dashboard: QTBUG-49539 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
158619,3 | WIP: Add QAbstractEventDispatcher::quit(). | 5.6 | qt/qtbase | Status: ABANDONED | -2 | 0 |