On Mon, Feb 07, 2005 at 11:01:00PM -0500, Brian Ristuccia wrote:
> I'm seeing a problem similar to what Christophe reported back in April of
> 2002. My programs like libptp and gphoto2 segfault when iterating over the
> usb_busses linked list. Looking at it with gdb,
> usb_busses->config->interface eventually winds up null and things blow up.
I suppose you mean dev->config[i]->interface[j] there? There is multiple
configurations possible as well as multiple interfaces. You can get the
number of configurations in dev->descriptor.bNumConfigurations and the number
of interfaces for a configuration in dev->config[i].bNumInterfaces. I
think it is not impossible to have one of this number equal to 0.

> I've been able to reproduce this problem with libusb-0.1.8 and 0.1.9. Unlike
> Christoph's case, rebuilding libusb from source on the same machine where
> I'm building libptp or gphoto2 doesn't fix it. 
Does the problem seems to be related to the presence of a specific
device on the USB bus?

> Oddly enough, the testlibusb program included with libusb seems to work and
> it's looking at the same structure.
Do you get also the problem with 'lsusb -v' (for the usbutils packages).
As it cycle through all possible values of the libusb structures, it
think it is a good test.

Bye,
Aurelien

-- 
  .''`.  Aurelien Jarno               GPG: 1024D/F1BCDB73
 : :' :  Debian GNU/Linux developer | Electrical Engineer
 `. `'   [EMAIL PROTECTED]         | [EMAIL PROTECTED]
   `-    people.debian.org/~aurel32 | www.aurel32.net


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to