[sane-devel] avision segfault
Jeremy
jeremy at acjlaw.net
Thu Dec 10 16:06:37 UTC 2009
On Thursday 10 December 2009, m. allan noah wrote:
> there are two different problems here-
>
> 1. the sanei_scsi message on the server side
SERVER # export SANE_DEBUG_AVISION=7
SERVER # scanimage -L
[avision] sane_get_devices:
device `sp15c:/dev/sg6' is a FCPA ScanPartner 15C flatbed/ADF scanner
device `hs2p:/dev/sg5' is a Ricoh IS450 Flatbed/ADF/Duplex/Endorser B&W
Scanner
device `epson2:libusb:001:002' is a Epson generic flatbed scanner
device `avision:/dev/sg6' is a Fujitsu ScanPartner 15C flatbed scanner
[avision] sane_exit:
SERVER #ldd /usr/bin/scanimage
linux-gate.so.1 => (0xb7f00000)
libsane.so.1 => /usr/lib/libsane.so.1 (0xb7ea9000)
libv4l1.so.0 => /usr/lib/libv4l1.so.0 (0xb7ea3000)
libieee1284.so.3 => /usr/lib/libieee1284.so.3 (0xb7e98000)
libtiff.so.3 => /usr/lib/libtiff.so.3 (0xb7e3c000)
libjbig.so => /usr/lib/libjbig.so (0xb7e2f000)
libz.so.1 => /lib/libz.so.1 (0xb7e1c000)
libc.so.6 => /lib/libc.so.6 (0xb7cd3000)
libjpeg.so.7 => /usr/lib/libjpeg.so.7 (0xb7c9c000)
libgphoto2.so.2 => /usr/lib/libgphoto2.so.2 (0xb7c1f000)
libgphoto2_port.so.0 => /usr/lib/libgphoto2_port.so.0 (0xb7c16000)
libltdl.so.7 => /usr/lib/libltdl.so.7 (0xb7c0c000)
libexif.so.12 => /usr/lib/libexif.so.12 (0xb7bd4000)
libm.so.6 => /lib/libm.so.6 (0xb7bae000)
libusb-0.1.so.4 => /lib/libusb-0.1.so.4 (0xb7ba5000)
libavahi-client.so.3 => /usr/lib/libavahi-client.so.3 (0xb7b94000)
libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0xb7b59000)
libavahi-common.so.3 => /usr/lib/libavahi-common.so.3 (0xb7b4c000)
libdl.so.2 => /lib/libdl.so.2 (0xb7b47000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7b2e000)
libv4l2.so.0 => /usr/lib/libv4l2.so.0 (0xb7b23000)
/lib/ld-linux.so.2 (0xb7f01000)
librt.so.1 => /lib/librt.so.1 (0xb7b1a000)
libv4lconvert.so.0 => /usr/lib/libv4lconvert.so.0 (0xb7ab0000)
I'm using stable gcc-4.3.4:
gcc-config -l
[1] i686-pc-linux-gnu-3.3.6
[2] i686-pc-linux-gnu-4.1.2
[3] i686-pc-linux-gnu-4.2.4
[4] i686-pc-linux-gnu-4.3.4 *
[5] i686-pc-linux-gnu-4.4.2
gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.3.4/work/gcc-4.3.4/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.3.4 --
includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include --
datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.4 --mandir=/usr/share/gcc-
data/i686-pc-linux-gnu/4.3.4/man --infodir=/usr/share/gcc-data/i686-pc-linux-
gnu/4.3.4/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-
gnu/4.3.4/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --
disable-altivec --disable-fixed-point --enable-nls --without-included-gettext
--with-system-zlib --disable-checking --disable-werror --enable-secureplt --
disable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --
enable-java-awt=gtk --with-arch=i686 --enable-
languages=c,c++,java,treelang,fortran --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --with-
bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.3.4 p1.0,
pie-10.1.5'
Thread model: posix
gcc version 4.3.4 (Gentoo 4.3.4 p1.0, pie-10.1.5)
> 2. you cannot set the debug vars for a remote backend on the client
> side. the message you are seeing is because the dll backend on the
> client is loading all the backends in /etc/sane.d/dll.conf. Avision
> should not segfault in this case, but you should not even load it
> anyway.
>
I commented out the avision backend from /etc/sane.d/dll.conf
on the CLIENT, but still get segfault:
CLIENT #scanimage -h -d net:piii.acjlaw.net:avision:/dev/sg6
<-- cut -->
--nvram-values <string> [inactive]
Allows access obtaining the scanner's NVRAM values as pretty printed
text.
Type ``scanimage --help -d DEVICE'' to get list of all options for DEVICE.
Segmentation fault
The other driver (sp15c) doesn't segfault, but instead
lists available devices (no clue why sp15c and hs2p get listed on same line):
CLIENT # scanimage -h -d net:piii.acjlaw.net:sp15c:/dev/sg6
<-- cut -->
Enhancement:
--threshold 0..255 (in steps of 4) [128]
Select minimum-brightness to get a white point
Advanced:
Type ``scanimage --help -d DEVICE'' to get list of all options for DEVICE.
List of available devices:
net:piii.acjlaw.net:sp15c:/dev/sg6 net:piii.acjlaw.net:hs2p:/dev/sg5
net:piii.acjlaw.net:epson2:libusb:001:002
net:piii.acjlaw.net:avision:/dev/sg6
> allan
>
I'm able to scan from both SERVER and CLIENTs
with frontends xsane, gscan2pdf using
either SP15C or AVISION backends without segfaulting.
And I can avoid the problem in my script by defining DUPLEX_SCANNERS[]
so that "scanimage -h -d <avision>" isn't run.
Jeremy
More information about the sane-devel
mailing list