apport crashes when /etc/apport/native-origins.d contains any files.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apport (Ubuntu) |
Fix Released
|
Low
|
Martin Pitt | ||
Lucid |
Fix Released
|
Low
|
Unassigned | ||
Oneiric |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
File "/usr/lib/
self._retval = self.__
File "/usr/lib/
not apport.
File "/usr/lib/
for line in open(f):
IOError: [Errno 2] Datei oder Verzeichnis nicht gefunden: 'firefox'
A short look at the source shows that os.listdir is used, but the directory path is not joined onto the open:
try:
for f in os.listdir(
for line in open(f):
except OSError:
pass
Now, this is wrong on a number of issues:
os.listdir returns only the basenames => so you need open(os.
Furthermore, open raises an IOError, so the OSError only catches issues with os.listdir, so if it should cover the open too, it should be: except (OSError, IOError): # notice the tuple.
Alternatively you can also use glob.glob(
Package version: 1.13.3-0ubuntu2
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Expected behaviour: Bug reporter should not crash.
What happened: apport crashed with a traceback.
I can also provide a fix as a patch if needed, but it's rather a trivial thing, packaging it up as a new package is probably more work, the detailed description how to fix is above.
Thanks, Andreas
affects: | ubuntu → apport (Ubuntu) |
Changed in apport (Ubuntu Oneiric): | |
status: | New → Fix Committed |
tags: |
added: verification-done removed: verification-needed |
As I said, it's not exactly huge, so I added the patch.