[sane-devel] xsane>0.91 crashes always with canon canoscan 2700F

Thomas Loescher thomas.loescher@gmx.de
Wed, 5 May 2004 21:56:37 +0200


Hello sane/xsane developers and users,

At first I want to say a big "Thank you!" to all the people who are developing these great pieces of software. I'm using them since a very long time locally on my desktop and I also give some people the possibility to use my scanner(s) over the network via saned. It works perfectly without any trouble and problems. This is, what I understand under "Plug (& very little config work) & Play".

Unfortunately, the last version of xsane wich worked together with my slide scanner (Canon canoscan 2700F, a scsi scanner) was 0.91. All version above this crashed when I choosed the scanner in the startup dialogue.

The programs scanimage and xscanimage (belonging to sane-frontends) and kooka (from kde) are working well.

I really don't know, what information would be helpfully for you to resolve this problem. I made a file with xsane output, where I've set SANE_DEBUG_CANON, SANE_DEBUG_DLL, SANE_DEBUG_SANEI_SCSI to 128 (as explained in the sane man page) but is file has 1300 line. I'm afraid, this is a little bit to much to post the whole file without any request in this list.

I will give only some line from the middel (sane finds the scanner) and the last few lines here. "Speicherzugriffsfehler" is german for "segmentation fault" ;-)

