[sane-devel] Xsane locks system w/UMAX Astra 1200S

2004-02-22 Thread Oliver Rauch
 1)  I have confirmed that the CD Writer still functions fine.

 2)  I forced the SCSI card to use IRQ 4 (serial ports are disabled).  N=
o
 change.  I pulled some extra, unused cards out of the system and also
 moved the SCSI card to a different slot.  No change.

 I'm going to try XSane .92 now.

Hello Dave,

that will not change anything. XSane is a frontend for SANE and has
nothing to do with the comunication to the scanner.

Oliver

--=20
http://www.xsane.org
http://www.rauch-domain.de
http://www.sane-project.org



[sane-devel] saned issues for remote scanner access

2004-02-22 Thread Jim George
Hi Julien and all,

I didn't need to rebuild, thankfully, please see below for the result.


 gdb /usr/sbin/saned
 run -d128
 [wait until it crashes]
 bt
 [copy this output]
#0  0x0804bb5e in process_request (w=0x80533e0) at saned.c:2003
#1  0x0804bcd2 in main (argc=2, argv=0xb5d4) at saned.c:2275
#2  0x4009e4c2 in __libc_start_main () from /lib/i686/libc.so.6

 cont
 quit

Thanks in advance,

Jim






[sane-devel] saned issues for remote scanner access

2004-02-22 Thread Julien BLACHE
Henning Meier-Geinitz henn...@meier-geinitz.de wrote:

 sane_cancel (handle[h].handle);

 That's called with h = -1. Either that causes a segfault or the call
 to sane_cancle of the gt68xx backend with some random handle causes
 the segfault.

 I guess saned should check for -1 here before calling sane_cancel.

Looking at the code, there are only 2 cases where the return from
decode_handle() isn't checked. SANE_NET_CANCEL is one, SANE_NET_CLOSE
is the other.

 I don't understand why the handle was wither not in use or 
 num_handles, however.

There's only one place in the code where the handle is marked as not
in use. There's something weird. We need to decide what condition
sent us there.

Jim, is the error 100% reproducible ? If yes, could you add the
following lines in saned.c, decode_handle(), between lines 459 and 460?

DBG (DBG_ERR, decode_handle: w-status: %d, h: %d, num_handles: %d, inuse: 
%d\n,
 w-status, h, num_handles, handle[h].inuse);

JB.

-- 
Julien BLACHE   http://www.jblache.org 
j...@jblache.org  GPG KeyID 0xF5D65169



[sane-devel] saned issues for remote scanner access

2004-02-22 Thread Jim George
Hi Julien and all,

 Jim, is the error 100% reproducible ? If yes, could you add the
 following lines in saned.c, decode_handle(), between lines 459 and 460?


Yes the error is 100% reproducible when saned is access from a remote host
(it works fine when saned is accessed locally).

Did you see my note to Henning about the debug output from the gt68xx
backend?  It showed 'local_only = true' just before failing, when accessed
remotely.  Is this relevant?

I put the following in as requested.

 DBG (DBG_ERR, decode_handle: w-status: %d, h: %d, num_handles: %d,
 inuse: %d\n,
  w-status, h, num_handles, handle[h].inuse);


Here's the output.

[saned] check_host: config file line: `# SANE devices. IPv6 addresses must
be enclosed in brackets,  and  should'
[saned] check_host: config file line: `# always  be specified in their
compressed form.'
[saned] check_host: config file line: `#'
[saned] check_host: config file line: `# The hostname matching is not
case-sensitive.'
[saned] check_host: config file line: `#'
[saned] check_host: config file line: `#scan-client.somedomain.firm'
[saned] check_host: config file line: `#192.168.0.1'
[saned] check_host: config file line: `192.168.0.1/29'
[saned] check_host: subnet with base IP = 192.168.0.1, CIDR netmask = 29
[saned] check_host: config file line: `+'
[saned] check_host: access granted from any host (`+')
[saned] init: access granted
[saned] init: access granted to jgeorge@:::192.168.0.16
[saned] process_request: waiting for request
[saned] process_request: got request 1
[saned] process_request: waiting for request
[saned] process_request: got request 2
[saned] process_request: (open) strlen(resource) == 0
[saned] process_request: access to resource `gt68xx' granted
[saned] process_request: waiting for request
[saned] process_request: got request 8

Program received signal SIGSEGV, Segmentation fault.
0x08049d3e in decode_handle (w=0x8053460, op=0x804f370 cancel) at
saned.c:460
460   DBG (DBG_ERR, decode_handle: w-status: %d, h: %d, num_handles:
%d, inuse: %d\n,
(gdb) bt
#0  0x08049d3e in decode_handle (w=0x8053460, op=0x804f370 cancel) at
saned.c:460
#1  0x0804bb76 in process_request (w=0x8053460) at saned.c:2005
#2  0x0804bcf2 in main (argc=2, argv=0xb5d4) at saned.c:2278
#3  0x4009e4c2 in __libc_start_main () from /lib/i686/libc.so.6

Cheers,

Jim





[sane-devel] saned issues for remote scanner access

2004-02-22 Thread Henning Meier-Geinitz
Hi,

On Sun, Feb 22, 2004 at 07:18:08PM -, Jim George wrote:
 Did you see my note to Henning about the debug output from the gt68xx
 backend?  It showed 'local_only = true' just before failing, when accessed
 remotely.  Is this relevant?

No, that's ok. It just means that the gt68xx backend shouldn't search
for scanners on remote computers. This doesn't make sense in the case
of that backend but image the client contacting the server's net
backend which tries to contact the client's net backend which tries...

It's just to avoid recursion.

 I put the following in as requested.
 
  DBG (DBG_ERR, decode_handle: w-status: %d, h: %d, num_handles: %d,
  inuse: %d\n,
   w-status, h, num_handles, handle[h].inuse);
 

 [saned] process_request: got request 8
 
 Program received signal SIGSEGV, Segmentation fault.
 0x08049d3e in decode_handle (w=0x8053460, op=0x804f370 cancel) at 
 saned.c:460
 460   DBG (DBG_ERR, decode_handle: w-status: %d, h: %d, num_handles: 
 %d, inuse: %d\n,

As handle[-1] is pointing somewhere starnge, that crashes. 

Bye,
  Henning



[sane-devel] saned issues for remote scanner access

2004-02-22 Thread Julien BLACHE
Henning Meier-Geinitz henn...@meier-geinitz.de wrote:

 [saned] process_request: got request 8
 
 Program received signal SIGSEGV, Segmentation fault.
 0x08049d3e in decode_handle (w=0x8053460, op=0x804f370 cancel) at 
 saned.c:460
 460   DBG (DBG_ERR, decode_handle: w-status: %d, h: %d, num_handles: 
 %d, inuse: %d\n,

 As handle[-1] is pointing somewhere starnge, that crashes. 

Nah, here we're _inside_ decode_handle(), where h = 0 according to the
previous backtrace sent on the list.

So, hrm, there's something fishy in there.

Jim, could you try with just

DBG (DBG_ERR, decode_handle: w-status: %d, h: %d, num_handles: %d\n,
 w-status, h, num_handles);

This way we should get an idea of what's going on...

JB.

-- 
Julien BLACHE   http://www.jblache.org 
j...@jblache.org  GPG KeyID 0xF5D65169



[sane-devel] saned issues for remote scanner access

2004-02-22 Thread Jim George
Hi Julien and all,

 Jim, could you try with just

 DBG (DBG_ERR, decode_handle: w-status: %d, h: %d, num_handles: %d\n,
  w-status, h, num_handles);

 This way we should get an idea of what's going on...

[saned] decode_handle: cancel: error while decoding handle argument (h=0,
Success)

Program received signal SIGSEGV, Segmentation fault.
0x0804bb6e in process_request (w=0x8053420) at saned.c:2006
2006sane_cancel (handle[h].handle);
(gdb) bt
#0  0x0804bb6e in process_request (w=0x8053420) at saned.c:2006
#1  0x0804bce2 in main (argc=2, argv=0xb5d4) at saned.c:2278
#2  0x4009e4c2 in __libc_start_main () from /lib/i686/libc.so.6
(gdb)

Hope this helps.

Jim





[sane-devel] Epson 636u, libusb, kernel 2.6.3 I/O problem

2004-02-22 Thread Christian Schaefer
S Miller wrote:
 Epson 636U scanner fails with I/O error messages when configured using
 libusb, 2.6.3, sane backends (libsane) 1.0.13, and hotplug. System is
 Debian testing/unstable. This scanner has worked perfectly for over two
 years using the scanner.o driver. With 2.6.3 I was forced to
 reconfigure using libusb, since scanner.o is removed from the kernel
 configuration. I've read all the docs I can find, and feel reasonably
 sure that my configuration correct. The scanner is being found by
 sane-find-scanner and by scanimage -L (1st try only). Once a frontend
 (scanimage or xsane) has tried to access the scanner once, it hangs,
 and will not find the scanner again. Even though the scanner is found
 by scanimage or xsane on the first try, it won't operate at all. I've
 commented out all unused scanner lines in /etc/sane.d/dll.conf and
 verified that permissions are being set correctly. The problem occurs
 both as root and as a user member of the scanner group. Hopefully the
 output below (long) will give some clues as to what's happening. I
 would appreciate any suggestions, including where to file a bug report
 if appropriate.
[...]

Same problem here with a HP ScanJet 6300C and kernel 2.6.1, .2 and .3

Chris




[sane-devel] saned issues for remote scanner access

2004-02-22 Thread Julien BLACHE
Jim George jim.geo...@blueyonder.co.uk wrote:

 [saned] process_request: waiting for request
 [saned] process_request: got request 8
 [saned] decode_handle: w-status: 0, h: 0, num_handles: 0
 [saned] decode_handle: cancel: error while decoding handle argument (h=0, 
 Success)

Ok, now that is interesting. How can num_handles fall to 0, although
there was a successful sane_open() before that ?

Henning, stop me if I'm missing something obvious :) I don't really
know that part of the code that well :/

JB.

-- 
Julien BLACHE   http://www.jblache.org 
j...@jblache.org  GPG KeyID 0xF5D65169



[sane-devel] Xsane locks system w/UMAX Astra 1200S

2004-02-22 Thread abel deuring
Dave,

 A few updates.
 
 1)  I have confirmed that the CD Writer still functions fine.
 
 2)  I forced the SCSI card to use IRQ 4 (serial ports are disabled).  No
 change.  I pulled some extra, unused cards out of the system and also
 moved the SCSI card to a different slot.  No change.
 
 I'm going to try XSane .92 now.

As Oliver already wrote, updating XSane will probably not change very 
much regarding the crash. You could try to use another version of 
sane-backends, but I have doubts that this will help.

Sane frontends like XSane or scanimage are just ordinary user space 
programs, and the scanner specific backends are ordinary libraries 
linked to the frontends. While a frontend or a backend may contain bugs 
cuasing segfault or garbled images, it is highly unlikely that a user 
program itself can freeze a Linux box as you are experiencing. This is 
the reason that I suspect either a hardware failure -- or you hit 
perhaps a kernel bug.

One noticeable difference between most programs accessing CD 
drives/writers and Sane backend for SCSI scanners is that Sane uses 
comparatively large data sizes in its SCSI commands (typically 128 kB 
for READ commands), while CD writing software uses probably data block 
sizes  32 kB.

It could be that these larger data block sizes are somehow related with 
your bug. (though they are not the cause, I think - Sane uses these 
block sizes since several years without any problem)

You could try to reduce the block size by setting option 
scsi-buffer-size-min and option scsi-buffer-size-max to values like 
16384 or 32768.

Abel




[sane-devel] epson gt-8000 problem

2004-02-22 Thread abel deuring
Marcin Bukat wrote:
 Hello!
 I've got epson GT-8000 and I'm trying get it to work.
 
 bash-2.05b# sane-find-scanner
 
 found SCSI processor EPSON SC ANNER GT-8000 1.36 at /dev/sg0
 found SCSI processor EPSON SC ANNER GT-8000 1.36 at /dev/sga
 
 bash-2.05b# SANE_DEBUG_EPSON=128 scanimage -L
 [sanei_debug] Setting debug level of epson to 128.
 [epson] sane_init: sane-backends 1.0.13
 [epson] sane_init, # epson.conf
 [epson] sane_init, #
 [epson] sane_init, # here are some examples for how to configure the 
 EPSON backend
 [epson] sane_init, #
 [epson] sane_init, # SCSI scanner:
 [epson] sane_init, #scsi /dev/sg0
 [epson] sane_init, SCSI EPSON
 [epson] attach_one(SCSI EPSON)
 [epson] SANE Epson Backend v0.2.40 - 2003-10-27
 [epson] attach(SCSI EPSON, 1)
 [epson] attach: opening SCSI EPSON
 [epson] attach: open failed: Invalid argument
 [epson] sane_get_devices()
 
 Because this was from root account this is not permission problem. 

Marcin,

please check, if the SG driver is loaded and if you have correct SG 
device files (/dev/sg*).

If the driver is loaded and the device files exist and if they have the 
correct major numbers (SG device files should have the type char 
device; the major number should be 21), please set additionally to 
SANE_DEBUG_EPSON the environment variable SANE_DEBUG_SANEI_SCSI to 255 
and show us the the output.

Abel




[sane-devel] Xsane locks system w/UMAX Astra 1200S

2004-02-22 Thread Oliver Rauch
On Sunday 22 February 2004 21:51, abel deuring wrote:

 You could try to reduce the block size by setting option
 scsi-buffer-size-min and option scsi-buffer-size-max to values like
 16384 or 32768.


When you try this then I suggest to use small scanareas and disable
the option quality calibration in the standard options window.

Large scanareas with option quality calibration often need large
scsi buffer sizes.

Oliver

--=20
http://www.xsane.org
http://www.rauch-domain.de
http://www.sane-project.org



[sane-devel] Problem with Plustek and Canonscan 1220u on Mac 10.3.2

2004-02-22 Thread Stephen Magladry
sane-config reports a version of 1.0.13, executable dated 2/13
scanimage reports a version of 1.0.13, executable dated 2/15
libusb-config reports a version of 0.1.8, executable dated 2/13
all my .conf files is /usr/local/etc/sane.d/ are dated 2/15



On Feb 22, 2004, at 5:55 AM, Gerhard Jaeger wrote:

 Hmmm, are you sure, that you're using the latest one?
 Sorry if this is too obvious, but this looks exactly like the old 
 sanei_thread
 patch from Mattias is still active in this precompiled package...

 Mattias, can you please check this?

 Ciao,
   Gerhard

 On Sunday 22 February 2004 00:33, Stephen Magladry wrote:
 I am using the new pre-compiled software from
 http://www.ellert.se/twain-sane/ from 2/15 and I am have problems
 with the Plustek back-end with the Canoscan 1220u scanner with Mac OS
 10.3.2.

 The scan appears to complete, but then the scanimage command appears 
 to
 hang.
 Here's some basic information that everyone seems to supply.


 [blah:~] blah% sane-find-scanner

# No SCSI scanners found. If you expected something different, make
 sure that
# you have loaded a SCSI driver for your SCSI adapter.

 found USB scanner (vendor=0x04a9 [Canon], product=0x2207 [CanoScan],
 chip=LM9832/3) at libusb:002:002-04a9-2207-00-00
# Your USB scanner was (probably) detected. It may or may not be
 supported by
# SANE. Try scanimage -L and read the backend's manpage.

# Scanners connected to the parallel port or other proprietary 
 ports
 can't be
# detected by this program.

# You may want to run this program as root to find all devices. 
 Once
 you
# found the scanner devices, be sure to adjust access permissions 
 as
# necessary.
 [blah:~] blah% scanimage -L
 device `plustek:libusb:002:002-04a9-2207-00-00' is a Canon N1220U USB
 flatbed scanner




 I then enable debug messages.
 export SANE_DEBUG_PLUSTEK=255
 export SANE_DEBUG_SANEI_USB=255

 and

 [blah:~] blah% scanimage -T

 appears to complete successfully, but


 [blah:~] blah% scanimage test.pnm

 hangs the terminal window, not ever giving me back a command prompt.
 The debugging information is extensive and too much to provided
 completely here, but here are the last few lines.


 
 [plustek] usb_ScanReadImage() done, result: 0
 [plustek] sane_read - read 744 bytes
 [plustek] sane_read - read 744 bytes
 [plustek] usb_ReadData()
 [plustek] usb_ScanReadImage(2988)
 [sanei_usb] sanei_usb_write_bulk: trying to write 4 bytes
 [sanei_usb] : 01 00 0B AC
 
 usb_bulk_write: ep addr = 0x03
 Converting ep address to pipeRef.
 ep_to_pipeRef: Pipe 1: DIR: 1 number: 1
 ep_to_pipeRef: Pipe 2: DIR: 1 number: 2
 ep_to_pipeRef: Pipe 3: DIR: 0 number: 3
 ep_to_pipeRef: pipeRef for ep address 0x03 found: 0x03
 usb_bulk_write: endpoint=0x03 size=4 timeout=3 ms
 read/write completed, result=0, size=4
 [sanei_usb] sanei_usb_write_bulk: wanted 4 bytes, wrote 4 bytes
 [sanei_usb] sanei_usb_read_bulk: trying to read 2988 bytes
 usb_bulk_read: ep addr = 0x82
 Converting ep address to pipeRef.
 ep_to_pipeRef: Pipe 1: DIR: 1 number: 1
 ep_to_pipeRef: Pipe 2: DIR: 1 number: 2
 ep_to_pipeRef: pipeRef for ep address 0x82 found: 0x02
 usb_bulk_read: endpoint=0x82 size=2988 timeout=3 ms
 read/write completed, result=0, size=2988
 [sanei_usb] : BA A7 BD D5 DC DE DF E1 E6 E6 E5 E6 E5 E6 EA EA
 
 [sanei_usb] 0010: EA EA E8 E8 EA E8 E9 EC EC EB EA EC EB E7 E5 E9
 
 [sanei_usb] 0020: E8 E8 E8 E8 EA F1 F1 EC EA E8 E8 E7 E9 E5 E6 E8
 
 ...
 bunch of [sanei_usb]  removed. Didn't seem to add much to the getting
 to the problem.
 ...
 [sanei_usb] 0AD0: 54 53 4C 44 40 3A 30 32 2E 2C 2E 2C 2C 28 2A 29
 TSLD@:02.,.,,(*)
 [sanei_usb] 0AE0: 27 24 27 26 28 29 29 29 29 2D 28 28 2C 25 27 28
 '$'(-((,%'(
 [sanei_usb] 0AF0: 26 25 27 21 2A 1F 23 1F 21 2A 31 32 29 2A 2A 27
 %'!*.#.!*12)**'
 [sanei_usb] 0B00: 30 2D 29 21 12 28 36 3F 44 43 42 40 28 49 26 33
 0-)!.(6?DCB@(I3
 [sanei_usb] 0B10: 3A 35 2F 3E 3C 33 34 41 36 3A 40 34 3F 3E 38 4B

 :5/34A6:@4?8K

 [sanei_usb] 0B20: 49 40 3E 33 40 4C 54 CF FF FF FF FF FF FF E4 6B
 I@3@LTk
 [sanei_usb] 0B30: 49 46 3D 36 22 34 29 2D 2E 29 32 34 3B 36 4A 5B
 IF=64)-.)24;6J[
 [sanei_usb] 0B40: 7D D5 FA FF FF FF FF FF FF FF FF FF FF FF FF FF
 }...
 [sanei_usb] 0B50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
 
 [sanei_usb] 0B60: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
 
 [sanei_usb] 0B70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
 
 [sanei_usb] 0B80: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
 
 [sanei_usb] 0B90: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
 
 [sanei_usb] 0BA0: FF FF FF FF FF FF FF FF FF FF 00 71
 ...q
 [sanei_usb] sanei_usb_read_bulk: wanted 2988 bytes, got 2988 bytes
 [plustek] usb_ScanReadImage() done, result: 0
 [plustek] sane_read - read 744 bytes
 [plustek] reader_process: finished