Bug 603034

Summary: [abrt] crash in system-config-printer-1.2.2-4.fc13: gtkspinner.py:62:_set_frame:IndexError: list index out of range
Product: [Fedora] Fedora Reporter: Florian Fischer <findingharrylime>
Component: system-config-printerAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: jpopelka, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: abrt_hash:054fb0c7
Fixed In Version: system-config-printer-1.2.3-3.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-01 18:38:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace none

Description Florian Fischer 2010-06-11 11:18:50 UTC
abrt 1.1.1 detected a crash.

architecture: x86_64
cmdline: python /usr/share/system-config-printer/system-config-printer.py
component: system-config-printer
executable: /usr/share/system-config-printer/system-config-printer.py
kernel: 2.6.33.5-112.fc13.x86_64
package: system-config-printer-1.2.2-4.fc13
reason: gtkspinner.py:62:_set_frame:IndexError: list index out of range
release: Fedora release 13 (Goddard)

backtrace
-----
gtkspinner.py:62:_set_frame:IndexError: list index out of range

Traceback (most recent call last):
  File "/usr/share/system-config-printer/gtkspinner.py", line 72, in _next_frame
    self._set_frame (n)
  File "/usr/share/system-config-printer/gtkspinner.py", line 62, in _set_frame
    self.image.set_from_pixbuf (self.frames[n])
IndexError: list index out of range

Local variables in innermost frame:
self: <gtkspinner.Spinner instance at 0x2398a70>
n: 1

Comment 1 Florian Fischer 2010-06-11 11:20:04 UTC
Created attachment 423243 [details]
File: backtrace

Comment 2 Jiri Popelka 2010-06-14 17:34:59 UTC
def _set_frame (self, n):
    self._current_frame = n
    if self.n_frames == 0:
        self.image.clear ()
        return
    self.image.set_from_pixbuf (self.frames[n])

We know that when the crash occured:
a) n_frames was > 0, i.e. some icon was loaded (otherwise n_frames would be 0) in __init__
b) frames[] was empty or had only one member (because frames[1] threw IndexError)

The only situation I can think of
when this crash could occur is
when there was icon with only one frame loaded (don't ask me how),
so n_frames was 1 and frames[] had one member.
We count with the fact that the icon has min. 2 frames (first frame is empty).
Although I don't know how such an icon could have been loaded I think we can treat such situation the same way as if there was no icon loaded.

def _set_frame (self, n):
    self._current_frame = n
-    if self.n_frames == 0:
+    if self.n_frames < 2:
        self.image.clear ()
        return
    self.image.set_from_pixbuf (self.frames[n])

Comment 4 Jiri Popelka 2010-06-15 10:46:57 UTC
Fixed upstream (commit 76f3189).

Comment 5 Fedora Update System 2010-06-28 16:32:15 UTC
system-config-printer-1.2.3-3.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/system-config-printer-1.2.3-3.fc13

Comment 6 Fedora Update System 2010-06-28 23:37:54 UTC
system-config-printer-1.2.3-3.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update system-config-printer'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/system-config-printer-1.2.3-3.fc13

Comment 7 Fedora Update System 2010-07-01 18:37:59 UTC
system-config-printer-1.2.3-3.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.