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

Stephen Torri storri at ameritech.net
Fri Nov 30 22:52:23 GMT 2001


On Fri, 30 Nov 2001, Henning Meier-Geinitz wrote:

> 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...

I was trying to express how I configured the entire sane-backend. I was 
not trying to say how I configured testsuite. Sorry if I was not clear 
enough.
 
> Maybe also "--enable-warnings" is ok for you? Or do you want to only
> use "-o" instead of "-o2" for better debugging?

I can try it with "--enable-warnings". I was trying out testsuite to 
ensure that the sane-backend was working correctly.

> > 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.

The extra documentation with examples showing a typical test would be 
nice. I have an HP 4100C so do I use instead "./configure 
--enable-hp-backend"?

> > 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 will try it next time with the SANE_DEBUG_DLL to see if shows any more 
problems.

> > 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

I re-read another faq specific to the hp backend. I setup my hp.conf for
the USB scanner that I have (4100C). I was able to get scanimage,
xscanimage and xsane to work with the default scanner. So the problem I
was having was more a configuration problem. Unfortunately none of the
programs like scanimage handle bad configuration files. Either we need a
configuration setup utility or a way to report what is wrong in the
program while exiting gracefully. At present coming into the program, 
reading the documentation, and trying to setup the hardware is rather 
difficult when the error message being reported is a Segmentation fault.

Thanks for the response.

Stephen




More information about the sane-devel mailing list