kopia lustrzana https://gitlab.com/sane-project/website
184 wiersze
6.4 KiB
HTML
184 wiersze
6.4 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
||
|
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
||
|
<HTML>
|
||
|
<HEAD>
|
||
|
<TITLE>sane-devel: Re: seg-faults for network access</TITLE>
|
||
|
<META NAME="Author" CONTENT="Jochen Eisinger (jochen.eisinger@gno.de)">
|
||
|
<META NAME="Subject" CONTENT="Re: seg-faults for network access">
|
||
|
</HEAD>
|
||
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
||
|
<H1>Re: seg-faults for network access</H1>
|
||
|
<!-- received="Sun Dec 10 05:35:00 2000" -->
|
||
|
<!-- isoreceived="20001210133500" -->
|
||
|
<!-- sent="Sun, 10 Dec 2000 14:36:48 +0100" -->
|
||
|
<!-- isosent="20001210133648" -->
|
||
|
<!-- name="Jochen Eisinger" -->
|
||
|
<!-- email="jochen.eisinger@gno.de" -->
|
||
|
<!-- subject="Re: seg-faults for network access" -->
|
||
|
<!-- id="3A3386F0.1E7BD672@gno.de" -->
|
||
|
<!-- inreplyto="20001209213618.C6330@lug.calpoly.edu" -->
|
||
|
<STRONG>From:</STRONG> Jochen Eisinger (<A HREF="mailto:jochen.eisinger@gno.de?Subject=Re:%20seg-faults%20for%20network%20access&In-Reply-To=<3A3386F0.1E7BD672@gno.de>"><EM>jochen.eisinger@gno.de</EM></A>)<BR>
|
||
|
<STRONG>Date:</STRONG> Sun Dec 10 2000 - 05:36:48 PST
|
||
|
<P>
|
||
|
<!-- next="start" -->
|
||
|
<LI><STRONG>Next message:</STRONG> <A HREF="0101.html">Jochen Eisinger: "Re: seg-faults for network access"</A>
|
||
|
<UL>
|
||
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0099.html">Marko Cebokli: "UMAX transparency adapter / averaging"</A>
|
||
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0091.html">Daniel Kerry Hiltgen: "seg-faults for network access"</A>
|
||
|
<!-- nextthread="start" -->
|
||
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0101.html">Jochen Eisinger: "Re: seg-faults for network access"</A>
|
||
|
<LI><STRONG>Reply:</STRONG> <A HREF="0101.html">Jochen Eisinger: "Re: seg-faults for network access"</A>
|
||
|
<!-- reply="end" -->
|
||
|
<LI><STRONG>Messages sorted by:</STRONG>
|
||
|
<A HREF="date.html#100">[ date ]</A>
|
||
|
<A HREF="index.html#100">[ thread ]</A>
|
||
|
<A HREF="subject.html#100">[ subject ]</A>
|
||
|
<A HREF="author.html#100">[ author ]</A>
|
||
|
</UL>
|
||
|
<HR NOSHADE><P>
|
||
|
<!-- body="start" -->
|
||
|
<P>
|
||
|
Hi!
|
||
|
<BR>
|
||
|
<P>[Daniel Kerry Hiltgen]
|
||
|
<BR>
|
||
|
<EM>> Does anyone know if saned and the network protocol is byte order clean,
|
||
|
</EM><BR>
|
||
|
<EM>> independent of the underlying architecture? (just a hunch...)
|
||
|
</EM><BR>
|
||
|
The protocol itself is byte order clean, but not the image date
|
||
|
<BR>
|
||
|
transfer...
|
||
|
<BR>
|
||
|
<P><EM>> I've got my scanner hooked up to a Sun Sparc (running linux), and I'm
|
||
|
</EM><BR>
|
||
|
<EM>> trying to access it from an x86 box. Local scans on the sparc seem to
|
||
|
</EM><BR>
|
||
|
<EM>> work, but it's headless/no X so I really want to use my desktop machine
|
||
|
</EM><BR>
|
||
|
<EM>> to do real scans.
|
||
|
</EM><BR>
|
||
|
Do local scans work or scans over localhost?
|
||
|
<BR>
|
||
|
<P>For debugging saned/net use the following:
|
||
|
<BR>
|
||
|
<P>Start saned from commandline as
|
||
|
<BR>
|
||
|
<P># export SANE_DEBUG_YOURBACKEND=128
|
||
|
<BR>
|
||
|
# saned -d128
|
||
|
<BR>
|
||
|
<P>and start scanimage on the other pc as
|
||
|
<BR>
|
||
|
<P>$ export SANE_DEBUG_NET=128
|
||
|
<BR>
|
||
|
$ scanimage -L
|
||
|
<BR>
|
||
|
<P>note that saned also produces output for syslog.
|
||
|
<BR>
|
||
|
<P>In your case, I think, saned isn't even accessed by the net backend...
|
||
|
<BR>
|
||
|
maybe your client has no access rights on the saned port on your sparc?
|
||
|
<BR>
|
||
|
<P><EM>> Here's one stack trace of the seg-fault. (I get roughly the same stack
|
||
|
</EM><BR>
|
||
|
<EM>> in scanimage -L, xsane, and xscanimage)
|
||
|
</EM><BR>
|
||
|
This is always the same... sanei_w_space can't read from the pipe and
|
||
|
<BR>
|
||
|
returns. The next call to sanei_w_space generates a sig11... I've
|
||
|
<BR>
|
||
|
attached a simple patch, maybe you get a better error-msg with this one.
|
||
|
<BR>
|
||
|
<P><EM>> Any thoughts? Can I provide more information that might be helpful in
|
||
|
</EM><BR>
|
||
|
<EM>> diagnosing the problem? (FWIW: Mustek 1200 LS)
|
||
|
</EM><BR>
|
||
|
<P>Could you please try this patch? and if it works (e.g. doesn't segfault
|
||
|
<BR>
|
||
|
anymore), please send the output from saned & scanimage... thanks
|
||
|
<BR>
|
||
|
<P>BTW. the patch was made against the current cvs tree but it should also
|
||
|
<BR>
|
||
|
work with SANE 1.0.3.
|
||
|
<BR>
|
||
|
<P>-- jochen
|
||
|
<BR>
|
||
|
|
||
|
<BR><P>
|
||
|
--- ../sane/sane-backends/sanei/sanei_wire.c Sat Aug 12 17:11:37 2000
|
||
|
<BR>
|
||
|
+++ sane-backends/sanei/sanei_wire.c Sun Dec 10 12:38:19 2000
|
||
|
<BR>
|
||
|
@@ -56,6 +56,9 @@
|
||
|
<BR>
|
||
|
int fd = w->io.fd;
|
||
|
<BR>
|
||
|
ssize_t nread, nwritten;
|
||
|
<BR>
|
||
|
|
||
|
<BR>
|
||
|
+ if (w->status != 0)
|
||
|
<BR>
|
||
|
+ return;
|
||
|
<BR>
|
||
|
+
|
||
|
<BR>
|
||
|
if (w->buffer.curr + howmuch > w->buffer.end)
|
||
|
<BR>
|
||
|
{
|
||
|
<BR>
|
||
|
switch (w->direction)
|
||
|
<BR>
|
||
|
@@ -80,6 +83,8 @@
|
||
|
<BR>
|
||
|
|
||
|
<BR>
|
||
|
case WIRE_DECODE:
|
||
|
<BR>
|
||
|
left_over = w->buffer.end - w->buffer.curr;
|
||
|
<BR>
|
||
|
+ if ((signed) (left_over < 0))
|
||
|
<BR>
|
||
|
+ return;
|
||
|
<BR>
|
||
|
if (left_over)
|
||
|
<BR>
|
||
|
memcpy (w->buffer.start, w->buffer.curr, left_over);
|
||
|
<BR>
|
||
|
w->buffer.curr = w->buffer.start;
|
||
|
<BR>
|
||
|
<P><P><P><P><P><PRE>
|
||
|
--
|
||
|
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
|
||
|
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20seg-faults%20for%20network%20access&In-Reply-To=<3A3386F0.1E7BD672@gno.de>">majordomo@mostang.com</A>
|
||
|
</PRE>
|
||
|
<P><!-- body="end" -->
|
||
|
<HR NOSHADE>
|
||
|
<UL>
|
||
|
<!-- next="start" -->
|
||
|
<LI><STRONG>Next message:</STRONG> <A HREF="0101.html">Jochen Eisinger: "Re: seg-faults for network access"</A>
|
||
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0099.html">Marko Cebokli: "UMAX transparency adapter / averaging"</A>
|
||
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0091.html">Daniel Kerry Hiltgen: "seg-faults for network access"</A>
|
||
|
<!-- nextthread="start" -->
|
||
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0101.html">Jochen Eisinger: "Re: seg-faults for network access"</A>
|
||
|
<LI><STRONG>Reply:</STRONG> <A HREF="0101.html">Jochen Eisinger: "Re: seg-faults for network access"</A>
|
||
|
<!-- reply="end" -->
|
||
|
<LI><STRONG>Messages sorted by:</STRONG>
|
||
|
<A HREF="date.html#100">[ date ]</A>
|
||
|
<A HREF="index.html#100">[ thread ]</A>
|
||
|
<A HREF="subject.html#100">[ subject ]</A>
|
||
|
<A HREF="author.html#100">[ author ]</A>
|
||
|
</UL>
|
||
|
<!-- trailer="footer" -->
|
||
|
<HR NOSHADE>
|
||
|
<P>
|
||
|
<SMALL>
|
||
|
<EM>
|
||
|
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
|
||
|
: <EM>Sun Dec 10 2000 - 05:36:18 PST</EM>
|
||
|
</EM>
|
||
|
</SMALL>
|
||
|
</BODY>
|
||
|
</HTML>
|