[sane-devel] Sane-1.0.6 Testsuite (Failure)

Henning Meier-Geinitz henning@meier-geinitz.de
Fri, 30 Nov 2001 18:57:52 +0100


Hi,

On Fri, Nov 30, 2001 at 12:12:55AM -0500, Stephen Torri wrote:
> I compiled Sane-1.0.6 with the debug information turned on:
> 
> CFLAGS="-g -O -Wall" .configure --disabled-shared --prefix=/usr

Hm? This will execute a command called ".configure" if it's in the path.
The option is "--disable-shared" (without the "d"). Probably only
typos...

Maybe also "--enable-warnings" is ok for you? Or do you want to only
use "-o" instead of "-o2" for better debugging?

> It compiled successfully but it fails during the testsuite.
> 
> It reports the following executing "make test":
> 
> if ../frontend/scanimage -d pnm:0 --filename=testfile.pnm -T && \
>    ../frontend/scanimage -d pnm:0 --filename=testfile.pnm --three-pass=yes   -T && \
>    ../frontend/scanimage -d pnm:0 --filename=testfile.pnm --hand-scanner=yes -T ; \
> then : ; else echo ; echo; echo "Something failed"; fi
> scanimage: open of device pnm:0 failed: Invalid argument
> 
> 
> Something failed

This is indeed a very meaningfull output :-) What it really wanted to
say: "Hey, I can't test the backend pnm if it isn't compile! Try
./configure --enable-pnm-backend to get it running". I will add some
more documentation and better output in the testsuite.


> I looked over the script and decided to run the first one:
> 
> ../frontend/scaniamge -d pnm:0 --filename=testfile.pnm -T
> 
> The result I get back is:
> 
> scanimage: open of device pnm:0 failed: Invalid argument

Correct. With

SANE_DEBUG_DLL=1 ../frontend/scanimage -d pnm:0 --filename=testfile.pnm -T

you will get:

[dll] load: couldn't find /usr/local/lib/sane/libsane-pnm.so.1 (No such file or directory)

> I decided to just run ../frontend/scanimage but I got a Segmentation 
> fault.

If you just run scanimage without an option, it will scan using your
default scanner and default options.

> Closer investigation via gdb reports that its failing during a 
> memcpy while inside the function sanei_scsi_req_wait at line 2118 of 
> sanei_scsi.c.

Oops. Can you try to find out, which backend causes this problem? Try

SANE_DEBUG_DLL=5 scanimage >image.pnm

What are the last lines of the output?

More info should be available with something like

SANE_DEBUG_SANEI_SCSI=255 SANE_DEBUG_NAME=255 scanimage >image.pnm

with NAME = the name of the backend that causes the problem.

You should be able to work around this by removing the backend from
dll.conf (when installed and shared libs are used) or the list in
backend/Makefile(.in).

Bye,
  Henning