Repository navigation
fix: take the UPower device-removed object path as a string - #49
Merged
mirkobrombin merged 1 commit intoNov 23, 2026
Merged
Conversation
libupower-glib emits device-removed with the object path, not a device object. The vapi declared a UPower.Device, so the charging indicator treated the string as an object and crashed when a Bluetooth device disconnected. Assisted-by: Claude Code:claude-sonnet-5-5 AI-Scope: Located the root cause, wrote the vapi and handler change and the reproducer that shows the crash before and the clean exit after.
Contributor
Author
|
@mirkobrombin this fixes a shell crash when a Bluetooth device disconnects. Companion vapi fix: singularityos-lab/libsingularity#21. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
libupower-glib emits
device-removedwith the device object path, not a device object. The bundledupower-glib.vapideclared the argument as aUPower.Device, soDeviceChargingIndicator.on_device_removedused the path string as an object and the shell segfaulted when a Bluetooth keyboard or mouse disconnected.The vapi now declares
device_removed (string object_path)and addsDevice.get_object_path; the handler finds the watched device by path and disconnects it.Checked against libupower-glib 1.91.5 in a debian:forky container: with the old declaration a handler that touches the argument exits 139; with the new one the handler receives the path and exits 0. Removing the first, middle and last item from a
Gee.ArrayListinsideforeachfollowed bybreakwas also run and is clean.AI assistance: disclosed