## Impact
blueman-applet crashes with an `AssertionError` in
`Manager._on_object_removed()` when BlueZ removes a `Battery1` interface
from an object that has no `Device1` interface. BlueZ does exactly that
when an adapter is powered off (lid close / low-power states), so the crash
happens on a normal power-state transition. The daemon dies and the
session loses its Bluetooth status icon; pairing, device management and
OBEX file receive stop working until the user relogs.
The bug is in the battery branch's assertion, which checks
`device_proxy` (always `None` on this path) instead of `battery_proxy`:
if battery_proxy:
assert isinstance(device_proxy, Gio.DBusProxy) # Manager.py:76
This bucket is 269 crashes/week on Ubuntu 26.04 (top-30 of the error
tracker's weekly list), reported since 2.3.5.
Fixed upstream in b1633b8d (issue #3233, PR #3234) by removing the
battery branch from `_on_object_removed()`; it is in no release.
## Test Plan
Prepared package: 2.4.4-1ubuntu0.1 (debdiff attached; it becomes
available in resolute-proposed once sponsored and accepted).
1. Unit-level, no hardware needed. With a stub `Gio.DBusObject` exposing a
`Battery1` interface and no `Device1` interface, call
`Manager._on_object_removed()`:
- unpatched: raises `AssertionError` at Manager.py:76;
- patched: returns without raising and emits nothing.
Already run against the prepared tree (stock 2.4.4 and patched):
stock raises the AssertionError, patched returns cleanly.
2. End-to-end on a machine with a Bluetooth adapter and a device that
reports battery (headset via HFP/AVRCP):
- connect the device, confirm the manager window shows its battery
level (`battery-created` path unchanged);
- power the adapter off (rfkill or `bluetoothctl power off`), or close
the lid on a laptop configured to power Bluetooth down;
- unpatched: blueman-applet dies with the traceback in the bug;
patched: blueman-applet stays up and the status icon remains.
3. Regression: with Bluetooth powered off, power it back on; the applet
still enumerates adapters and devices, and the manager window's battery
column still populates for battery-reporting devices.
## Where problems could occur
The patch removes the `battery-removed` signal emission from the
object-removed path. That signal has exactly one listener
(`blueman/gui/manager/ManagerDeviceList.py`) and is not what populates the
battery UI — that is `battery-created`, which is untouched. Worst case, a
stale battery entry could remain visible in the manager window until the
device list is refreshed. This matches upstream's chosen fix.
## Other Info
The same upload also fixes the `ShowConnected` `KeyError` (LP #2190870);
both patches are backports of upstream master commits and neither is in
any release (latest tag 2.4.6, 2025-07-01, predates both).
Debdiff: attached. The debdiff also contains the standard Ubuntu maintainer
field rewrite, required because the resolute package carries a Debian
Maintainer and the SRU version is `-1ubuntu0.1`.
** Patch added: "resolute (26.04) debdiff: blueman 2.4.4-1build1 ->
2.4.4-1ubuntu0.1"
https://bugs.launchpad.net/bugs/2082533/+attachment/6025245/+files/resolute.debdiff
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2082533
Title:
blueman-applet crashed with AssertionError in _on_object_removed()
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/blueman/+bug/2082533/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs