[apport] apport-retrace crashed with UnboundLocalError in add_package_info()

Bug #82561 reported by Colin Watson
2
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

Binary package hint: apport

I was trying to run apport-retrace against an evolution-alarm-notify crash dump, which I'll attach here in a moment; it complained "WARNING: report file does not have Package attribute; adding it now, but cannot verify version" and then crashed.

ProblemType: Crash
Date: Wed Jan 31 22:33:20 2007
DistroRelease: Ubuntu 7.04
ExecutablePath: /usr/bin/apport-retrace
InterpreterPath: /usr/bin/python2.5
Package: apport 0.46
ProcCmdline: /usr/bin/python /usr/bin/apport-retrace _usr_lib_evolution_2.10_evolution-alarm-notify.1000.crash
ProcCwd: /var/crash
ProcEnviron:
 SHELL=/bin/bash
 PATH=/home/cjwatson/bin:/usr/lib/surfraw:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games
 LC_COLLATE=C
 LANG=en_GB.UTF-8
 LANGUAGE=en_GB:en
PythonArgs: ['/usr/bin/apport-retrace', '_usr_lib_evolution_2.10_evolution-alarm-notify.1000.crash']
SourcePackage: apport
Uname: Linux cairhien 2.6.20-4-powerpc #2 Fri Jan 5 03:10:00 UTC 2007 ppc GNU/Linux

Revision history for this message
Colin Watson (cjwatson) wrote : Dependencies.txt
Revision history for this message
Colin Watson (cjwatson) wrote : ProcMaps.txt
Revision history for this message
Colin Watson (cjwatson) wrote : ProcStatus.txt
Revision history for this message
Colin Watson (cjwatson) wrote : Traceback.txt
Revision history for this message
Colin Watson (cjwatson) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote :

Adding "v = ''" at the top of that loop seems to help a bit.

Changed in apport:
status: Unconfirmed → Confirmed
Kees Cook (kees)
Changed in apport:
status: Confirmed → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Colin, your workaround was uploaded to Feisty in apport 0.47. I did a proper fix in bzr head, will be uploaded after herd-3.

Changed in apport:
assignee: nobody → pitti
Revision history for this message
Martin Pitt (pitti) wrote :

 apport (0.48) feisty; urgency=low
 .
   New feature: Infrastructure for reporting kernel Oopses:
 .
   * Add bin/kernel_hook and ship it in /usr/share/apport. The kernel can call
     this on an Oops. Add a test suite for it to test-hooks.
   * apport/ui.py: Add support for reporting ProblemType: Kernel reports, and
     add test suite for the workflow.
   * gtk/apport-gtk{,.glade}: Add implementation for ui_present_kernel_error().
 .
   Improvements:
 .
   * Merged various apport-retrace improvements from Kees' branch:
     - Add various options to override some report fields with local values.
     - Add --verbose option and be quiet by default.
     - Read ProcMaps for additional library dependencies, to also catch
       libraries loaded at runtime (plugins).
     - Set correct debug file directory when starting an interactive gdb
       session with -g.
   * Add gtk/apport-gtk.desktop.in: Desktop file for calling apport-gtk in
     'file a distro bug' mode, to be displayed in gnome-panel's System menu
     (see bug-reporting-tool spec). Also add a Makefile to do the
     intltool-merge dance, add it to POTFILES.in, and ship it in
     debian/apport-gtk.install.
   * bin/apport: Call add_os_info(), so that we get architecture information
     even for 'naked' reports which didn't go through UI enrichment.
   * Add ./test-hooks: Test suite for the various package hooks shipped with
     apport. Test the package problem hook for now.
 .
   Bug fixes:
 .
   * debian/control: Add missing python-apt dependency to apport
     (apport-retrace needs it). Thanks to Kees Cook for noticing.
   * debian/control: Add gdb dependency to python-apport.
   * backends/packaging-dpkg.py test suite: Verify that packages returned by
     get_dependencies() actually exist. This catches the 'chops off first
     letter of package name sometimes' bug.
   * backends/packaging-dpkg.py, _init_status(): Add missing space to Depends:
     field format in dpkg-query call. This fixes the chopped-off first letters
     in the 'Dependencies' report field.
   * setup.py: Remove version attribute, we do not update and use it anyway.
   * apport/ui.py: Do not crash if Package: specifies a nonexisting package.
     Display a proper error message instead. Add test_run_crash_errors() test
     case.
   * apport/report.py, add_package_info(): Fix crash when the first dependency
     is not installed. Closes: LP#82561
   * gtk/apport-gtk.glade: Remove window titles in alert dialogs to comply with
     Gnome HIG. Closes: LP#83123

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.