Bad handling of unknown usb/pci class codes

Bug #832655 reported by Marcin Juszkiewicz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
udev-discover
Fix Released
Medium
J. Félix Ontañón
0.2
Fix Released
Medium
J. Félix Ontañón

Bug Description

12:21 root@puchatek:udev-discover-0.2# udev-discover
/usr/lib/python2.7/dist-packages/gi/types.py:44: Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed
  return info.invoke(*args)
Traceback (most recent call last):
  File "/usr/bin/udev-discover", line 562, in <module>
    UDevDiscoverGUI()
  File "/usr/bin/udev-discover", line 302, in __init__
    self.populate(self.device_finder.get_devices())
  File "/usr/bin/udev-discover", line 372, in populate
    self.add_new_device(device)
  File "/usr/bin/udev-discover", line 385, in add_new_device
    [device.path, device_icon, device.nice_label,
  File "/usr/lib/pymodules/python2.7/udevdiscover/device/usb.py", line 236, in nice_label
    usb_type[1], usb_type[2])
  File "/usr/lib/pymodules/python2.7/udevdiscover/utils.py", line 119, in __call__
    value = self.func(*args)
  File "/usr/lib/pymodules/python2.7/udevdiscover/device/usb.py", line 176, in get_usb_short_long_names
    return usb_class_names[tuple(key)]
KeyError: (7, 1, -1)

Tags: core
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :
Revision history for this message
Juanje Ojeda (juanje) wrote :

Hi Marcin, thanks for your feedback.

Could you unplug your usb devices and then launch the udev-discover? It seems that one of the usb devices has or hasn't some property expected by the code, so it could be great if you could plug the devices one by one after the udev-discover be launched to identify it.

If you can't unplug all of them, at least try with what you can to reduce the options.

By the way, you don't need to be root or to use 'sudo' command to use udev-discover.

Thanks for your time :-)

Revision history for this message
J. Félix Ontañón (fontanon) wrote :

Hi Marcin,

This is related with a bad handle of unknow usb class codes.
Udev-discover should use a fallback name for unknow class codes for usb and pci devices but it seems not to work. This is a real bug that needs to be fixed.

Changed in udev-discover:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → J. Félix Ontañón (fontanon)
tags: added: core
Revision history for this message
J. Félix Ontañón (fontanon) wrote :
summary: - crash on start
+ Bad handling of unknown usb/pci class codes
Changed in udev-discover:
status: In Progress → Fix Committed
Revision history for this message
J. Félix Ontañón (fontanon) wrote :
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Works fine now - does not crash when printer in connected.

Debug info when printer got connected while app was run:
21:24:04 INFO - Device added: USB Device
21:24:04 INFO - Device added: Printer Interface
21:24:04 INFO - Device added: USB Interface

Revision history for this message
J. Félix Ontañón (fontanon) wrote :

Really thanks for your feedback

Changed in udev-discover:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.