problem_report.py's Report object is too strict, causing apport-collect -p xorg (for instance) to fail.

Bug #380811 reported by Carey Underwood
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

problem_report dies with an assertion failure on "fglrx-loaded" because it includes the dash.

Current behavior: https://bugs.launchpad.net/ubuntu/+bug/380807/comments/1
  * Notice that there's only a single attachment

Expected behavior (with the errant assert statement commented out): https://bugs.launchpad.net/ubuntu/+bug/380807/comments/3
 * Notice that there several attachments, and the header comment includes much more detail.

Kurt Wall (kwall)
affects: ubuntu → apport (Ubuntu)
Martin Pitt (pitti)
Changed in apport (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: New → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

trunk r1454

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

This bug was fixed in the package apport - 1.2.1-0ubuntu2

---------------
apport (1.2.1-0ubuntu2) karmic; urgency=low

  * debian/control: Update Vcs-Bzr: for new location (moved from project
    branch to package branch).
  * Merge bug fixes from trunk:
    - apport-cli: Fix report saving in "bug report" mode. (LP: #353253)
    - Drop "UnsupportableReason" field, it is too similar to
      UnreportableReason and just confusing.
    - ui.py: Check UnreportableReason for run_report_bug() as well.
      (LP: #361359)
    - general-hooks/generic.py: Do not report problems with low free space on
      / or /home. (LP: #381047)
    - launchpad.py: Do not overwrite report['Title'].
    - launchpad.py: Repair support for extra tags.
    - New function apport.hookutils.root_command_output() to run a command as
      root, through gksu/kdesudo/sudo, depending on the desktop environment.
      (Part of UbuntuSpec:desktop-karmic-symptom-based-bug-reporting)
    - launchpad.py: Fetch DpkgTerminalLog. (LP: #382589)
    - launchpad.py: More robust download(), fixes other part of (LP: #382589)
    - problem_report.py: Allow dashes and underscores in key names. Update
      doc/data-format.tex accordingly. (LP: #380811)

 -- Martin Pitt <email address hidden> Tue, 02 Jun 2009 11:59:41 +0200

Changed in apport (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Carey Underwood (cwillu) wrote :

Still fails in some circumstances:

cwillu@cwillu-acer:~$ ubuntu-bug xorg
Traceback (most recent call last):
  File "/usr/share/apport/apport-gtk", line 264, in <module>
    app.run_argv()
  File "/usr/lib/python2.6/dist-packages/apport/ui.py", line 333, in run_argv
    return self.run_report_bug()
  File "/usr/lib/python2.6/dist-packages/apport/ui.py", line 322, in run_report_bug
    self.file_report()
  File "/usr/lib/python2.6/dist-packages/apport/ui.py", line 598, in file_report
    url = self.crashdb.get_comment_url(self.report, ticket)
  File "/usr/lib/python2.6/dist-packages/apport/crashdb_impl/launchpad.py", line 180, in get_comment_url
    title = report.setdefault('Title', report.standard_title())
  File "/usr/lib/python2.6/UserDict.py", line 63, in setdefault
    self[key] = failobj
  File "/usr/lib/python2.6/dist-packages/problem_report.py", line 485, in __setitem__
    and (hasattr(v[0], 'isalnum') or hasattr(v[0], 'read')))), (k, v)
AssertionError: ('Title', None)

Changed in apport (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

This is a different problem. Report values must not be None, this needs to be fixed in xorg's package hook.

Changed in apport (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Ah, nevermind. It's not a bug in the xorg package hook but in apport's launchpad.py. Fixed in trunk r1455. Thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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