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. Application event loop gets paused when changing from desktop to TTY
Forum Update on Monday, May 27th 2025

Application event loop gets paused when changing from desktop to TTY

Scheduled Pinned Locked Moved Unsolved General and Desktop
linuxqwidgetqapplication
3 Posts 2 Posters 1.0k Views
  • 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.
  • N Offline
    N Offline
    nalihaven
    wrote on 13 Nov 2015, 10:21 last edited by
    #1

    Hi,

    I'am working on a qapplication, running over ubuntu, which shows a qwidget. This application has several threads.

    My Qt version is 4.8.6.

    From one of this detached threads I'm emitting a signal that it is connected to a slot in the main qwidget. As the param of the signal I am passing a boost:shared_ptr.

    I've detected that when changing from desktop (or X11 session) to any TTY (CTL+ALT+F1..6) application event loop gets paused but signals are being enqueued so memory increases endlessly till I return to desktop (X11 session).

    I couldn't find in documentation the expected behaviour of aplication event loop in this case.

    Event loop should be paused when changing to TTY?
    Is there any way to detect if application event loop is paused in order to not emit signals?

    Thanks in advance.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bsomervi
      wrote on 13 Nov 2015, 19:54 last edited by
      #2

      I would not expect the GUI application to pause processing when a TTY window is open. What makes you think the Qt event loop is paused in this case?

      I would guess you have a simple memory leak and the TTY is not part of the issue.

      N 1 Reply Last reply 16 Nov 2015, 08:13
      0
      • B bsomervi
        13 Nov 2015, 19:54

        I would not expect the GUI application to pause processing when a TTY window is open. What makes you think the Qt event loop is paused in this case?

        I would guess you have a simple memory leak and the TTY is not part of the issue.

        N Offline
        N Offline
        nalihaven
        wrote on 16 Nov 2015, 08:13 last edited by
        #3

        Thanks for the response @bsomervi.

        I added some trace messages to my code to follow execution and I discovered that:

        • Before changing to TTY both traces are shown, signal is being emitted and slot is being called.
        • Once changed to TTY, signal keeps being emitted but slot is never called till I return to GUI.

        I added, too, trace messages in some events handled by my app and none was processed once moved to TTY (focus adquired, focus lost, painting event).

        I've ran tests to detect memory leaks with valgrind and nothing was shown up.

        1 Reply Last reply
        0

        1/3

        13 Nov 2015, 10:21

        • Login

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