[sane-devel] GL841 test result

Stefan Urbanek stefan@agentfarms.net
Fri, 13 May 2005 10:54:49 +0200


I have updated my sources from the CVS and installed the genesys-new
backend. The result is as follows:

found USB scanner (vendor=0x04a9 [Canon], product=0x2213 [CanoScan],
chip=GL841) at libusb:004:019

$ scanimage -d genesys
[genesys] genesys_low_bulk_write_data: completed
[genesys] genesys_send_offset_and_shading: completed
[genesys] genesys_mid_init_shading_data: completed
[genesys] genesys_white_shading_calibration (lines = 20)
Segmentation fault (core dumped)

by running it in gdb i get:

(gdb) bt
#0  0xb7ea5339 in free () from /lib/tls/libc.so.6
#1  0xb7dfb5ac in genesys_flatbed_calibration (dev=0x72060010)
    at genesys_mid.c:1574
#2  0xb7e04777 in sane_genesys_start (handle=0x8053eb0) at
#3  0x0804b759 in main (argc=3, argv=0xbffff244) at scanimage.c:1133

The lines around genesys_mid.c:1574 are:
  if (dev->white_average_data)
    free (dev->white_average_data);

Looks like the free is freeing some uninitialised pointer. When I
commented out that line (just to see what happens), it passed through.
Then I got complete scanimage program run, but without actual scanning.
There were I/O problems, however different than the last time - no
timeout, but normal error. How should I know what error it is? 

The errors were:
[genesys] genesys_low_bulk_write_register (size = 0)
[genesys] genesys_low_bulk_write_register: failed while writing bulk
data: Error during device I/O
[genesys] genesys_white_shading_calibration: failed to bulk write
registers: Error during device I/O
[genesys] genesys_flatbed_calibration: failed to do white shading
calibration: Error during device I/O
[genesys] genesys_start_scan: failed to do flatbed calibration: Error
during device I/O
scanimage: sane_start: Error during device I/O
[genesys] sane_cancel: start
[genesys] gl841_end_scan (check_stop = 1)
[genesys] genesys_low_write_register (0x01, 0x00) completed
[genesys] genesys_low_read_register (0x41, 0x5c) completed
[genesys] genesys_low_read_register (0x41, 0x5c) completed
... (last line was repeating many times)
[genesys] genesys_low_read_register (0x41, 0x5c) completed
[genesys] gl841_end_scan: completed (i=300)
[genesys] sane_cancel: exit

Hope that the report helps.



First they ignore you, then they laugh at you, then they fight you, then
you win.
- Mahatma Gandhi