Cannot stop QTimer from another thread
-
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?
-
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?
@John-Howe said in Cannot stop QTimer from another thread:
Suggestions on how to troubleshoot?
Set
QT_FATAL_WARNINGSas an environment variable with a value of1. 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. -
use user define signal instead of direct stop to Qtimer from another thread.