Bug 543937

Summary: [abrt] applet crash localizing statereason
Product: [Fedora] Fedora Reporter: Steve <bugzilla>
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: 11CC: jpopelka
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard: abrt_hash:bdaa6caf
Fixed In Version: 1.1.15-6.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-10 04:04:57 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 Steve 2009-12-03 14:44:21 UTC
abrt 1.0.0 detected a crash.

How to reproduce
-----
1. Just went to print over network server
2.
3.

backtrace
-----
Summary: TBbdaa6caf statereason.py:129:get_description:RuntimeError: cupsGetPPD2 failed

Traceback (most recent call last):
  File "/usr/share/system-config-printer/applet.py", line 436, in <module>
    trayicon=trayicon)
  File "/usr/share/system-config-printer/jobviewer.py", line 317, in __init__
    encryption=self.encryption)
  File "/usr/share/system-config-printer/monitor.py", line 166, in __init__
    self.refresh ()
  File "/usr/share/system-config-printer/monitor.py", line 583, in refresh
    self.update_jobs (jobs)
  File "/usr/share/system-config-printer/monitor.py", line 713, in update_jobs
    self.check_state_reasons (my_printers, printer_jobs)
  File "/usr/share/system-config-printer/monitor.py", line 292, in check_state_reasons
    self.watcher.state_reason_added (self, reason)
  File "/usr/share/system-config-printer/jobviewer.py", line 1380, in state_reason_added
    (title, text) = reason.get_description ()
  File "/usr/share/system-config-printer/statereason.py", line 129, in get_description
    f = self.connection.getPPD(self.printer)
RuntimeError: cupsGetPPD2 failed

Local variables in innermost frame:
self: <statereason.StateReason (WARNING,i865,com.apple.print.recoverable)>
messages: {'media-low': ('Paper low', "Printer '%s' is low on paper."), 'toner-empty': ('Toner empty', "Printer '%s' has no toner left."), 'connecting-to-device': ('Not connected?', "Printer '%s' may not be connected."), 'door-open': ('Door open', "The door is open on printer '%s'."), 'media-empty': ('Out of paper', "Printer '%s' is out of paper."), 'marker-supply-empty': ('Ink empty', "Printer '%s' has no ink left."), 'toner-low': ('Toner low', "Printer '%s' is low on toner."), 'cover-open': ('Cover open', "The cover is open on printer '%s'."), 'marker-supply-low': ('Ink low', "Printer '%s' is low on ink."), 'other': ('Printer error', "There is a problem on printer '%s'."), 'offline': ('Printer off-line', "Printer '%s' is currently off-line.")}
title: Printer warning

cmdline: python /usr/share/system-config-printer/applet.py 
component: system-config-printer
executable: /usr/share/system-config-printer/applet.py
kernel: 2.6.31.6-145.fc12.i686.PAE
package: system-config-printer-1.1.13-10.fc12
uuid: bdaa6caf

Comment 1 Steve 2009-12-03 14:44:24 UTC
Created attachment 375796 [details]
File: backtrace

Comment 2 Jiri Popelka 2009-12-03 14:53:43 UTC
Thanks for the report.

If it is reproducible please run the printing troubleshooter.
System->Administration->Printing,
then Help->Troubleshoot from the menu bar.
Select your printer, enable debugging, try to print test page
and save the diagnostic output.
Attach the output to this bug report.
Thanks.

Comment 3 Tim Waugh 2009-12-03 15:09:32 UTC
I've found the problem actually: although StateReason.get_description() handles cups.IPPError exceptions, the cups.getPPD call can additionally raise a RuntimeError exception if the underlying cupsGetPPD2 function fails without there being any IPP error status.  This can happen if (for example) there is no PPD for the queue, or if we failed to connect to the remote CUPS server.

I've added RuntimeError to the 'except' line to catch this.

Comment 4 Tim Waugh 2009-12-03 15:10:17 UTC
Affects: Fedora 11, Fedora 12, Fedora devel.

Comment 5 Fedora Update System 2009-12-04 23:54:30 UTC
system-config-printer-1.1.15-3.fc11 has been pushed to the Fedora 11 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/F11/FEDORA-2009-10893

Comment 6 Fedora Update System 2009-12-04 23:58:11 UTC
system-config-printer-1.1.15-3.fc12 has been pushed to the Fedora 12 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/F12/FEDORA-2009-12094

Comment 7 Fedora Update System 2009-12-10 04:04:21 UTC
system-config-printer-1.1.15-6.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2009-12-10 04:07:54 UTC
system-config-printer-1.1.15-6.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.