tinyb icon indicating copy to clipboard operation
tinyb copied to clipboard

Major bug: Removing a bluetooth device causes tinyb crash

Open vkolotov opened this issue 7 years ago • 0 comments

When a connected device (with enabled characteristic change notification) gets removed through an external tool (bluetoothctl or similar) then tinyb crashes and becomes unresponsive.

Steps to reproduce:

  1. BluetoothDevice.connect()
  2. BluetoothGattCharacteristic.enableValueNotifications(...)
  3. Remove device (e.g. bluetoothctl# remove XX:XX:XX:XX:XX)
  4. BluetoothGattCharacteristic.disableValueNotifications() (possibly other methods as well)

Results in:

tinyb.BluetoothException: GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Method "StopNotify" with signature "" on interface "org.bluez.GattCharacteristic1" doesn't exist

Also, there is not any way to detect whether a device is removed, e.g. it is not possible to have a condition before BluetoothGattCharacteristic.disableValueNotifications method call.

vkolotov avatar Jan 02 '17 20:01 vkolotov