SCM

[#315623] HP8250 [avision] with ADF segfaults on ADF Duplex

View Trackers | Bugs | Export CSV

Date:
2017-02-10 15:03
Priority:
3
State:
Open
Submitted by:
James Klaas (jimbolaya-guest)
Assigned to:
Nobody (None)
Category:
backends (drivers)
Group:
None
Resolution:
None
Summary:
HP8250 [avision] with ADF segfaults on ADF Duplex

Detailed description
I have an HP8250 with a duplex ADF. I'm running on Debian 8 x86_64. I've compiled the latest (git20170207) backend driver for avision. I've had this problem since I've been able to use the ADF a few versions ago.

Using the ADF for simplex scanning works great. Whenever I attempt to use the ADF for duplex scanning I always get a segfault.

I devoted some time to figure out how to get the most messages I could from the command line tools. I don't know if there are any other environment variables I can set to get more info. To get the maximum information I set the following:

export SANE_DEBUG_DLL=255
export SANE_DEBUG_AVISION=15
export SANE_DEBUG_SANEI_USB=15


To try to make the scan, I use:

scanimage -d avision:libusb:001:016 --format=tiff --batch=test%d.tiff --batch-count=2 -vv --resolution 150 --source "ADF Duplex" 2>scanimage.debug.log

After I run this, I have test1.tiff, an image file and test2.tiff.part, an empty file and /tmp/avision-rear-xxxxxx which looks like text representative of the bytes for the image. I've gotten similar results using simple-scan and gscan2pdf.

Here's the log from the last usb bulk read until the end of the log:

[sanei_usb] 1DCFFF FC FF FF FB FF FF FC FF FF FC FF FF FD FF FF ................
[sanei_usb] sanei_usb_read_bulk: wanted 122112 bytes, got 122112 bytes
[avision] read 122112 bytes
[avision] avision_usb_status: timeout 10000, 1 retries
[avision] ==> (bulk read) going down ...
[sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes
[sanei_usb] 000 02 .
[sanei_usb] sanei_usb_read_bulk: wanted 1 bytes, got 1 bytes
[avision] <== (bulk read) got: 1, status: 2
[avision] avision_usb_status: Needs to request sense!
[avision] Error during status read!
[avision] === Try to request sense ===
[avision] try to write 10 bytes
[sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
[sanei_usb] 000 03 00 00 00 16 00 00 00 00 00 ..........
[sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
[avision] wrote 10 bytes
[avision] try to read 22 bytes sense data
[sanei_usb] sanei_usb_read_bulk: trying to read 22 bytes
[sanei_usb] 000 F0 00 43 00 00 00 00 0E 00 00 00 00 80 04 00 00 ..C.............
[sanei_usb] 010 00 00 01 5B 20 00 ...[ .
[sanei_usb] sanei_usb_read_bulk: wanted 22 bytes, got 22 bytes
[avision] read 22 bytes sense data
[avision] avision_usb_status: timeout 10000, 1 retries
[avision] ==> (bulk read) going down ...
[sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes
[sanei_usb] 000 00 .
[sanei_usb] sanei_usb_read_bulk: wanted 1 bytes, got 1 bytes
[avision] <== (bulk read) got: 1, status: 0
[avision] sense_handler:
[avision] sense_handler: data:
[avision] [0] 11110000b 360o 240d f0x
[avision] [1] 00000000b 0o 0d 0x
[avision] [2] 01000011b 103o 67d 43x
[avision] [3] 00000000b 0o 0d 0x
[avision] [4] 00000000b 0o 0d 0x
[avision] [5] 00000000b 0o 0d 0x
[avision] [6] 00000000b 0o 0d 0x
[avision] [7] 00001110b 16o 14d ex
[avision] [8] 00000000b 0o 0d 0x
[avision] [9] 00000000b 0o 0d 0x
[avision] [10] 00000000b 0o 0d 0x
[avision] [11] 00000000b 0o 0d 0x
[avision] [12] 10000000b 200o 128d 80x
[avision] [13] 00000100b 4o 4d 4x
[avision] [14] 00000000b 0o 0d 0x
[avision] [15] 00000000b 0o 0d 0x
[avision] [16] 00000000b 0o 0d 0x
[avision] [17] 00000000b 0o 0d 0x
[avision] [18] 00000001b 1o 1d 1x
[avision] [19] 01011011b 133o 91d 5bx
[avision] [20] 00100000b 40o 32d 20x
[avision] [21] 00000000b 0o 0d 0x
[avision] sense_handler: sense code: MEDIUM ERROR (mostly ADF)
[avision] sense_handler: end of scan
[avision] sense_handler: correct logical length
[avision] sense_handler: sense code: ADF paper end
[avision] reader_process: read_data failed due to EOF
[avision] reader_process: read_data failed with status: 5
[avision] reader_process: stripe filled: 122112
[avision] reader_process: useful_bytes 122112
[avision] reader_process: after page flip: useful_bytes: 0, stripe_fill: 0
[avision] reader_process: end of iteration
[avision] reader_process: i/o loop finished
[avision] release unit: type: 0
[avision] filling command to have a length of 10, was: 6
[avision] Timeouts: write: 30000, read: 30000, status: 10000
[avision] try to write cmd, count: 10.
[sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
[sanei_usb] 000 17 00 00 00 00 00 00 00 00 00 ..........
[sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
[avision] wrote 10 bytes
[avision] avision_usb_status: timeout 10000, 1 retries
[avision] ==> (bulk read) going down ...
[sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes
[sanei_usb] 000 00 .
[sanei_usb] sanei_usb_read_bulk: wanted 1 bytes, got 1 bytes
[avision] <== (bulk read) got: 1, status: 0
[avision] [avision] reader_process: returning success
sane_read: got 0 bytes, err: 11 Resource temporarily unavailable
[avision] do_eof:
[avision] do_eof: toggling duplex rear data valid
[avision] do_eof: duplex rear data valid: 1
[avision] reader_process: returning success
[avision] do_eof: returning 5
scanimage: min/max graylevel value = 91/255
scanimage: read 6713344 bytes in total
Scanned page 1. (scanner status = 5)
Scanning page 2
[dll] sane_start(handle=0x7f79469f3e10)
[avision] sane_start:
[avision] sane_get_parameters:
[avision] sane_get_parameters: computing parameters
[avision] sane_compute_parameters:
[avision] sane_compute_parameters: boundary 8, gray_mode: 1,
[avision] sane_compute_parameters: tlx: 0.000000, tly: 0.000000, brx: 216.000000, bry: 355.000000
[avision] sane_compute_parameters: hw_xres: 150, hw_yres: 150, line_difference: 0
[avision] sane_compute_parameters: tlx: 0, tly: 0, brx: 1275, bry: 2096
[avision] sane_compute_parameters: hw_pixel_per_line: 1272, hw_lines: 2096, hw_bytes_per_line: 3816
[avision] sane_compute_parameters: xres: 150, yres: 150
[avision] sane_compute_parameters: pixel_per_line: 1272, lines: -1
[avision] sane_compute_parameters: depth: 8, bytes_per_line: 3816
[avision] sane_start: virtual duplex rear data valid.
[avision] sane_start: starting thread
[avision] reader_process:
[avision] dev->scsi_buffer_size / 2: 524288
[avision] bytes_per_line: 3816, pixels_per_line: 1272
[avision] lines_per_stripe: 32, lines_per_output: 32
[avision] max_bytes_per_read: 1048576, stripe_size: 122112, out_size: 122112
[avision] reader_process: total_size: 7998336
[avision] reader_process: stripe filled: 0
[avision] reader_process: virtual processed_bytes: 0, total_size: 7998336
[avision] reader_process: virtual this_read: 122112
[dll] sane_get_parameters(handle=0x7f79469f3e10,params=0x7ffefe02f600)
[avision] sane_get_parameters:
scanimage: scanning image 1272 pixels wide and variable height at 24 bits/pixel
scanimage: acquiring RGB frame


My gzipped log was too big to submit and I don't know what the most important part is.

Please let me know if I can do any patching to test this or if I should submit some other file.

Followups: Sort comments antichronologically

Message
Date: 2017-06-23 18:09
Sender: Rainer Stötter

With Debian system and Scanner HP ScanJet 8270 the same. It writes the first page and commits when writing the second page, which has 0 Bytes.

scanadf -vv --resolution 300 --source="ADF Duplex" --mode=Gray --no-overwrite --output-file="ADF-%04d.pgm"

the normal ADF without duplex works perfectly

scanadf -vv --resolution 300 --source="ADF Front" --mode=Lineart --no-overwrite --output-file="ADF-%04d.pbm"

skanlite and xsane break down and end the program flow when trying to use the ADF duplex function, too

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge