Description of problem: scanimage results in: Invalid Argument. scanimage -L finds scanner, xsane works. Strace: open("/usr/lib64/sane/libsane-avision.so.1", O_RDONLY) = 3 close(3) = 0 futex(0x39854030e0, FUTEX_WAKE_PRIVATE, 2147483647) = 0 open("/usr/lib64/sane/libsane-avision.so.1", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220c\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=182656, ...}) = 0 mmap(NULL, 2287168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f724a09d000 mprotect(0x7f724a0c7000, 2097152, PROT_NONE) = 0 mmap(0x7f724a2c7000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2a000) = 0x7f724a2c7000 mmap(0x7f724a2ca000, 5696, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f724a2ca000 close(3) = 0 write(2, "scanimage: open of device avisio"..., 74scanimage: open of device avision:libusb:002:082 failed: Invalid argument ) = 74 Version-Release number of selected component (if applicable): 1.0.22-3.fc14 Downgrade to 1.0.21-3.fc14 removes error.
After migration to F16 1.0.21 is not supported anymore. The problem remains. [wgold@jerry ~]$ scanimage -L device `v4l:/dev/video0' is a Noname Integrated Camera virtual device device `avision:libusb:001:032' is a Hewlett-Packard ScanJet 7400c flatbed scanner default device is `avision:libusb:001:032' [wgold@jerry ~]$ export SANE_DEFAULT_DEVICE='avision:libusb:001:032' [wgold@jerry ~]$ scanimage scanimage: open of device avision:libusb:001:032 failed: Invalid argument [wgold@jerry ~]$
Hi Werner, please enable debugging in the backend driver and run scanimage again, then attach the output to this ticket: export SANE_DEFAULT_DEVICE='avision:libusb:001:032' export SANE_DEBUG_AVISION=7 scanimage Thanks!
Not much enlightening. :-( [wgold@jerry tmp]$ scanimage [sanei_debug] Setting debug level of avision to 7. [avision] sane_init:(Version: 1.0 Build: 294) [avision] sane_open: scanimage: open of device avision:libusb:001:045 failed: Invalid argument [avision] sane_exit: I'll add the strace output.
Created attachment 573603 [details] strace output
The issue here is that the code to discover devices was moved out of the initialization routine sane_init() into its own function, but that function wasn't called in sane_init(). This bug was introduced in this commit... commit 37b45c4f76a66f9cd2c3d4bd98dd371dfbda74e5 Author: Mike Kelly <mike> AuthorDate: Thu Dec 23 19:35:23 2010 +0900 Moved device init code to sane_get_devices() Moved device init code from sane_init() to the newly created sane_reload_devices() function, which is now called from sane_get_devices(). This means that device initialization now happens when sane_get_devices() is called, not when sane_init() is called. ...and subsequently fixed upstream in this one (after 1.0.22 was out): commit 33bb529c5f8ca013fb499addc14c7fb229203ea8 Author: Mike Kelly <mike> AuthorDate: Wed Mar 21 21:03:00 2012 -0700 Added sane_reload_devices() to sane_init(). Adding sane_reload_devices() to sane_init() required sane_init() to be moved below the sane_reload_devices() declaration. This restores the original functionality present before I split the sane_reload_devices() code out of sane_init() so that it could be called from sane_get_devices(). I'll build an update containing this fix shortly.
sane-backends-1.0.22-10.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/sane-backends-1.0.22-10.fc17
sane-backends-1.0.22-10.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/sane-backends-1.0.22-10.fc16
sane-backends-1.0.22-10.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/sane-backends-1.0.22-10.fc15
Package sane-backends-1.0.22-10.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing sane-backends-1.0.22-10.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-6004/sane-backends-1.0.22-10.fc16 then log in and leave karma (feedback).
sane-backends-1.0.22-10.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.
sane-backends-1.0.22-10.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
sane-backends-1.0.22-10.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.