[sane-devel] saned + win32-xsane problem

Henning Meier-Geinitz henning@meier-geinitz.de
Sun, 6 Jun 2004 18:50:23 +0200


Hi,

On Sat, Jun 05, 2004 at 11:00:23AM -0700, Keith Clayton wrote:
> scanimage -d net:localhost:plustek works perfectly.  Can scan as many
> times consecutively as I'd like.
> 
> win32-xsane continues to fail on the 2nd scan.  After power-cycling the
> scanner I ran win32-xsane first then scanimage from the local machine.
> Scanimage failed in this case.  First pass of win32-xsane is evidently
> leaving the scanner in a bad state.  Used the debug flags as you
> suggested and captured the output.  Something is definitely going wrong
> at the end of the win32-xsane/saned scan.
> 
> I've attached the gzip output of running saned as you suggested with
> debugging on and xinetd disabled.  I X'd out any host, IP info from the
> top of the log files but otherwise they're exactly what the debug kicked
> out.

Local:
[...]
[plustek] sane_cancel
[plustek] do_cancel
[plustek] TIME END 2: 20s
[saned] process_request: waiting for request
[saned] process_request: got request 3
[plustek] sane_close
[saned] process_request: waiting for request
[saned] process_request: got request 10
[plustek] sane_exit
[plustek] Shutdown called (dev->fd=-1, libusb:001:013)
[plustek] Waiting for scanner-ready...
[plustek] Switching lamp off...
[plustek] REG[0x5b] = 0x94 (msk=0x80)
[plustek] REG[0x59] = 0x41 (msk=0x08)
[plustek] LAMP-STATUS: 0x00000001
[plustek] Switching Lamp off
[plustek] usb_switchLampX(ON=0,TPA=0)
[plustek] Switch Lamp: 0, regs[0x5b] = 0x14
[plustek] REG[0x5b] = 0x14 (msk=0x80)
[plustek] REG[0x59] = 0x41 (msk=0x08)
[plustek] LAMP-STATUS: 0x00000000
[plustek] Lamp-Timer stopped
[saned] quit: exiting

Looks sane :-) The scan is cancelled, the device is closed and then
sane_exit is called.

net:
[plustek] sane_cancel
[plustek] do_cancel
[plustek] TIME END 2: 88s
[saned] process_request: waiting for request
[saned] process_request: got request 5
[saned] process_request: waiting for request
[saned] process_request: got request 5
[...]

After sane-cancel() neither sane_close nor sane_exit() is called. That
may cause a scanner to hang. The rquest 5 which is repeated some times
is sane_control_option. Not too unusual, but xsane just seems to crash
at that point so sane isn't closed correctly. Or saned crashes but you
should get a segmentation fault or similar at that point. However,
it's strange that "[saned] quit: exiting" is missing.

Bye,
  Henning