[sane-devel] XSane preview crashes under FreeBSD

Alex Teslik alex@acatysmoof.com
Sat, 30 Nov 2002 18:17:21 -0700


  I saw this problem reported under Solaris in February when I searched the
lists, but no answer was given as to what could fix it or why it happens. The
problem is that when I preview scan I can see the preview image updating all
the way to the bottom, but the moment it finishes Xsane crashes with a
segmentation fault.
  I ran xsane through gdb with SANE_DEBUG_MICROTEK2=256 set in the
environment. The exact command under tcsh was:

gdb ./xsane |& tee ~alex/xsane_debug.txt

The tail end of the output looks like:

[microtek2] sane_get_parameters: x_res=y_res=1000.000000
[microtek2] sane_get_parameters: x_ppm=39.370079, y_ppm=39.370079
[microtek2] sane_get_parameters: format=1, last_frame=1, lines=9115
[microtek2] sane_get_parameters: depth=16, ppl=7083, bpl=42501
(no debugging symbols found)...(no debugging symbols found)...
<------snip message repeating--->
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x806ccbf in preview_autoselect_scanarea ()
(gdb) backtrace
#0  0x806ccbf in preview_autoselect_scanarea ()
#1  0x8062a58 in xsane_set_medium ()
#2  0x8061e78 in xsane_set_medium ()
#3  0x2829e504 in gdk_io_invoke () from /usr/X11R6/lib/libgdk12.so.2
#4  0x282cc64c in g_io_unix_dispatch () from /usr/local/lib/libglib12.so.3
#5  0x282cdcf3 in g_main_dispatch () from /usr/local/lib/libglib12.so.3
#6  0x282ce31c in g_main_iterate () from /usr/local/lib/libglib12.so.3
#7  0x282ce4b4 in g_main_run () from /usr/local/lib/libglib12.so.3
#8  0x281ee81f in gtk_main () from /usr/X11R6/lib/libgtk12.so.2
#9  0x809c4b9 in xsane_interface ()
#10 0x809cad2 in main ()
#11 0x8051a9d in _start ()
(gdb) quit

You can download the complete output at

File is 753812 bytes. Looks to me like a problem in preview_autoselect_scanarea?
I have also included in the tar.gz the preview file that was created during
the preview scan.

BTW - I am using a Microtek ScanMaker5 that is not listed as working under
microtek2, but works great. Thanks Karsten!