Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-37677

Events are queued when rendering blocked

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Incomplete
    • Affects Version/s: 5.1.1, 5.2.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Linux, Mir and X11

      Description

      With the transition to 5.2.1 (we unfortunately skipped 5.1 and 5.2, so can't say exactly when that happened), something changed in the QML engine that causes events to be queued if the app can't render. In our case it's Mir stopping the buffers because screen is off, but this can be emulated using Xvfb and sending a SIGSTOP to it.

      Real-world issues we encountered on Ubuntu:

      • can't change volume when screen is off, all input events are delivered to the shell after screen is turned on again;
      • EndOfStream event isn't delivered to the music app, resulting in no playlist progression when screen is off, next song plays as soon as screen is back on;

      The following piece of code continues to print current date when rendering stops under Qt 5.0, but stops after a second or two under Qt 5.2.

      printDate.qml
      import QtQuick 2.0
      
      Item {
          width: 300
          height: 200
          Text {
              id: text
              text: Date()
              anchors.centerIn: parent
          }
      
          Timer {
              running: true
              repeat: true
              onTriggered: {
                  var date = Date();
                  console.log(date);
                  text.text = date;
              }
          }
      }
      

      Steps to reproduce (on Ubuntu Trusty):

      # screen definition needed for Gallium to work
      xvfb-run -s "-screen 0 1024x768x24" qmlscene printDate.qml
      
      # in another terminal
      pkill -SIGSTOP Xvfb
      
      # observe that output from QML stops after a few seconds
      
      # after output stopped
      pkill -SIGCONT Xvfb
      
      # observer that output from QML resumes
      

      In the case above there is no "burst" of queued messages because of how Timer works, but that's a special case.

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              sletta Gunnar Sletta
              Reporter:
              saviq MichaƂ Sawicz
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes