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

Proximity sensor iio-sensor-proxy backend freezes Qt when started on some devices

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.9.3
    • Sensors
    • None
    • Linux/Wayland

      The iio-sensor-proxy backend appears to have a blocking DBus call on initialization, which can cause Qt to freeze potentially due to underlying backend bugs. 

      https://github.com/qt/qtsensors/blob/ff903c10cfdd0651ad5c1ae80a4fd7456badd759/src/plugins/sensors/iio-sensor-proxy/iiosensorproxyproximitysensor.cpp#L33

      This can be reproduced by clicking the button on this simple example, with a OnePlus 6 and postmarketOS:

      import QtQuick
      import QtQuick.Controls
      import QtSensors

      Item {    

          Component.onCompleted: console.log('hello')    

          ProximitySensor {
             id: sensor
             active: false
             onReadingChanged: console.log(reading)
         }

         Button {
             anchors.centerIn: parent
             text: 'hello'
             onClicked: sensor.start()
         }

      {color:#000000}}

       

      The entire app freezes after `sensor.start()` is called.

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

            lpotter Lorn Potter
            espidev Devin Lin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes