apport-cli fails to start with UnboundLocalError

Bug #216151 reported by Artem Popov
6
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
High
Martin Pitt

Bug Description

Binary package hint: apport

apport-cli fails to start, when there're some pending crash errors in the queue. The following output is produced:

art-devel@teaquetzl:~$ LANG=C apport-cli
Traceback (most recent call last):
  File "/usr/bin/apport-cli", line 288, in <module>
    if not app.run_argv():
  File "/usr/lib/python2.5/site-packages/apport/ui.py", line 323, in run_argv
    return self.run_crashes()
  File "/usr/lib/python2.5/site-packages/apport/ui.py", line 110, in run_crashes
    self.run_crash(f)
  File "/usr/lib/python2.5/site-packages/apport/ui.py", line 185, in run_crash
    response = self.ui_present_crash(desktop_entry)
  File "/usr/bin/apport-cli", line 129, in ui_present_crash
    heading = _('%s closed unexpectedly on %s at %s.') % (name, date.date(), date.time())
UnboundLocalError: local variable 'name' referenced before assignment

apport version: 0.107
Ubuntu 8.04 fully updated for today

Artem Popov (artfwo)
description: updated
Revision history for this message
Artem Popov (artfwo) wrote :

The fix for this bug is trivial, please check the included diff and commit (actually fixed the problem for me) :)

Revision history for this message
Daniel Hahler (blueyed) wrote :

Thank you for your bug report and patch, which is essentially the same I've just came up with, after experiencing this bug.

Setting "Importance" to High and milestoning, because it renders apport-cli useless in Ubuntu Hardy currently.

I'm attaching my apport-fixes branch, where this is fixed in r1099.

Changed in apport:
assignee: nobody → pitti
importance: Undecided → High
milestone: none → ubuntu-8.04
status: New → Triaged
Martin Pitt (pitti)
Changed in apport:
status: Triaged → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Merged to trunk, thanks!

Changed in apport:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 0.108

---------------
apport (0.108) hardy; urgency=low

  [ Martin Pitt ]
  * apport-{gtk,qt,cli}: Fix handling of file references added by package
    hooks. (LP: #205163)
  * backends/packaging_rpm.py: Fix dependency resolution of uname(*) in the
    RPM backend. Thanks to Patryk Zawadzki! (LP: #213018)
  * backends/packaging_rpm.py: Fix RPM platform parsing, thanks to Patryk
    Zawadzki! (LP: #213015)
  * po/de.po: Fix typo (missing space).
  * debian/apport.default: Disable Apport for the final Hardy release, since
    it is less useful in stable releases, and drains a lot of CPU and I/O
    power on crashes. Disabling it here instead of in update-notifier/adept is
    more discoverable and more centralized.

  [ Daniel Hahler ]
  * bin/apport-retrace: catch the same exceptions from Report.load() like
    ui.load_report() does (LP: #211899)
  * Fix uncaught exceptions in apport itself (LP: #215929):
    - apport/REThread.py: check if "sys" exists in the except block of
      REThread.run()
    - apport_python_hook.py: check if "sys" exists in the finally block of
      apport_excepthook
  * cli/apport-cli: Fix UnboundLocalError in ui_present_crash, which rendered
    apport-cli useless (for reporting crashes) (LP: #216151)

 -- Martin Pitt <email address hidden> Wed, 16 Apr 2008 12:24:32 +0200

Changed in apport:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers