Apport hooks bug 'NoneType' has no len()

Bug #518295 reported by arky
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Low
Martin Pitt

Bug Description

Binary package hint: nautilus

crash while trying to report a bug

$ ubuntu-bug nautilus
hook /usr/share/apport/package-hooks//source_nautilus.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/apport/report.py", line 639, in add_hooks_info
    symb['add_info'](self)
  File "/usr/share/apport/package-hooks//source_nautilus.py", line 15, in add_info
    report["usr_lib_nautilus"] += apport.hookutils.package_versions(apport.packaging.get_file_package(os.path.join(dir[0],files)))
  File "/usr/lib/python2.6/dist-packages/apport/hookutils.py", line 483, in package_versions
    for package in packaging.package_name_glob(package_pattern):
  File "/usr/lib/python2.6/dist-packages/apport/packaging_impl.py", line 594, in package_name_glob
    return glob.fnmatch.filter(self._cache().keys(), nameglob)
  File "/usr/lib/python2.6/fnmatch.py", line 46, in filter
    res = translate(pat)
  File "/usr/lib/python2.6/fnmatch.py", line 78, in translate
    i, n = 0, len(pat)
TypeError: object of type 'NoneType' has no len()

ProblemType: Bug
Architecture: i386
Date: Sun Feb 7 12:12:58 2010
DistroRelease: Ubuntu 10.04
Package: nautilus 1:2.29.2-0ubuntu4
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-6.8-generic
SourcePackage: nautilus
Uname: Linux 2.6.32-6-generic i686

Revision history for this message
arky (arky) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report.

Martin, any clue if that's something nautilus does wrong or an apport issue?

Changed in nautilus (Ubuntu):
importance: Undecided → Medium
importance: Medium → Low
Revision history for this message
Martin Pitt (pitti) wrote :

It is a bug in the nautilus package hook: Any file which is not packaged (I have a /usr/lib/nautilus/extensions-2.0/libnautilus-brasero-extension.so.orig) causes apport.packaging.get_file_package() to return None, which package_versions() doesn't digest.

However, I'll just make package_versions() get along with this.

affects: nautilus (Ubuntu) → apport (Ubuntu)
Changed in apport (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

trunk r1711

Changed in apport (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
arky (arky) wrote :

Thank you Martin

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 1.12.1-0ubuntu1

---------------
apport (1.12.1-0ubuntu1) lucid; urgency=low

  [ Martin Pitt ]
  * New upstream bug fix release:
    - launchpad.py: Do not keep escalating bugs, just escalate at the 10th
      duplicate.
    - Improve error message if a symptom script did not determine a package
      name. (LP: #503834)
    - general-hooks/generic.py: Fix crash on libGL check with empty
      StacktraceTop.
    - Review and clean up usage of chmod(). This fixes a small race condition
      in the Python exception hook where a local attacker could read the
      information from another user's crash report. (LP: #516029)
    - hookutils, package_versions(): Ignore "None" packages, for more robust
      package hooks. (LP: #518295)
  * debian/apport.install: Actually install the bash completion file.
    (LP: #218933)
  * Bump Standards-Version to 3.8.4 (no changes necessary).

  [ Leann Ogasawara ]
  * source_linux.py: Tag kernel bugs which utilize a driver from staging. Also
    provide the list of staging drivers in use. Prefix suspend/resume bug
    titles with "[STAGING]" if a staging driver was being used.
    (LP: #524174, #524167)
 -- Martin Pitt <email address hidden> Mon, 22 Feb 2010 21:58:16 +0100

Changed in apport (Ubuntu):
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.