[ignored] Issue with QTimer::singleshot() on ARM
I have an application which consists of a number of plugins. One of the plugins is a HTTP server which listens for inputs and sends request to a mediplayer plugin through a pointer. I have implemented the possibility to send a "play", "pause" and "stop" command to the HTTP server which then (of course) either tells the mediaplayer to start playing, pause playing or stop playing. On my desktop Linux everthing seems to work like a charm, but I want to run it on an arm processor (in my case an ODROID-U3), and here I get problems when I try using the "stop" command, as I get the error
@QObject::killTimer: timers cannot be stopped from another thread@
and after a while I usually get a segmentation fault, which I suspect is related to the above, as it only seems to happen if I have sent the "stop" command.
I am, however, a little clueless why I get the above error. In order to have fading between songs, my mediaplayer is constructed in such a way that XX seconds before a song ends, the mediaplayer do a request for the next song to be played, checks if it exists and do another request if it doesn't. Otherwise it just wait for the current song to end. For these operations I use a couple of QTimer::singleShot() and that is the only kind of timers I use, My mediaplayer just uses instances of QMediaPlayer and when I call the stop() function of the mediaplayer, it just calls the QMediaPlayer::stop() function.
Can anyone give me a hint why I get the above error?
andre last edited by
Does your code use multi-threading at all?
From gdb I can see it starts up several threads, I am not QThread or likewise explicit though. The application is made from a number of Qt plugins,
How do you load those plugins? Do they each have their own Qt event loop?
The plugins follows the approach as described here:
To my knowledge they don't have their own event loop. I can only find ".exec()" in the main file.
Hmm... Properly caused partly by a poor design. I changed the code a bit and got rid of 1 of 2 QTimer::singleShot()'s and that also got rid of my error.