Comment 2 for bug 205163

Revision history for this message
Daniel Hahler (blueyed) wrote : Re: failed to create disk partitions under vmware

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:
            # string value
            if not hasattr(self.report[key], 'gzipvalue') and not self.report._is_binary(self.report[key]):
                lines = self.report[key].splitlines()
                for line in lines:
                    QTreeWidgetItem(keyitem, [line])
                if len(lines) < 4:
                    keyitem.setExpanded(True)
            else:
                QTreeWidgetItem (keyitem, [_('(binary data)')])

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:
            if c < ' ' and not c.isspace():
                return True
        return False