Crash when hooks add file references: AttributeError: 'tuple' object has no attribute 'splitlines'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apport (Ubuntu) |
Fix Released
|
Medium
|
Martin Pitt |
Bug Description
Binary package hint: apport
I was busy with a new installation under vmware..
it was bussy displaying the disk partitions, but it didn't show any partitions, and suddenly something crashed...
ProblemType: Crash
Architecture: i386
CrashReports:
600:0:
600:0:
Date: Sat Mar 22 15:37:27 2008
DistroRelease: Ubuntu 7.10
ExecutablePath: /usr/share/
InterpreterPath: /usr/bin/python2.5
Package: apport-qt 0.98
PackageArchitec
ProcCmdline: /usr/bin/python /usr/share/
ProcCwd: /home/ubuntu
ProcEnviron:
SHELL=/bin/bash
PATH=/
LANG=en_US.UTF-8
PythonArgs: ['/usr/
SourcePackage: apport
Title: apport-qt crashed with AttributeError in ui_present_
Uname: Linux ubuntu 2.6.22-14-generic #1 SMP Wed Oct 10 06:00:47 GMT 2007 i686 GNU/Linux
ERROR:
Traceback (most recent call last):
File "/usr/share/
app.run_argv()
File "/var/lib/
self.
File "/var/lib/
self.
File "/var/lib/
response = self.ui_
File "/usr/share/
lines = self.report[
AttributeError: 'tuple' object has no attribute 'splitlines'
description: | updated |
Thank you for your bug report.
Actually, this crash is a crash of the crash reporter (apport) itself.
Please attach the crash file for the vmware crash itself to this bug report here. Hopefully it's in /var/crash/.
Now analyzing..
This is similar to bug 84196, which had been fixed for Feisty (bzr revno 566).
But in bzr revno 979 this appears to have regressed. It does not check for attribute "splitlines" anymore, but if it has no attribute "gzipvalue" and is not binary data.
Given a tuple, this does not have an attribute "gzipvalue" and depending on its values, _is_binary will return False.
The code in question (in Ubuntu Hardy) is: self.report[ key], 'gzipvalue') and not self.report. _is_binary( self.report[ key]):
lines = self.report[ key].splitlines ()
QTreeWidg etItem( keyitem, [line])
keyitem. setExpanded( True)
QTreeWidgetIt em (keyitem, [_('(binary data)')])
# string value
if not hasattr(
for line in lines:
if len(lines) < 4:
else:
And _is_binary, which should probably check if the given data is actually a string?!
def _is_binary(self, string):
'''Check if the given strings contains binary data.'''
for c in string:
return True
if c < ' ' and not c.isspace():
return False