Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTimer slot does not executed after a while
Qt 6.11 is out! See what's new in the release blog

QTimer slot does not executed after a while

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 972 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    QtFriend
    wrote on last edited by QtFriend
    #1

    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?

    M 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      400 to 500 QTimer ? Why so may ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Q QtFriend

        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?

        M Offline
        M Offline
        mcosta
        wrote on last edited by
        #3

        @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??

        Once your problem is solved don't forget to:

        • Mark the thread as SOLVED using the Topic Tool menu
        • Vote up the answer(s) that helped you to solve the issue

        You can embed images using (http://imgur.com/) or (http://postimage.org/)

        1 Reply Last reply
        0
        • T Offline
          T Offline
          ttuna
          wrote on last edited by
          #4

          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)?

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved