sane-project-website/old-archive/2000-11/0014.html

184 wiersze
7.7 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: SIGSEGV in sense_handler (scsi_fd=0, result=0x8</TITLE>
<META NAME="Author" CONTENT="Henning Meier-Geinitz (hmg-ml@gmx.de)">
<META NAME="Subject" CONTENT="Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 &quot;&quot;, arg=0x0) at mustek.c:604">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 &quot;&quot;, arg=0x0) at mustek.c:604</H1>
<!-- received="Wed Nov 1 14:38:12 2000" -->
<!-- isoreceived="20001101223812" -->
<!-- sent="Wed, 1 Nov 2000 21:25:20 +0100" -->
<!-- isosent="20001101202520" -->
<!-- name="Henning Meier-Geinitz" -->
<!-- email="hmg-ml@gmx.de" -->
<!-- subject="Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 &quot;&quot;, arg=0x0) at mustek.c:604" -->
<!-- id="20001101212520.D18944@vortex.swb.de" -->
<!-- inreplyto="20001101153310.A99442@titan.klemm.gtn.com" -->
<STRONG>From:</STRONG> Henning Meier-Geinitz (<A HREF="mailto:hmg-ml@gmx.de?Subject=Re:%20SIGSEGV%20in%20sense_handler%20(scsi_fd=0,%20result=0x831d470%20&quot;&quot;,%20arg=0x0)%20at%20mustek.c:604&In-Reply-To=&lt;20001101212520.D18944@vortex.swb.de&gt;"><EM>hmg-ml@gmx.de</EM></A>)<BR>
<STRONG>Date:</STRONG> Wed Nov 01 2000 - 12:25:20 PST
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0015.html">Yuri Dario: "Re: SANE on OS/2 (Was: new snapscan user)"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0013.html">Henning Meier-Geinitz: "Re: X-Frontends (xscanimage+xcam) and sane-1.0.4"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0002.html">Andreas Klemm: "SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 &quot;&quot;, arg=0x0) at mustek.c:604"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0031.html">Andreas Klemm: "Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 &quot;&quot;, arg=0x0) at mustek.c:604"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0031.html">Andreas Klemm: "Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 &quot;&quot;, arg=0x0) at mustek.c:604"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0066.html">Andreas Klemm: "Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 &quot;&quot;, arg=0x0) at mustek.c:604"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#14">[ date ]</A>
<A HREF="index.html#14">[ thread ]</A>
<A HREF="subject.html#14">[ subject ]</A>
<A HREF="author.html#14">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Hi,
<BR>
<P>On Wed, Nov 01, 2000 at 03:33:10PM +0100, Andreas Klemm wrote:
<BR>
<EM>&gt; xsane and xscanimage core dump after approx. scanning 75% of an image.
</EM><BR>
<EM>&gt; I compiled sane and xsane with debugging symbols and below you can
</EM><BR>
<EM>&gt; see, what sense code the application got in mustek.c ...
</EM><BR>
<P>This is really a high-quality bug report :-) Nearly every information
<BR>
I can think of is provided. This is SANE 1.0.3, isn't it? There is a
<BR>
bug in the Mustek backend; result and arg aren't checked for NULL
<BR>
before they are dereferenced. This bug is fixed in the CVS version of
<BR>
SANE and the bugfix will be in SANE 1.0.4. The code at the beginning
<BR>
of sense_handler() now is something like this:
<BR>
<P>&nbsp;&nbsp;if (!result)
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DBG(5, &quot;sense_handler: no sense buffer\n&quot;);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return SANE_STATUS_IO_ERROR;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<BR>
&nbsp;&nbsp;if (!arg)
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;DBG(5, &quot;sense_handler: got sense code %02x for fd %d (arg = null)\n&quot;,
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result[0], scsi_fd);
<BR>
&nbsp;&nbsp;else
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;DBG(5, &quot;sense_handler: got sense code %02x for fd %d (arg = %uc)\n&quot;,
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result[0], scsi_fd, *(unsigned char*) arg);
<BR>
<P>instead of
<BR>
&nbsp;&nbsp;
<BR>
&nbsp;&nbsp;DBG(5, &quot;sense_handler: got sense code %02x for fd %d (arg = %uc)\n&quot;,
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result[0], scsi_fd, *(unsigned char*) arg);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>
I don't know if this is the solution to your problem. Give it a try.
<BR>
The segfault happens after a call to stop_scan so the scan should be
<BR>
finished at this point.
<BR>
<P>If this doesn't help, try a new Mustek-backend from
<BR>
<A HREF="http://hmg.home.pages.de/sane/">http://hmg.home.pages.de/sane/</A> .
<BR>
<P><EM>&gt; I use the Centronix port on the scanner. Do I need perhaps to terminate
</EM><BR>
<EM>&gt; on the 25 pol. connector ???
</EM><BR>
<P>That's the end of the SCSI chain so it must be terminated. However, in
<BR>
my experience the scanner works without termination if it's the only
<BR>
device on the controller.
<BR>
&nbsp;
<BR>
<EM>&gt; With the AHA2940U automatic termination and termination on caused
</EM><BR>
<EM>&gt; no problem. I already set SCSI speed to 10 MB/sec. and the devices
</EM><BR>
<EM>&gt; speed to 5 MB and no sync transfers.
</EM><BR>
<P>With some scanners and some SCSI drivers it seems to be necessary to
<BR>
deactivate SCSI disconnection but I don't think that's true in this
<BR>
case.
<BR>
<P><EM>&gt; Do I have a termination problem ???? Any idea ???
</EM><BR>
<P>I don't think so but you never know. If scanning doesn't work after
<BR>
using the new backend, please try
<BR>
<P>SANE_DEBUG_MUSTEK=5 xsane 2&gt;dbg.log
<BR>
<P>Scan an image and send the resulting dbg.log to me.
<BR>
<P><EM>&gt; Do I need to put a terminator on the Scanner onto the 25 pol adapter
</EM><BR>
<EM>&gt; or is the scanner auto terminated ???
</EM><BR>
<P>The scanner is not auto terminated.
<BR>
<P>Ciao,
<BR>
&nbsp;&nbsp;Henning
<BR>
<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:%20SIGSEGV%20in%20sense_handler%20(scsi_fd=0,%20result=0x831d470%20&quot;&quot;,%20arg=0x0)%20at%20mustek.c:604&In-Reply-To=&lt;20001101212520.D18944@vortex.swb.de&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0015.html">Yuri Dario: "Re: SANE on OS/2 (Was: new snapscan user)"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0013.html">Henning Meier-Geinitz: "Re: X-Frontends (xscanimage+xcam) and sane-1.0.4"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0002.html">Andreas Klemm: "SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 &quot;&quot;, arg=0x0) at mustek.c:604"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0031.html">Andreas Klemm: "Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 &quot;&quot;, arg=0x0) at mustek.c:604"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0031.html">Andreas Klemm: "Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 &quot;&quot;, arg=0x0) at mustek.c:604"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0066.html">Andreas Klemm: "Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 &quot;&quot;, arg=0x0) at mustek.c:604"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#14">[ date ]</A>
<A HREF="index.html#14">[ thread ]</A>
<A HREF="subject.html#14">[ subject ]</A>
<A HREF="author.html#14">[ 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>Wed Nov 01 2000 - 14:42:19 PST</EM>
</EM>
</SMALL>
</BODY>
</HTML>