here comes some output:
1. sane finds my scanner 
[dll] load: searching backend `canon' in `/usr/lib/sane'
[dll] load: trying to load `/usr/lib/sane/libsane-canon.so.1'
[dll] load: dlopen()ing `/usr/lib/sane/libsane-canon.so.1'
[dll] init: initializing backend `canon'
[sanei_debug] Setting debug level of canon to 128.
[canon] >> sane_init
[canon] sane_init: sane-backends 1.0.13
[canon] >> attach_one
[canon] >> attach
[canon] attach: opening /dev/scanner
[sanei_debug] Setting debug level of sanei_scsi to 128.
[sanei_debug] Setting debug level of sanei_scsi to 128.
[sanei_scsi] sanei_scsi_find_devices: vendor=(null) model=(null) type=Scanner
        bus=0 chan=0 id=6 lun=0  num=2
[sanei_scsi] lx_chk_devicename: matched device(devfs): /dev/scsi/host0/bus0/target6/lun0/generic
[sanei_scsi] get_max_buffer_size for /dev/scsi/host0/bus0/target6/lun0/generic: 131072
[sanei_debug] Setting debug level of sanei_scsi to 128.
[sanei_scsi] sanei_scsi_open: sanei_scsi_max_request_size=131072 bytes
[sanei_scsi] sanei_scsi_open: SG driver version: 30125
[sanei_scsi] sanei_scsi_open_extended: using 131072 bytes as SCSI buffer
[sanei_scsi] trying to enable low level command queueing
[sanei_scsi] sanei_scsi_open: Host adapter queue depth: 2
[sanei_scsi] sanei_scsi_open: SG driver can change buffer size at run time
[sanei_scsi] sanei_scsi_open: low level command queueing enabled
[sanei_scsi] sanei_scsi_open: using new SG header structure
[canon] attach: sending (standard) INQUIRY
[canon] >> inquiry
[sanei_scsi] scsi_req_enter: entered 0x81ac490
[sanei_scsi] sanei_scsi.issue: 0x81ac490
[sanei_scsi] scsi_req_enter: queue_used: 1, queue_max: 2
[sanei_scsi] sanei_scsi_req_wait: waiting for 0x81ac490
[sanei_scsi] sanei_scsi.issue: 0x81ac490
[sanei_scsi] sanei_scsi_req_wait: read 64 bytes
[canon] << inquiry
[canon] attach: sending TEST_UNIT_READY
[canon] >> test_unit_ready
[sanei_scsi] scsi_req_enter: entered 0x81ac490
[sanei_scsi] sanei_scsi.issue: 0x81ac490
[sanei_scsi] scsi_req_enter: queue_used: 1, queue_max: 2
[sanei_scsi] sanei_scsi_req_wait: waiting for 0x81ac490
[sanei_scsi] sanei_scsi.issue: 0x81ac490
[sanei_scsi] sanei_scsi_req_wait: read 64 bytes
[canon] << test_unit_ready
[canon] attach: sending RESERVE UNIT
[canon] >> reserve_unit
[sanei_scsi] scsi_req_enter: entered 0x81ac490
[sanei_scsi] sanei_scsi.issue: 0x81ac490
[sanei_scsi] scsi_req_enter: queue_used: 1, queue_max: 2
[sanei_scsi] sanei_scsi_req_wait: waiting for 0x81ac490
[sanei_scsi] sanei_scsi.issue: 0x81ac490
[sanei_scsi] sanei_scsi_req_wait: read 64 bytes
[canon] << reserve_unit
[canon] attach: sending GET SCAN MODE for scan control conditions
[canon] get scan mode: cmd[4]='0x14'
[sanei_scsi] scsi_req_enter: entered 0x81ac490
[sanei_scsi] sanei_scsi.issue: 0x81ac490
[sanei_scsi] scsi_req_enter: queue_used: 1, queue_max: 2
[sanei_scsi] sanei_scsi_req_wait: waiting for 0x81ac490
[sanei_scsi] sanei_scsi.issue: 0x81ac490
[sanei_scsi] sanei_scsi_req_wait: read 64 bytes
[canon] << get scan mode
[canon] scan mode byte[0] = 19
[canon] scan mode byte[1] = 0
[canon] scan mode byte[2] = 0
[canon] scan mode byte[3] = 0
[canon] scan mode byte[4] = 32
[canon] scan mode byte[5] = 14
[canon] scan mode byte[6] = 0
[canon] scan mode byte[7] = 0
[canon] scan mode byte[8] = 0
[canon] scan mode byte[9] = 0
[canon] scan mode byte[10] = 0
[canon] scan mode byte[11] = 0
[canon] scan mode byte[12] = 0
[canon] scan mode byte[13] = 0
[canon] scan mode byte[14] = 0
[canon] scan mode byte[15] = 0
[canon] scan mode byte[16] = 0
[canon] scan mode byte[17] = 0
[canon] scan mode byte[18] = 0
[canon] scan mode byte[19] = 0
[canon] scan mode byte[20] = 55
[canon] scan mode byte[21] = 48
[canon] scan mode byte[22] = 49
[canon] scan mode byte[23] = 53
[canon] scan mode byte[24] = 67
[canon] scan mode byte[25] = 32
[canon] scan mode byte[26] = 32
[canon] scan mode byte[27] = 32
[canon] scan mode byte[28] = 32
[canon] scan mode byte[29] = 32
[canon] scan mode byte[30] = 32
[canon] scan mode byte[31] = 32
[canon] scan mode byte[32] = 49
[canon] scan mode byte[33] = 46
[canon] scan mode byte[34] = 49
[canon] scan mode byte[35] = 53
[canon] scan mode byte[36] = 0
[canon] scan mode byte[37] = 0
[canon] scan mode byte[38] = 0
[canon] scan mode byte[39] = 0
[canon] scan mode byte[40] = 0
[canon] scan mode byte[41] = 0
[canon] scan mode byte[42] = 0
[canon] scan mode byte[43] = 0
[canon] scan mode byte[44] = 0
[canon] scan mode byte[45] = 0
[canon] scan mode byte[46] = 0
[canon] scan mode byte[47] = 0
[canon] scan mode byte[48] = 0
[canon] scan mode byte[49] = 0
[canon] scan mode byte[50] = 0
[canon] scan mode byte[51] = 0
[canon] scan mode byte[52] = 0
[canon] scan mode byte[53] = 0
[canon] scan mode byte[54] = 0
[canon] scan mode byte[55] = 0
[canon] scan mode byte[56] = 0
[canon] scan mode byte[57] = 0
[canon] scan mode byte[58] = 0
[canon] scan mode byte[59] = 0
[canon] scan mode byte[60] = 0
[canon] scan mode byte[61] = 0
[canon] scan mode byte[62] = 0
[canon] scan mode byte[63] = 0
[canon] scan mode byte[64] = 0
[canon] scan mode byte[65] = 0
[canon] scan mode byte[66] = 0
[canon] scan mode byte[67] = 0
[canon] scan mode byte[68] = 0
[canon] scan mode byte[69] = 0
[canon] scan mode byte[70] = 0
[canon] scan mode byte[71] = 0
[canon] scan mode byte[72] = 0
[canon] scan mode byte[73] = 0
[canon] attach: sending (extended) INQUIRY
[canon] >> inquiry
[sanei_scsi] scsi_req_enter: entered 0x81ac490
[sanei_scsi] sanei_scsi.issue: 0x81ac490
[sanei_scsi] scsi_req_enter: queue_used: 1, queue_max: 2
[sanei_scsi] sanei_scsi_req_wait: waiting for 0x81ac490
[sanei_scsi] sanei_scsi.issue: 0x81ac490
[sanei_scsi] sanei_scsi_req_wait: read 64 bytes
[canon] << inquiry
[canon] attach: sending MODE SENSE
[canon] >> mode_sense
[sanei_scsi] scsi_req_enter: entered 0x81ac490
[sanei_scsi] sanei_scsi.issue: 0x81ac490
[sanei_scsi] scsi_req_enter: queue_used: 1, queue_max: 2
[sanei_scsi] sanei_scsi_req_wait: waiting for 0x81ac490
[sanei_scsi] sanei_scsi.issue: 0x81ac490
[sanei_scsi] sanei_scsi_req_wait: read 64 bytes
[canon] << mode_sense
[canon] dev->sane.name = '/dev/scanner'
[canon] dev->sane.vendor = 'CANON'
[canon] dev->sane.model = 'IX-27015C       '
[canon] dev->sane.type = 'film scanner'
[canon] bmu=0
[canon] mud=2720
[canon] xres_default=2720
[canon] xres_range.max=2720
[canon] xres_range.min=120
[canon] xres_range.quant=1
[canon] yres_default=2720
[canon] yres_range.max=2720
[canon] yres_range.min=120
[canon] xres_range.quant=1
[canon] x_range.max=1585667
[canon] y_range.max=2378807
[canon] x_adf_range.max=-1
[canon] y_adf_range.max=-1
[canon] << attach
[canon] << attach_one
[canon] << sane_init
[dll] init: backend `canon' is version 1.0.0
[canon] >> sane_get_devices
[canon] << sane_get_devices

