Application event loop gets paused when changing from desktop to TTY



  • 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.



  • 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.



  • 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.


Log in to reply
 

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