Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Cannot stop QTimer from another thread
John Howe last edited by
I hope this is an easy one. I received an error during shutdown of my app that was roughly "Cannot stop a QTimer from another thread."
I'm not doing anything to deliberately call the Timer->stop() or the Timer->~QTimer() methods from a different thread. Suggestions on how to troubleshoot?
nagesh last edited by
do you have any timer->stop() in your code?
In which thread QTimer object created? what is the current thread affinity of QTimer object?
Suggestions on how to troubleshoot?
QT_FATAL_WARNINGSas an environment variable with a value of
1. Run your program in the debuger, when it crashes (which it will at the point of the "Cannot stop a QTimer from another thread." warning) extract a stack trace. Post it here.
That warning usually means that something's not right with your objects' thread affinity.
anil_arise last edited by
use user define signal instead of direct stop to Qtimer from another thread.