colorized output of unity_support_test causes problems for apport

Bug #716143 reported by Brian Murray
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Apport
Incomplete
Undecided
Unassigned
Nux
Invalid
Undecided
Unassigned
Unity
Invalid
Undecided
Unassigned
nux (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

While the output of unity_support_test is rather pretty the colorization causes a crash in apport when trying to add the output as an attachment to the bug report. I ended up having to work around this like this so:

                ust = command_output_quiet([
                    '/usr/lib/nux/unity_support_test', '-p'])
                ust = ust.replace('\x1b','').replace('[0;38;48m','').replace('[1;32;48m','')
                report['UnitySupportTest'] = ust

This is rather terrible and arguably its a bug in apport, however looking at the output of unity_support_test it seems rather verbose and a quieter non-colorized version might make things easier.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: nux-tools 0.9.18-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-2.29-generic 2.6.38-rc3
Uname: Linux 2.6.38-2-generic x86_64
Architecture: amd64
CheckboxSubmission: fee5e196cb921cbd36888f428b38b488
CheckboxSystem: 2a6f54df59af338184485e85cbcf0d32
Date: Wed Feb 9 13:58:58 2011
ProcEnviron:
 LANGUAGE=en_US.UTF-8:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 LC_MESSAGES=en_AG.utf8
 SHELL=/bin/zsh
SourcePackage: nux

Revision history for this message
Brian Murray (brian-murray) wrote :
Revision history for this message
Alex Launi (alexlauni) wrote :

This is definitely a bug in apport. Colorizing output in an xterm is totally legal, apport should not crash on that. Could you please attach a trace from apport and possibly your output of unity_support_test so that apport can be fixed?

Changed in nux:
status: New → Invalid
Changed in unity:
status: New → Invalid
Changed in nux (Ubuntu):
status: New → Invalid
Martin Pitt (pitti)
Changed in apport:
status: New → Incomplete
Revision history for this message
Brian Murray (brian-murray) wrote :

The original crash can be found in bug 710630. I've tried recreating it now without success.

$ ubuntu-bug fglrx
hook /usr/share/apport/package-hooks//source_fglrx-installer.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 636, in add_hooks_info
    symb['add_info'](self, ui)
  File "/usr/share/apport/package-hooks//source_fglrx-installer.py", line 428, in add_info
    attach_3d_info(report, ui)
  File "/usr/share/apport/package-hooks//source_fglrx-installer.py", line 324, in attach_3d_info
    '/usr/lib/nux/unity_support_test'])
  File "/usr/lib/python2.7/dist-packages/problem_report.py", line 500, in __setitem__
    and (hasattr(v[0], 'isalnum') or hasattr(v[0], 'read'))))
AssertionError

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.