QTimer slot does not executed after a while



  • I have a custom Linux board with a quite large Qt application.

    After a reboot the system works without problems, like it should, but after a while (multiple hours) it seems all QTimers stopped working. The slots connected with QTimers do not get executed. But my GUI event loop seems to be running, because my GUI gets repainted after I press a button. So I assume there is nothing blocking the main event loop.

    Lets' assume hardware and kernel is good (this behavior happened after major application code changes, no kernel changes).

    Any ideas what can be causing this?
    Or maybe ideas how to trace/debug the cause of this?

    Edit: I know QTimers need an event loop to work, but since the GUI thread that also contains my timers gets updated when I press a button or receive TCP data, I assume the event loop isn't blocked. Is this assumption correct?

    Edit: I also use alot of QTimers, maybe 400-500. Can this be a problem?


  • Lifetime Qt Champion

    Hi,

    400 to 500 QTimer ? Why so may ?



  • @QtFriend said:

    Edit: I also use alot of QTimers, maybe 400-500. Can this be a problem?

    is a very Huge number. Do you really need them??



  • Are all of your timers are connected to one slot?
    And is/are the slot/s running in the same thread (e.g. gui thread)?
    And are these timers running in the same thread (e.g. gui thread)?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.