Hmm, simone-c wrote:

"I tried to compile latest available version: usb-
modeswitch-2.6.0.tar.bz2 (md5: be73dcc84025794081a1d4d4e5a75e4c) and it
does not crash."

Generally, not many changes are made anymore regarding the core program.
Strangely enough, there wasn't the slightest change in the
detachDriver() function between 2.5.2 and 2.6.0. So it's likely there is
a combination of things happening here.

This is the code where the crash is happening:

-x-x-x-

struct libusb_config_descriptor *config;
libusb_get_active_config_descriptor(dev, &config);

-x-x-x-

So actually the problem is that libusb can't determine and retrieve the
active configuration because it can't read the value that would tell it
the number/index of the configuration currently set
(/sys/bus/usb/devices/1-2/bConfigurationValue).

It would be interesting to check if that attribute is actually there. Try
# cat /sys/bus/usb/devices/1-2/bConfigurationValue

It *might* be that there is some self-switching going on and the device is gone 
during usb_modeswitch handling it, but that wouldn't explain why the crash 
doesn't happen with 2.6.0 ...
 
It's obvious though that I need to catch the "get_active_config" function 
returning an error.

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

Title:
  usb_modeswitch 2.5.2 segfault

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/usb-modeswitch/+bug/1880191/+subscriptions

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

Reply via email to