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

[BlueZ] Unpair request blocks within ~2 seconds when I/O is active

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.11.1
    • 5.9.1
    • None
    • * Fedora 26 64 bit
       * Qt 5.9.1

    Description

      An attempt to call the unpair request like:

      QBluetoothLocalDevice::requestPairing(address, QBluetoothLocalDevice::Unpaired) 

      blocks within some seconds in case e.g. the obex session is active (in my case I periodically read a phoneboock asynchronously, using the separate DBus API). That leads, e.g. to freesing of a QML ui in an unpairing process.

      E.g. this pseudo-code prints out:

      static QElapsedTimer et;
      
      Foo:Foo() 
      {
          connect(localDev, &QBluetoothLocalDevice::pairingFinished, []() {
              qDebud() << "Elapsed in slot:" << et.elapsed;
          }
      }
      
      void doUnpair()
      {
          et.start();
      
          localDev->requestPairing(QBluetoothAddress(deviceAddress),
                                        QBluetoothLocalDevice::Unpaired);
      
          qDebug() << "PAIR: elapsed in end" << et.elapsed();
      }
      PAIR: elapsed in slot 2487
      PAIR: elapsed in end 2498

      As can be to see, the function is locked on ~2.5 seconds.

      I mean, that requestPairing() should be asynchronous anyway in any case!

      Attachments

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

        Activity

          People

            ablasche Alex Blasche
            kuzulis Denis Shienkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes