[sane-devel] Erratic problems with saned/xsane

John Coppens jcoppens at usa.net
Sat Dec 7 15:14:37 GMT 2002


Hallo Henning...

I'll try to clear up things... Mind, I'm not a software guru, so I might
need a hand with some things.

On Sat, 7 Dec 2002 13:25:37 +0100
Henning Meier-Geinitz <henning at meier-geinitz.de> wrote:

> Hi,
> 
> On Sat, Dec 07, 2002 at 01:47:17AM -0300, John Coppens wrote:
> > Xsane starts up well, even though I'd rather have have it _not_ check
> > the parallel port, if I mean to have it run through the daemon. I didn't
> > find how to do that.
> 
> I have never tried that but you could play with permissions of the
> epson.conf file and/or libsane-epson.so.version. Setting them so only
> saned can load the backend may work.

Ok. I'll try that this afternoon - the PC is at the Foundation, so I
can't do it right now. Could the double access (xsane -> parallel port,
and saned -> parallel port) have something to do with the erratic
behaviour?

> 
> Another way would be to link xsane to the net backend directly,
> without using libsane-dll.

Don't know how to do that... But I'll have a look. It would be easier
to use afterwards, I think.

> 
> > But then, communication between saned and xsane seems to be very
> > unreliable. Erratically, I get the famous 'invalid argument' messages,
> > when I try for example to change the mode from gray to color, or change
> > the resolution. It's just unpredictable. Sometimes it works, sometimes
> > not. I restarted xsane many times, and each time it behaves differently.
> > Sometimes it works completely, sometimes not al all.
> 
> Can you go on after such an error without restarting xsane? Or does
> every other action fail after the first error? Does scanning work,
> even if errors occured before? Do the errors onlöy occur when
> setting/reading options?

For example: Xsane comes up in Binary Mode (1bit), I try to change to
color or gray and get the 'invalid parameters' error. Yes, I can still
give the order to scan, for example. And even though the error was
signalled, the menu now shows Color or Gray. The scanner scans Binary.

Sometimes, it's the scan command that fails with the same message. It's
as if the backend doesn't relay the capabilities reliably to the xsane
frontend. Could this be a reliability issue for the comm thru the parallel
port? Or are these exchanges checksummed & tested?

> 
> > All versions are the last ones - fresly downloaded. Kernel is 2.4.18,
> > and the scanner is an Epson ActionScanner II (GT-5000M). All points
> > to unreliable comm between xsane and saned...
> 
> The communication flow is like this:
> 
> xsane <- linking -> libsane-dll <- dynamic loading -> libsane-net <- network
> network -> saned <- linking -> libsane-dll <- dynamic loading -> libsane-epson

No wonder someone gets confused ;-)
BTW, I'm not scanning over a network. I use 'localhost' here.

> 
> I guess it doesn't happen when you don't use saned, but access the
> epson backend directly?

Everything works fine when I call xsane as root directly. But I don't
like the idea of letting users use xsane as root. Also, images saved
are saved with root priviledges, which cause a lot of confusion
later. I can't simply suid xsane - GTK won't let me. I haven't looked
into the possibility of the 'helper' application indicated by GTK.

> 
> Do you get the same problems with other frontends (xscanimage,
> quiteinsane, scanimage)? No? -> xsane problem (unlikely)

Didn't have time yet - will do this afternoon.

> 
> Does it happen with other backends? If you don't have other scan
> hardware, try the "test" backend. It does also happen? --> bug in
> saned or net. I think that's unlikely, too, but I'm biased. We had
> bugs in saned/net before but they resulted in crashes.

Will do... I don't have other hardware.

> 
> You can try if it happens in debug mode, too. Comment out saned in
> inetd.conf, restart inetd, and run saned in daemon mode from the
> command line: saned -d128
> This will also enable debug messages. If the problem occurs in this
> mode, too, you can also set epson debugging:
> 
> SANE_DEBUG_EPSON=128 saned -d128
> 
> Please send us a debug log of a session where such an invalid argument
> error occured.
> 
> Please also enable debugging on the client side:
> 
> SANE_DEBUG_NET=255 xsane
> 
> Please also send this log (of the same xsane session).

Will do all that - but I guess it will be long. Shall I send it 
personal?

Thanks
John

> 
> Bye,
>   Henning
> _______________________________________________
> Sane-devel mailing list
> Sane-devel at www.mostang.com
> http://www.mostang.com/mailman/listinfo/sane-devel



More information about the sane-devel mailing list