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

Crash when disconnecting from non operational BLE device

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 5.9.3
    • 5.9.2
    • None
    • Qt version on all devices: Qt 5.9.2

      Embedded device: i.mx6 with Yocto Pyro, Bluez version 5.47

      Desktop device: (Unable to reproduce the error, Bluez version 5.43

       

       

      Way to reproduce error

      1. Connect to a non operational BLE device (powered off) 
      2. wait for 1 sec
      3. Disconnect from device

      What happens

      • Segmentation fault

      Callstack

      1 QLowEnergyControllerPrivate::disconnectFromDevice qlowenergycontroller_bluez.cpp 729 0x75305534 
      2 BluetoothGenericDevice::disconnectFromDevice BluetoothGenericDevice.cpp 228 0x76cff184 
      3 BluetoothGenericDevice::deviceDisconnect BluetoothGenericDevice.cpp 45 0x76cfd814 
      4 BluetoothGenericDevice::qt_static_metacall moc_BluetoothGenericDevice.cpp 208 0x76d2daf0 
      5 BluetoothGenericDevice::qt_metacall moc_BluetoothGenericDevice.cpp 334 0x76d2e294 
      6 QQmlObjectOrGadget::metacall qqmlpropertycache.cpp 1713 0x7572e318 
      7 CallMethod qv4qobjectwrapper.cpp 1100 0x756b3e1c 
      8 CallPrecise qv4qobjectwrapper.cpp 1348 0x756b46f4 
      9 QV4::QObjectMethod::callInternal qv4qobjectwrapper.cpp 1838 0x756b560c 
      10 QV4::Object::call qv4object_p.h 372 0x756c9250 
      11 QV4::Runtime::method_callProperty qv4runtime.cpp 1102 0x756c9250 
      12 ?? 0x62897eee
       

      Code pieces which crashes

      void QLowEnergyControllerPrivate::disconnectFromDevice()
      {
          setState(QLowEnergyController::ClosingState);
          l2cpSocket->close(); <<<<< Missing check.
          resetController();
      }

       

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

            ablasche Alex Blasche
            paletteguy Karsten Sperling Opdal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes