Bug 821707 - [abrt] hplip-3.12.2-4.fc15: hp-scan:636:<module>:IndexError: list index out of range
Summary: [abrt] hplip-3.12.2-4.fc15: hp-scan:636:<module>:IndexError: list index out o...
Keywords:
Status: CLOSED DUPLICATE of bug 846534
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 15
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:1d53f44d111ef20829ed60a49de...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-15 11:48 UTC by Sam Tuke
Modified: 2012-08-29 11:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 846534 (view as bug list)
Environment:
Last Closed: 2012-08-07 20:06:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (21.89 KB, text/plain)
2012-05-15 11:48 UTC, Sam Tuke
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1000299 0 None None None Never

Description Sam Tuke 2012-05-15 11:48:39 UTC
abrt version: 2.0.3
architecture:   x86_64
cmdline:        
comment:        I ran hp-scan from cli. scanning using this method has worked for past 18 months. Since last update to hplip package this error occurs.
component:      hplip
executable:     /usr/bin/hp-scan
kernel:         2.6.43.2-6.fc15.x86_64
os_release:     Fedora release 15 (Lovelock)
package:        hplip-3.12.2-4.fc15
reason:         hp-scan:636:<module>:IndexError: list index out of range
time:           Tue May 15 12:46:22 2012
uid:            500
username:       samtuke

backtrace:      Text file, 22417 bytes

Comment 1 Sam Tuke 2012-05-15 11:48:42 UTC
Created attachment 584645 [details]
File: backtrace

Comment 2 Jiri Popelka 2012-05-15 13:01:08 UTC
Can you attach the output of running hp-scan ?

Comment 3 Sam Tuke 2012-05-15 15:14:43 UTC
Jiri:

$ hp-scan 
                                                                                                                                                                                                                                             
HP Linux Imaging and Printing System (ver. 3.12.2)                                                                                                                                                                                           
Scan Utility ver. 2.2

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.


-----------------
| SELECT DEVICE |
-----------------

  Num       Scan device URI                                         
  --------  --------------------------------------------------------
  0         hpaio:/net/HP_LaserJet_M1522nf_MFP?ip=192.168.1.104     
  1         hpaio:/usb/Photosmart_C7200_series?serial=MY78UG32DJ04YG
  2         hpaio:/net/Photosmart_C7200_series?ip=192.168.1.86      

Enter number 0...2 for device (q=quit) ?0
warning: No destinations specified. Adding 'file' destination by default.
Using device hpaio:/net/HP_LaserJet_M1522nf_MFP?ip=192.168.1.104
Opening connection to device...
warning: Invalid resolution. Using closest valid resolution of 300 dpi
warning: Valid resolutions are  dpi.
Traceback (most recent call last):
  File "/usr/bin/hp-scan", line 636, in <module>
    res = valid_res[0]
IndexError: list index out of range

Comment 4 Jiri Popelka 2012-05-16 15:11:18 UTC
Seems that the SANE driver returns empty list of valid resolutions for your printer. If I compare 3.12.2 with 3.11.12 (previous stable update) I see that previously there were some resolutions hard-wired in the code.

diff -r hplip-3.11.12/scan/sane/soapht.c hplip-3.12.2/scan/sane/soapht.c
516,525c517
<    i=1;
<    session->resolutionList[i++] = 75;
<    session->resolutionList[i++] = 100;
<    session->resolutionList[i++] = 150;
<    session->resolutionList[i++] = 200;
<    session->resolutionList[i++] = 300;
<    session->resolutionList[i++] = 600;
<    //session->resolutionList[i++] = 1200;
<    session->resolutionList[0] = i-1;    /* length of word_list */
<    soapht_control_option(session, SOAP_OPTION_SCAN_RESOLUTION, SANE_ACTION_SET_AUTO, NULL, NULL); /* set default option */
---
>      soapht_control_option(session, SOAP_OPTION_SCAN_RESOLUTION, SANE_ACTION_SET_AUTO, NULL, NULL); /* set default option */

It's possible that your problem (SANE returning empty list of scan resolutions for your printer) was always there but the above mentioned change uncovered it.
As I have no idea where to start digging in the SANE driver I think it would be better to report this upstream.

Comment 5 Jiri Popelka 2012-05-16 15:33:50 UTC
Reported upstream as
https://bugs.launchpad.net/hplip/+bug/1000299

Sam, you'll probably need to supply some more info when asked.

Comment 6 Jiri Popelka 2012-05-17 10:20:37 UTC
So, we have a soapht.c source from upstream.
It's actually a 3.12.4 version with one small tweak on top of it.

I built 3.12.4 without [1] and with [2] this "tweak" and need you to test both of them.

First download all the .rpm files from [1] into separate directory,
go into that directory and update hplip with
su -c 'yum --nogpgcheck localupdate *.rpm'
Close hp-systray if running. Then run 'hp-scan' or 'xsane' to do scanning.
Then do the same with [2].

[1] http://koji.fedoraproject.org/koji/taskinfo?taskID=4083198
[2] http://koji.fedoraproject.org/koji/taskinfo?taskID=4083221

Comment 7 Sam Tuke 2012-05-17 13:35:36 UTC
Same problem with both; the output looks identical, just formatted a bit differently. I haven't done a diff, and I didn't restart the machine or cups or anything between the updates, but I followed the procedure exactly as you said.

Output with [1]:

$ hp-scan

HP Linux Imaging and Printing System (ver. 3.12.4)
Scan Utility ver. 2.2

Copyright (c) 2001-14 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.


-----------------
| SELECT DEVICE |
-----------------

  Num       Scan device URI                                         
  --------  --------------------------------------------------------
  0*        hpaio:/net/HP_LaserJet_M1522nf_MFP?ip=192.168.1.104     
  1         hpaio:/usb/Photosmart_C7200_series?serial=MY78UG32DJ04YG
  2         hpaio:/net/Photosmart_C7200_series?ip=192.168.1.86      

Enter number 0...2 for device (q=quit, <enter>=default: 0*) ?0
warning: No destinations specified. Adding 'file' destination by default.
Using device hpaio:/net/HP_LaserJet_M1522nf_MFP?ip=192.168.1.104
Opening connection to device...
warning: Invalid resolution. Using closest valid resolution of 300 dpi
warning: Valid resolutions are  dpi.
Traceback (most recent call last):
  File "/usr/bin/hp-scan", line 636, in <module>
    res = valid_res[0]
IndexError: list index out of range




Output with [2]:

$ hp-scan

HP Linux Imaging and Printing System (ver. 3.12.4)
Scan Utility ver. 2.2

Copyright (c) 2001-14 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.
                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                             
-----------------                                                                                                                                                                                                                            
| SELECT DEVICE |                                                                                                                                                                                                                            
-----------------                                                                                                                                                                                                                            
                                                                                                                                                                                                                                             
  Num       Scan device URI                                                                                                                                                                                                                  
  --------  --------------------------------------------------------                                                                                                                                                                         
  0*        hpaio:/net/HP_LaserJet_M1522nf_MFP?ip=192.168.1.104                                                                                                                                                                              
  1         hpaio:/usb/Photosmart_C7200_series?serial=MY78UG32DJ04YG                                                                                                                                                                         
  2         hpaio:/net/Photosmart_C7200_series?ip=192.168.1.86                                                                                                                                                                               
                                                                                                                                                                                                                                             
Enter number 0...2 for device (q=quit, <enter>=default: 0*) ?0                                                                                                                                                                               
warning: No destinations specified. Adding 'file' destination by default.                                                                                                                                                                    
Using device hpaio:/net/HP_LaserJet_M1522nf_MFP?ip=192.168.1.104                                                                                                                                                                             
Opening connection to device...                                                                                                                                                                                                              
warning: Invalid resolution. Using closest valid resolution of 300 dpi                                                                                                                                                                       
warning: Valid resolutions are  dpi.                                                                                                                                                                                                         
Traceback (most recent call last):                                                                                                                                                                                                           
  File "/usr/bin/hp-scan", line 636, in <module>
    res = valid_res[0]
