Hello, I forward this bug from Debian[1]. Please can someone check the included patch?
[quote] Dear maintainer, the following problem caused our Canon LiDE 210 to produce loud noises by the motor until the scanner is manually turned off or to abort with the message "Error during device I/O". I refer to version 1.0.25-2 and 1.0.25-4.1 but also tested with the newest changes in the genesys-backend from experimental / git. I think this is the problem causing the behaviour: In the "attach" function in genesys.c the memory for the Genesys_Device-struct is allocated by malloc and "already_initialized" is set to false. However, as far as i can see, the usb_mode member is never initialized before "sanei_genesys_asic_init" in genesys_low.c is accessing it. Here it is wrongly assumed that it should be >= 0, otherwise the whole part which decides which usb mode is used is going to be skipped and the value stays as it is. This leads (if, as in my case, usb_mode is < 0) to the described behavior, since for example now in genesys_gl124.c "gl124_slow_back_home" simply returns with SANE_STATUS_GOOD (is there maybe a surrounding #ifdef UNIT_TESTING macro missing?) which I think is not correct. It seems likely to me that this is also reason for the behaviour described in bug #792465. Simply initializing the Genesys_Device-Struct with 0's via memset after calling malloc or just setting usb_mode to 0 is solving the problem for me: diff --git a/backend/genesys.c b/backend/genesys.c index 984cead..eb8695a 100644 --- a/backend/genesys.c +++ b/backend/genesys.c @@ -210,6 +210,8 @@ sanei_genesys_init_structs (Genesys_Device * dev) dev->model->motor_type); } + dev->usb_mode = 0; + /* set up initial line distance shift */ dev->ld_shift_r = dev->model->ld_shift_r; dev->ld_shift_g = dev->model->ld_shift_g; [/quote] Many thanks CU Jörg [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869673 -- New: GPG Fingerprint: 63E0 075F C8D4 3ABB 35AB 30EE 09F8 9F3C 8CA1 D25D GPG key (long) : 09F89F3C8CA1D25D GPG Key : 8CA1D25D CAcert Key S/N : 0E:D4:56 Old pgp Key: BE581B6E (revoked since 2014-12-31). Jörg Frings-Fürst D-54470 Lieser Threema: SYR8SJXB Wire: @joergfringsfuerst IRC: j_...@freenode.net j_...@oftc.net My wish list: - Please send me a picture from the nature at your home.
signature.asc
Description: This is a digitally signed message part
-- sane-devel mailing list: sane-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel Unsubscribe: Send mail with subject "unsubscribe your_password" to sane-devel-requ...@lists.alioth.debian.org