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

From: Andreas Klemm (andreas@klemm.gtn.com)
Date: Wed Nov 01 2000 - 06:33:10 PST

- Next message: mh: "bug(?) in installation"
  - Previous message: Paul Floyd: "Re: SANE on OS/2 (Was: new snapscan user)"
  - Next in thread: Henning Meier-Geinitz: "Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 "", arg=0x0) at mustek.c:604"
  - Reply: Henning Meier-Geinitz: "Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 "", arg=0x0) at mustek.c:604"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  Hi !

  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 ...

  I have FreeBSD 4.2-BETA machine. SMP kernel.
  The Scanner is a Mustek Paragon 1200SP.
  The scanner is external connected via a high quality SCSI cable
  with gold contacts. The cable is ~0.5m long. Its connected to a
  AHA2940U controller.

  The FreeBSD OS runs over EIDE disk. So no interference with the scanner.
  Internally I only have connected 3 devices (CD, burner, SCSI streamer).

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

  I already tried another controller AHA2940AU. With that controller I
  has to enable termination, otherwise the SCSI bus and the whole
  machine hang, when adaptec controller tries to scan for devices....

  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.

  Nothing helps ... The application always gets the core dump when
  scanning a text in. I used low resolution 90-300 dpi and different
  scan modes (color, line, greyscale), this doesn't change enything.

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

  Terminated? Terminated!
  Scanner --cable-- AHA2940U - Streamer - CD-ROM -- CD-Burner
  0.5m ~1m

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

  Thanks for any pointer !

  Andreas ///

  root@titan{609} $ gdb /usr/ports/graphics/xsane/work/xsane-0.61/src/xsane
  GNU gdb 4.18
  Copyright 1998 Free Software Foundation, Inc.
  GDB is free software, covered by the GNU General Public License, and you are
  welcome to change it and/or distribute copies of it under certain conditions.
  Type "show copying" to see the conditions.
  There is absolutely no warranty for GDB. Type "show warranty" for details.
  This GDB was configured as "i386-unknown-freebsd"...
  (gdb) r
  Starting program: /usr/ports/graphics/xsane/work/xsane-0.61/src/xsane
  /usr/ports/graphics/xsane/work/xsane-0.61/src/xsane is a gimp plug-in and must be run by the gimp to be used

  Program received signal SIGSEGV, Segmentation fault.
  0x284b2c29 in sense_handler (scsi_fd=0, result=0x831d470 "", arg=0x0)
  at mustek.c:604
  604 DBG(5, "sense_handler: got sense code %02x for fd %d (arg = %uc)\n",
  (gdb) bt
  #0 0x284b2c29 in sense_handler (scsi_fd=0, result=0x831d470 "", arg=0x0)
  at mustek.c:604
  #1 0x284bd03c in sanei_scsi_cmd2 () at sanei_scsi.c:2588
  #2 0x284bd607 in sanei_scsi_cmd () at sanei_scsi.c:2588
  #3 0x284b295e in dev_cmd (s=0x80ed000, src=0x284bd792, src_size=6, dst=0x0,
  dst_size=0x0) at mustek.c:500
  #4 0x284b5cce in stop_scan (s=0x80ed000) at mustek.c:2218
  #5 0x284b5eed in do_stop (s=0x80ed000) at mustek.c:2284
  #6 0x284baf8a in sane_mustek_read () at mustek.c:4018
  #7 0x2832d6ac in sane_dll_read () at dll.c:472
  #8 0x2832d8dc in sane_read () at dll-s.c:35
  #9 0x805b135 in preview_read_image_data (data=0x814e000, source=33,
  cond=GDK_INPUT_READ) at xsane-preview.c:1202
  #10 0x281fd2a0 in gdk_io_invoke () from /usr/X11R6/lib/libgdk12.so.2
  #11 0x2822a5ac in g_io_unix_dispatch () from /usr/local/lib/libglib12.so.3
  #12 0x2822bc57 in g_main_dispatch () from /usr/local/lib/libglib12.so.3
  #13 0x2822c280 in g_main_iterate () from /usr/local/lib/libglib12.so.3
  #14 0x2822c418 in g_main_run () from /usr/local/lib/libglib12.so.3
  #15 0x2814ef9b in gtk_main () from /usr/X11R6/lib/libgtk12.so.2
  #16 0x807d018 in xsane_interface (argc=1, argv=0xbfbff9e4) at xsane.c:5277
  #17 0x807d445 in main (argc=1, argv=0xbfbff9e4) at xsane.c:5393
  #18 0x804ff55 in _start ()
  (gdb) l
  599 }
  600
  601 static SANE_Status
  602 sense_handler (int scsi_fd, u_char *result, void *arg)
  603 {
  604 DBG(5, "sense_handler: got sense code %02x for fd %d (arg = %uc)\n",
  605 result[0], scsi_fd, *(unsigned char*) arg);
  606 switch (result[0])
  607 {
  608 case 0x00:
  (gdb) display scsi_fd
  1: scsi_fd = 0
  (gdb) display result
  2: result = (u_char *) 0x831d470 ""
  (gdb) display *result
  3: *result = 0 '\000'
  (gdb) display result[0]
  4: result[0] = 0 '\000'
  (gdb) l

  FreeBSD titan.klemm.gtn.com 4.2-BETA FreeBSD 4.2-BETA #0: Tue Oct 31 20:47:52 CET 2000 root@titan.klemm.gtn.com:/usr/src/sys/compile/TITAN i386

  Copyright (c) 1992-2000 The FreeBSD Project.
  Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
  The Regents of the University of California. All rights reserved.
  FreeBSD 4.2-BETA #0: Tue Oct 31 20:47:52 CET 2000
  root@titan.klemm.gtn.com:/usr/src/sys/compile/TITAN
  Timecounter "i8254" frequency 1193182 Hz
  CPU: Pentium Pro (199.43-MHz 686-class CPU)
  Origin = "GenuineIntel" Id = 0x619 Stepping = 9
  Features=0xfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV>
  real memory = 159383552 (155648K bytes)
  avail memory = 150970368 (147432K bytes)
  Programming 24 pins in IOAPIC #0
  IOAPIC #0 intpin 2 -> irq 0
  IOAPIC #0 intpin 16 -> irq 15
  IOAPIC #0 intpin 17 -> irq 11
  IOAPIC #0 intpin 18 -> irq 10
  IOAPIC #0 intpin 19 -> irq 14
  FreeBSD/SMP: Multiprocessor motherboard
  cpu0 (BSP): apic id: 0, version: 0x00040011, at 0xfee00000
  cpu1 (AP): apic id: 1, version: 0x00040011, at 0xfee00000
  io0 (APIC): apic id: 2, version: 0x00170011, at 0xfec00000
  Preloaded elf kernel "kernel" at 0xc03c9000.
  Preloaded userconfig_script "/boot/kernel.conf" at 0xc03c909c.
  VESA: v2.0, 4096k memory, flags:0x1, mode table:0xc0355c62 (1000022)
  VESA: Matrox Graphics Inc.
  Pentium Pro MTRR support enabled
  md0: Malloc disk
  npx0: <math processor> on motherboard
  npx0: INT 16 interface
  pcib0: <Host to PCI bridge> on motherboard
  pci0: <PCI bus> on pcib0
  isab0: <Intel 82371SB PCI to ISA bridge> at device 7.0 on pci0
  isa0: <ISA bus> on isab0
  atapci0: <Intel PIIX3 ATA controller> at device 7.1 on pci0
  pci0: <Matrox MGA Millennium 2064W graphics accelerator> at 10.0
  pcm0: <Creative EMU10K1> port 0x9400-0x941f irq 14 at device 11.0 on pci0
  fxp0: <Intel Pro 10/100B/100+ Ethernet> port 0x9c00-0x9c3f mem 0xe2000000-0xe20fffff,0xe2121000-0xe2121fff irq 10 at device 12.0 on pci0
  fxp0: Ethernet address 00:d0:b7:ba:c1:c2
  ahc0: <Adaptec 2940 Ultra SCSI adapter> port 0xa000-0xa0ff mem 0xe2120000-0xe2120fff irq 11 at device 13.0 on pci0
  aic7880: Single Channel A, SCSI Id=7, 16/255 SCBs
  atapci1: <Promise ATA100 controller> port 0xb400-0xb43f,0xb000-0xb003,0xac00-0xac07,0xa800-0xa803,0xa400-0xa407 mem 0xe2100000-0xe211ffff irq 15 at device 14.0 on pci0
  ata2: at 0xa400 on atapci1
  ata3: at 0xac00 on atapci1
  fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
  fdc0: FIFO enabled, 8 bytes threshold
  fd0: <1440-KB 3.5" drive> on fdc0 drive 0
  atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
  atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
  kbd0 at atkbd0
  psm0: <PS/2 Mouse> irq 12 on atkbdc0
  psm0: model Generic PS/2 mouse, device ID 0
  vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
  sc0: <System console> at flags 0x100 on isa0
  sc0: VGA <4 virtual consoles, flags=0x300>
  sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
  sio0: type 16550A
  sio1 at port 0x2f8-0x2ff irq 3 on isa0
  sio1: type 16550A
  ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
  ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
  ppc0: FIFO with 16/16/15 bytes threshold
  ppbus0: IEEE1284 device found /NIBBLE/ECP
  Probing for PnP devices on ppbus0:
  ppbus0: <HEWLETT-PACKARD DESKJET 970C> MLC,PCL,PML
  ppi0: <Parallel I/O> on ppbus0
  lpt0: <Printer> on ppbus0
  lpt0: Interrupt-driven port
  ahc0: Someone reset channel A
  APIC_IO: Testing 8254 interrupt delivery
  APIC_IO: routing 8254 via IOAPIC #0 intpin 2
  DUMMYNET initialized (000608)
  IPv6 packet filtering initialized, logging limited to 100 packets/entry
  IP packet filtering initialized, divert disabled, rule-based forwarding enabled, default to deny, logging limited to 100 packets/entry by default
  IPsec: Initialized Security Association Processing.
  SMP: AP CPU #1 Launched!
  ad4: 43979MB <IBM-DTLA-307045> [89355/16/63] at ata2-master UDMA100
  Waiting 8 seconds for SCSI devices to settle
  sa0 at ahc0 bus 0 target 4 lun 0
  sa0: <TANDBERG TDC 4222 =07:> Removable Sequential Access SCSI-2 device
  sa0: 4.807MB/s transfers (4.807MHz, offset 8)
  pass0 at ahc0 bus 0 target 3 lun 0
  pass0: <SCANNER 1.02> Fixed Scanner SCSI-CCS device
  pass0: 3.300MB/s transfers
  Mounting root from ufs:/dev/ad4s2a
  cd0 at ahc0 bus 0 target 5 lun 0
  cd0: <TOSHIBA CD-ROM XM-5701TA 3136> Removable CD-ROM SCSI-2 device
  cd0: 10.000MB/s transfers (10.000MHz, offset 8)
  cd0: Attempt to query device size failed: NOT READY, Medium not present
  cd1 at ahc0 bus 0 target 6 lun 0
  cd1: <TEAC CD-R55S 1.0K> Removable CD-ROM SCSI-2 device
  cd1: 10.000MB/s transfers (10.000MHz, offset 15)
  cd1: Attempt to query device size failed: NOT READY, Medium not present
  pid 979 (xscanimage), uid 0: exited on signal 11 (core dumped)
  pid 47492 (xsane), uid 0: exited on signal 11 (core dumped)

      --
      Andreas Klemm                                           Powered by FreeBSD SMP
      Songs from our band >>64Bits<<............http://www.apsfilter.org/64bits.html
      My homepage................................ http://people.FreeBSD.ORG/~andreas
      Please note: Apsfilter got a NEW HOME................http://www.apsfilter.org/
      --
      Source code, list archive, and docs: http://www.mostang.com/sane/
      To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

  - Next message: mh: "bug(?) in installation"
  - Previous message: Paul Floyd: "Re: SANE on OS/2 (Was: new snapscan user)"
  - Next in thread: Henning Meier-Geinitz: "Re: SIGSEGV in sense_handler (scsi_fd=0, result=0x831d470 "", arg=0x0) at mustek.c:604"
  - Reply: Henning Meier-Geinitz: "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 - 06:46:54 PST