This bug is caused by some component being created without a 'parent'
device being declared, which causes the search for the bus the device is
on to fail since it doesn't anticipate devices without a parent.

You can check for the offending device thus:

$ lshal | awk 'BEGIN {parent=0; udi=""} $1 ~ /^udi/ {if (parent==0 && udi!="") 
{print udi;} udi=$3; parent=0} $0 ~ /info\.parent/ {parent=1}'
'/org/freedesktop/Hal/devices/bluetooth_test'
'/org/freedesktop/Hal/devices/computer'

In the results above two devices are listed without an info.parent. The
'bluetooth_test' device is the problem here. It may be different in
other cases. 'computer' is the root device and is the only one that
ought not to have a parent.

The attached patch adds a try...catch block that sets an artificial
info.parent for any device that doesn't declare one. It can be applied
to the existing file easily. Download the patch file to the Desktop and
then apply it to the existing file:

$ cd /usr/share/hal/device-manager
$ sudo sh -c "patch -p0 < /home/${USER}/Desktop/DeviceManager.py.diff"
patching file DeviceManager.py

Now when running hal-device-manager from a terminal you should see
something like:

$ hal-device-manager
Setting parent for /org/freedesktop/Hal/devices/bluetooth_test
Setting parent for /org/freedesktop/Hal/devices/bluetooth_test

and the GUI will start as expected.

** Attachment added: "Fix for KeyError cause by device with missing info.parent"
   http://launchpadlibrarian.net/14624970/DeviceManager.py.diff

-- 
[apport] hal-device-manager crashed with KeyError in update_tab_device()
https://bugs.launchpad.net/bugs/119757
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to