# Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 "", arg=0x0) at mustek.c:604

From: Henning Meier-Geinitz (hmg-ml@gmx.de)
Date: Wed Nov 01 2000 - 12:25:20 PST

- Next message: Yuri Dario: "Re: SANE on OS/2 (Was: new snapscan user)"
  - Previous message: Henning Meier-Geinitz: "Re: X-Frontends (xscanimage+xcam) and sane-1.0.4"
  - In reply to: Andreas Klemm: "SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 "", arg=0x0) at mustek.c:604"
  - Next in thread: Andreas Klemm: "Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 "", arg=0x0) at mustek.c:604"
  - Reply: Andreas Klemm: "Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 "", arg=0x0) at mustek.c:604"
  - Reply: Andreas Klemm: "Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 "", arg=0x0) at mustek.c:604"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  Hi,

  On Wed, Nov 01, 2000 at 03:33:10PM +0100, Andreas Klemm wrote:
  > xsane and xscanimage core dump after approx. scanning 75% of an image.
  > I compiled sane and xsane with debugging symbols and below you can
  > see, what sense code the application got in mustek.c ...

  This is really a high-quality bug report :-) Nearly every information
  I can think of is provided. This is SANE 1.0.3, isn't it? There is a
  bug in the Mustek backend; result and arg aren't checked for NULL
  before they are dereferenced. This bug is fixed in the CVS version of
  SANE and the bugfix will be in SANE 1.0.4. The code at the beginning
  of sense_handler() now is something like this:

  if (!result)
  {
  DBG(5, "sense_handler: no sense buffer\n");
  return SANE_STATUS_IO_ERROR;
  }
  if (!arg)
  DBG(5, "sense_handler: got sense code %02x for fd %d (arg = null)\n",
  result[0], scsi_fd);
  else
  DBG(5, "sense_handler: got sense code %02x for fd %d (arg = %uc)\n",
  result[0], scsi_fd, *(unsigned char*) arg);

  instead of
  DBG(5, "sense_handler: got sense code %02x for fd %d (arg = %uc)\n",
  result[0], scsi_fd, *(unsigned char*) arg);
  I don't know if this is the solution to your problem. Give it a try.
  The segfault happens after a call to stop_scan so the scan should be
  finished at this point.

  If this doesn't help, try a new Mustek-backend from
  http://hmg.home.pages.de/sane/ .

  > I use the Centronix port on the scanner. Do I need perhaps to terminate
  > on the 25 pol. connector ???

  That's the end of the SCSI chain so it must be terminated. However, in
  my experience the scanner works without termination if it's the only
  device on the controller.
  > With the AHA2940U automatic termination and termination on caused
  > no problem. I already set SCSI speed to 10 MB/sec. and the devices
  > speed to 5 MB and no sync transfers.

  With some scanners and some SCSI drivers it seems to be necessary to
  deactivate SCSI disconnection but I don't think that's true in this
  case.

  > Do I have a termination problem ???? Any idea ???

  I don't think so but you never know. If scanning doesn't work after
  using the new backend, please try

  SANE_DEBUG_MUSTEK=5 xsane 2>dbg.log

  Scan an image and send the resulting dbg.log to me.

  > Do I need to put a terminator on the Scanner onto the 25 pol adapter
  > or is the scanner auto terminated ???

  The scanner is not auto terminated.

  Ciao,
  Henning

      --
      Source code, list archive, and docs: http://www.mostang.com/sane/
      To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

  - Next message: Yuri Dario: "Re: SANE on OS/2 (Was: new snapscan user)"
  - Previous message: Henning Meier-Geinitz: "Re: X-Frontends (xscanimage+xcam) and sane-1.0.4"
  - In reply to: Andreas Klemm: "SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 "", arg=0x0) at mustek.c:604"
  - Next in thread: Andreas Klemm: "Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 "", arg=0x0) at mustek.c:604"
  - Reply: Andreas Klemm: "Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 "", arg=0x0) at mustek.c:604"
  - Reply: Andreas Klemm: "Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 "", arg=0x0) at mustek.c:604"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  This archive was generated by hypermail 2b29 : Wed Nov 01 2000 - 14:42:19 PST