[sane-devel] All sane frontends segfault with my HP 5200C

Henning Meier-Geinitz henning at meier-geinitz.de
Sun Feb 3 10:29:30 GMT 2002


Hi,

On Sun, Feb 03, 2002 at 10:13:58AM +0100, Peter Kirchgessner wrote:
> as I remember this has been reported before. But I am not quite sure if 
> it has been fiexed in the current version of SANE.

It's not a bug because it's documented :-)

To be exact: the result of accessing a USB scanner with SCSI commands
is undefined. My (mustek) backend in connection with USB scanners just
freezes. It should be possible to avoid segfaults, but the segfault is
just the result, not the source of the problem.

Can anyone provide a gdb backtrace of this segfault? Is it in the
backend or sanei_scsi.c?

All the SCSI backends use /dev/scanner for testing for a SCSI scanner.
This will cause trouble if it points to anything other than a SCSI
device.

I have no idea how to test if the device is a SCSI device without
sending data to it. Maybe we can add some magic to look at the real
device name if /dev/scanner is used but ad this can something like
/dev/sga, /dev/sg1, /dev/uk0, /dev/ss0 and many many more it's not
that easy. And nobody prevents the user to create
/dev/myownscsiscanner with the correct major/minor numbers.

Any ideas?

Bye,
  Henning



More information about the sane-devel mailing list