2. last lines, before it crashes:
[dll] sane_get_devices: found 4 devices

####-> at this point I choose the canon scanner an press "OK" an the startup dialpogue

[dll] sane_open: trying to open `canon:/dev/scanner'
[canon] >> sane_open
[canon] >> init_options
[canon] >> max_string_size
[canon] << max_string_size
[canon] >> max_string_size
[canon] << max_string_size
[canon] >> max_string_size
[canon] << max_string_size
[canon] >> max_string_size
[canon] << max_string_size
[canon] >> max_string_size
[canon] << max_string_size
[canon] hw->info.xres_range.max=2720
[canon] hw->info.yres_range.max=2720
[canon] >> max_string_size
[canon] << max_string_size
[canon] >> max_string_size
[canon] << max_string_size
[canon] << init_options
[canon] << sane_open
[dll] sane_open: open successful
[dll] sane_get_option_descriptor(handle=0x8175798,option=0)
[canon] >> sane_get_option_descriptor option number 0
[canon]    sane_get_option_descriptor option name OPT_NUM_OPTS
[canon] << sane_get_option_descriptor option number 0
[dll] sane_control_option(handle=0x8175798,option=0,action=0,value=0x80d2734,info=(nil))
[canon] >> sane_control_option OPT_NUM_OPTS
[canon] sane_control_option get value of OPT_NUM_OPTS
[canon] value for option OPT_NUM_OPTS: 59
[dll] sane_get_option_descriptor(handle=0x8175798,option=1)
[canon] >> sane_get_option_descriptor option number 1
[canon]    sane_get_option_descriptor option name OPT_PAGE
[canon] << sane_get_option_descriptor option number 1
[dll] sane_get_option_descriptor(handle=0x8175798,option=1)
[canon] >> sane_get_option_descriptor option number 1
[canon]    sane_get_option_descriptor option name OPT_PAGE
[canon] << sane_get_option_descriptor option number 1
[dll] sane_control_option(handle=0x8175798,option=1,action=0,value=0x8254d18,info=(nil))
[canon] >> sane_control_option OPT_PAGE
[canon] sane_control_option get value of OPT_PAGE
[canon] value for option OPT_PAGE: Show normal options
[dll] sane_get_option_descriptor(handle=0x8175798,option=2)
[canon] >> sane_get_option_descriptor option number 2
[canon]    sane_get_option_descriptor option name OPT_MODE_GROUP
[canon] << sane_get_option_descriptor option number 2
[dll] sane_get_option_descriptor(handle=0x8175798,option=3)
[canon] >> sane_get_option_descriptor option number 3
[canon]    sane_get_option_descriptor option name OPT_MODE
[canon] << sane_get_option_descriptor option number 3
[dll] sane_get_option_descriptor(handle=0x8175798,option=3)
[canon] >> sane_get_option_descriptor option number 3
[canon]    sane_get_option_descriptor option name OPT_MODE
[canon] << sane_get_option_descriptor option number 3
[dll] sane_control_option(handle=0x8175798,option=3,action=0,value=0x82571e0,info=(nil))
[canon] >> sane_control_option OPT_MODE
[canon] sane_control_option get value of OPT_MODE
[canon] value for option OPT_MODE: Color
[dll] sane_get_option_descriptor(handle=0x8175798,option=4)
[canon] >> sane_get_option_descriptor option number 4
[canon]    sane_get_option_descriptor option name OPT_NEGATIVE
[canon] << sane_get_option_descriptor option number 4
[dll] sane_get_option_descriptor(handle=0x8175798,option=4)
[canon] >> sane_get_option_descriptor option number 4
[canon]    sane_get_option_descriptor option name OPT_NEGATIVE
[canon] << sane_get_option_descriptor option number 4
[dll] sane_control_option(handle=0x8175798,option=4,action=0,value=0x82571e0,info=(nil))
[canon] >> sane_control_option OPT_NEGATIVE
[canon] sane_control_option get value of OPT_NEGATIVE
[canon] value for option OPT_NEGATIVE: Slides
[dll] sane_get_option_descriptor(handle=0x8175798,option=5)
[canon] >> sane_get_option_descriptor option number 5
[canon]    sane_get_option_descriptor option name OPT_NEGATIVE_TYPE
[canon] << sane_get_option_descriptor option number 5
[dll] sane_get_option_descriptor(handle=0x8175798,option=5)
[canon] >> sane_get_option_descriptor option number 5
[canon]    sane_get_option_descriptor option name OPT_NEGATIVE_TYPE
[canon] << sane_get_option_descriptor option number 5
[dll] sane_control_option(handle=0x8175798,option=5,action=0,value=0x82571e0,info=(nil))
[canon] >> sane_control_option OPT_NEGATIVE_TYPE
[canon] sane_control_option get value of OPT_NEGATIVE_TYPE
[canon] value for option OPT_NEGATIVE_TYPE: Film type 0
[dll] sane_get_option_descriptor(handle=0x8175798,option=6)
[canon] >> sane_get_option_descriptor option number 6
[canon]    sane_get_option_descriptor option name OPT_SCANNING_SPEED
[canon] << sane_get_option_descriptor option number 6
[dll] sane_get_option_descriptor(handle=0x8175798,option=6)
[canon] >> sane_get_option_descriptor option number 6
[canon]    sane_get_option_descriptor option name OPT_SCANNING_SPEED
[canon] << sane_get_option_descriptor option number 6
Speicherzugriffsfehler
smiler@bart smiler $

I also made an "strace xsane" (O.K. I really don't understand the output of strace, it's like chinese tome ;-), but perhaps it helps somebody. I tried it with LANG=C and LANG=de_DE@euro, no diference it crashes in both ways

the output (only the last few lines):
_llseek(37, 8192, [8192], SEEK_SET)     = 0
_llseek(37, 8192, [8192], SEEK_SET)     = 0
_llseek(37, 8192, [8192], SEEK_SET)     = 0
_llseek(37, 8192, [8192], SEEK_SET)     = 0
_llseek(37, 8192, [8192], SEEK_SET)     = 0
read(37, "                                "..., 4096) = 4096
read(37, "                                "..., 4096) = 4096
read(37, "                                "..., 4096) = 4096
read(37, "            \",\n\"                "..., 4096) = 4096
read(37, "                                "..., 4096) = 4096
read(37, "                                "..., 4096) = 2144
close(37)                               = 0
munmap(0x410a5000, 4096)                = 0
write(5, "B\1\5\0\31\1@\3/\0@\3\256\0&\0\270\0&\0\1\20\r\0\32\1@"..., 2044) = 2044
uname({sys="Linux", node="bart", ...})  = 0
getpid()                                = 9668
write(5, "B\1q\1!\1@\3/\0@\3\267\0\20\0\270\0\20\0L\0\21\0Z\0\21"..., 2048) = 2048
write(5, "\22\0\7\0\"\1@\3\347\0\0\0\6\0\0\0 \0\20\0\1\0\0\0\304"..., 2044) = 2044
write(5, "\231\10\t\0\3\1@\3,\0@\3-\0@\3F\1@\3\0\1\24\0\0\1\24\0"..., 2040) = 2040
uname({sys="Linux", node="bart", ...})  = 0
getpid()                                = 9668
write(5, "\22\0\30\0U\1@\3(\0\0\0)\0\0\0 \1@\3\22\0\0\0\10\0\0\0"..., 2040) = 2040
write(5, "8\0\4\0/\0@\3\4\0\0\0\0\0\0\0F\1\5\0h\1@\3/\0@\3\0\0\0"..., 2040) = 2040
brk(0)                                  = 0x8250000
brk(0x8271000)                          = 0x8271000
write(5, "8\0\4\0/\0@\3\4\0\0\0\0\0\0\0F\1\5\0x\1@\3/\0@\3\0\0\0"..., 2028) = 2028
open("/usr/share/locale/de_DE@euro/LC_MESSAGES/sane-backends.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/de@euro/LC_MESSAGES/sane-backends.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/de_DE/LC_MESSAGES/sane-backends.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/de/LC_MESSAGES/sane-backends.mo", O_RDONLY) = 37
fstat64(37, {st_mode=S_IFREG|0644, st_size=58618, ...}) = 0
mmap2(NULL, 58618, PROT_READ, MAP_PRIVATE, 37, 0) = 0x410a5000
close(37)                               = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++


O.K. this is, what sane gives me
I can give you some information about my system
- sane backend 1.0.13-r3 (r3 is a part of the gentoo versioning scheme, but it makes no difference, what version of sane-backends I'm using, tried a lot)
- My system is a gentoo linux with kernel 2.4.22
- tekram scsi controller driver module is ncr53c8xx.o
- I also have a scsi dvd-rom and a scsi cdrw attached to the scsi-controller
- There is no difference in trying to access the scanner over network or directly
- I have another scsi scanner (an very cheap mustek scanexpress 12000SP) and this device works fine

So, that's all what I can give you at the moment.
I you need more, please tell it to me. I will try to give my best to deliver all needed information to solve this problem.

Thanks for reading the whole stuff

best regards

Thomas