[sane-devel] Mustek BP 1200 CU PLUS / Bug
Henning Meier-Geinitz
henning at meier-geinitz.de
Sun Jan 22 15:59:58 UTC 2006
Hi,
On 2006-01-18 00:08, Lorenzo Delana wrote:
> I have a Mustek BP 1200 CU PLUS scanner A4, that /proc/bus/usb/devices
> describe as:
I have the same scanner and it works flawlessly. Also many others use
this scanner.
> 1) I installed cvs version of sane-backend and when I use scanimage the
> problem go in Segmentation Fault;
> to solve this I have to add a NULL POINTER check on the line 461 of the code
> so that:
I assume this is in sanei/sanei_usb.c?
> -------------
> case USB_CLASS_PER_INTERFACE:
> if (dev->config[0].interface[interface].altsetting)
> switch (dev->config[0].interface[interface].altsetting[0].
> bInterfaceClass)
> {
> ----------------
> This because altsetting something got me a NULL, then altsetting[0] is
> dereferencing a null pointer.
How can altsetting[0] be 0? This means that an interface exists but no
altsetting. I'm not that used to the USB spec but I would be surprised
if this is allowed. Anyway, if your scanner does this, it can't scan
because it's broken. I rather assume that it happens with some other
device connected to your USB. Could you try to find out which device
behaves this way? And please send a log with USB debugging enabled:
SANE_DEBUG_SANEI_USB=255 scanimage -L
As an alernative to a strangely acting device, there could be a
problem with libusb. However, this is the first time I hear about such
trouble.
I'll add some checks for altsetting !=0 to sanei_usb as they don't
harm. But I think the problem is somewhere else.
> 3) as for 1) in tools/sane-find-scanner.c at line 627
Could you send the output of "sane-find-scanner -v -v", please?
> 4) at backend/gt68xx_high.c
> I have commented out the check for the status, because in this point the
> program blocks forever ( for my scanner ). changing status = SANE_STATUS_GOOD
> for quickly replacement.
Which status exactly? Which line of the code? Please send a log file
of a scan where it blocks (without your change).
Bye,
Henning
More information about the sane-devel
mailing list