IndexError: list index out of range

Comment 8 Jiri Popelka 2012-06-20 06:48:52 UTC
Could you re-try with hplip-3.12.6 from updates-testing ?
Update with:
yum update --enablerepo=updates-testing 'hplip*'

Comment 9 Sam Tuke 2012-06-20 11:49:23 UTC
(In reply to comment #8)
> Could you re-try with hplip-3.12.6 from updates-testing ?
> Update with:
> yum update --enablerepo=updates-testing 'hplip*'

Same output after update:


[samtuke@sam-desktop ~]$ hp-scan                                                                                                                                                                                                             
                                                                                                                                                                                                                                             
HP Linux Imaging and Printing System (ver. 3.12.6)                                                                                                                                                                                           
Scan Utility ver. 2.2                                                                                                                                                                                                                        
                                                                                                                                                                                                                                             
Copyright (c) 2001-14 Hewlett-Packard Development Company, LP                                                                                                                                                                                
This software comes with ABSOLUTELY NO WARRANTY.                                                                                                                                                                                             
This is free software, and you are welcome to distribute it                                                                                                                                                                                  
under certain conditions. See COPYING file for more details.


-----------------
| SELECT DEVICE |
-----------------

  Num       Scan device URI                                         
  --------  --------------------------------------------------------
  0         hpaio:/net/Photosmart_C7200_series?ip=192.168.1.103     
  1*        hpaio:/net/HP_LaserJet_M1522nf_MFP?ip=192.168.1.104     
  2         hpaio:/usb/Photosmart_C7200_series?serial=MY78UG32DJ04YG
  3         hpaio:/net/Photosmart_C7200_series?ip=192.168.1.86      

Enter number 0...3 for device (q=quit, <enter>=default: 1*) ?1
warning: No destinations specified. Adding 'file' destination by default.
Using device hpaio:/net/HP_LaserJet_M1522nf_MFP?ip=192.168.1.104
Opening connection to device...
warning: Invalid resolution. Using closest valid resolution of 300 dpi
warning: Valid resolutions are  dpi.
Traceback (most recent call last):
  File "/usr/bin/hp-scan", line 636, in <module>
    res = valid_res[0]
IndexError: list index out of range

Comment 10 Peter Bieringer 2012-07-21 14:03:42 UTC
This bug hits me also on Fedora 16 with hplip-3.12.2-4.fc16, downgrading to hpijs-3.11.10-7.fc16 fixes the issue.

Unfortunately, in updates-testing is no newer version than 3.12.2-4 :-(

@Reporter: please extend version with FC16

Comment 11 Sam Tuke 2012-07-21 18:43:16 UTC
I have since updated to F17 (using preupgrade, presumably with the additional repositories still enabled from earlier in this thread). Since doing so, the issue is resolved.

Anything I can usefully do with the systems I now have to help with this bug?

Comment 12 Jiri Popelka 2012-07-23 12:35:40 UTC
Peter, can you try this build (3.12.6.fc16) ?
https://koji.fedoraproject.org/koji/buildinfo?buildID=326237

Comment 13 Peter Bieringer 2012-07-25 06:01:24 UTC
(In reply to comment #12)
> Peter, can you try this build (3.12.6.fc16) ?
> https://koji.fedoraproject.org/koji/buildinfo?buildID=326237

Tested, did not solve the issue :-(

Comment 14 Fedora End Of Life 2012-08-07 20:06:13 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 15 Tim Waugh 2012-08-29 11:49:42 UTC

*** This bug has been marked as a duplicate of bug 846534 ***


Note You need to log in before you can comment on or make changes to this bug.