[SOLVED] timers cannot be stopped from a different thread
-
wrote on 23 Apr 2015, 17:47 last edited by jhowland
I have some multi-threaded code, written in the moveToThread mode--I also use QRunnables. When I exit my program, I get a message--on both linux and Windows--
QObject::~QObject: Timers cannot be stopped from another threadI don't use any timers in my program. None. The string "timer" does not occur anywhere in my own code.
Is it being used by the API somewhere? How can I stop this from happening?
-
wrote on 23 Apr 2015, 19:30 last edited by
Hi and welcome to devnet,
you can try executing you application with debugger and verify where and how timers are started stopped.
Could you post some parts of code? -
I have some multi-threaded code, written in the moveToThread mode--I also use QRunnables. When I exit my program, I get a message--on both linux and Windows--
QObject::~QObject: Timers cannot be stopped from another threadI don't use any timers in my program. None. The string "timer" does not occur anywhere in my own code.
Is it being used by the API somewhere? How can I stop this from happening?
Hi @jhowland,
Each QObject has a built-in timer. Qt might use it for internal purposes
QObject::~QObject: Timers...
The part before ": Timers" shows the function which produced this message. In your case, it is a QObject destructor. This suggests that an object is getting deleted in the wrong thread.
-
Hi @jhowland,
Each QObject has a built-in timer. Qt might use it for internal purposes
QObject::~QObject: Timers...
The part before ": Timers" shows the function which produced this message. In your case, it is a QObject destructor. This suggests that an object is getting deleted in the wrong thread.
1/4