Public bug reported:

blueman-applet crashes with a KeyError in
ShowConnected.on_device_property_changed() when BlueZ reports
Connected=false for a device path that was never observed as connected.
That happens with devices that connect transiently without being paired,
e.g. sending a file from a phone that is not known to this machine. The
applet dies and the session loses its Bluetooth status icon until the
process is restarted or the user relogs.

Error tracker:
https://errors.ubuntu.com/problem/821b4852119003950612fcb69e0769069e30932d
Signature:
/usr/bin/blueman-applet:KeyError:_on_device_property_changed:on_device_property_changed

Traceback (representative trace, also attached):

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/main/Applet.py", line 100, in 
_on_device_property_changed
    plugin.on_device_property_changed(path, key, value)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File 
"/usr/lib/python3/dist-packages/blueman/plugins/applet/ShowConnected.py", line 
101, in on_device_property_changed
    self._connections.remove(path)
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: '/org/bluez/hci0/dev_F4_8C_50_7F_57_1E'

ShowConnected tracks connected device paths in a set and uses
set.remove() for the Connected=false transition, which raises when the
path is absent because Connected=true was never observed.

Scope: the set-based code is 2.4.x only. Noble's 2.3.5 uses a connection
counter instead and cannot raise this KeyError, so this is a 2.4.x-only
defect.

Fixed upstream in commit ba2ef4b9 ("ShowConnected: Use discard to drop
path from connections", 2026-02-20), which is in no release (the latest
upstream tag, 2.4.6, predates it).

An SRU is being prepared for tenacious (2.4.4-1ubuntu2) and resolute
(2.4.4-1ubuntu0.1), backporting this together with the
Manager._on_object_removed AssertionError fix in LP #2082533. The SRU
template follows as a comment.

Volume at the 2026-12-02 sync: 191 crashes/week on Ubuntu 26.04.

** Affects: blueman (Ubuntu)
     Importance: Undecided
         Status: In Progress

** Affects: blueman (Ubuntu Resolute)
     Importance: Undecided
         Status: In Progress

** Affects: blueman (Ubuntu Tenacious)
     Importance: Undecided
         Status: In Progress


** Tags: desktop-needs-sru resolute tenacious

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2190870

Title:
  blueman-applet crashed with KeyError in on_device_property_changed()

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/blueman/+bug/2190870/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to