[Ubuntu-x-swat] [Bug 710630] Re: fglrx apport hook AssertionError in __setitem__

2011-02-26 Thread Martin Pitt
I just got to see the (kind of) duplicate bug 716143. This assertion

and (hasattr(v[0], 'isalnum') or hasattr(v[0], 'read'

would hit if the value that gets passed is neither a string nor a file
object. In particular, it would error out like this if you try to pass
None.

This can happen if the command you are calling produces an error:

def command_output_quiet(command_list):
'''
On errors, quell error message and just return empty string
'''
log = command_output(command_list)
if log[:5] == Error:
return None
return log

[...]

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

I. e. if the command produces any error, ust is None, and the assignment
to the report dictionary fails. Some invocations of command_output_quiet
are guarded with an if, some others call programs which really Should
Not Fail (tm), so these are probably okay.

I think the best approach here is to use command_output(), as we really
want to know about the actual error if unity_support_test fails.

** Changed in: xorg (Ubuntu)
   Status: Fix Released = Triaged

** Summary changed:

- fglrx apport hook AssertionError in __setitem__
+ apport hook AssertionError in __setitem__ when trying to assign None value

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xorg in ubuntu.
https://bugs.launchpad.net/bugs/710630

Title:
  apport hook AssertionError in __setitem__ when trying to assign None
  value

___
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to : ubuntu-x-swat@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-x-swat] [Bug 710630] Re: fglrx apport hook AssertionError in __setitem__

2011-02-02 Thread Bryce Harrington
Brian saw similar error reporting for compiz:
https://pastebin.canonical.com/42676/

However running unity_support_test directly doesn't cause a crash.  Not
sure exactly what's going on, maybe we should add a try/catch around
that for now.

** Changed in: xorg (Ubuntu)
   Importance: Undecided = High

** Changed in: xorg (Ubuntu)
   Status: New = Triaged

** Changed in: xorg (Ubuntu)
 Assignee: (unassigned) = Bryce Harrington (bryce)

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xorg in ubuntu.
https://bugs.launchpad.net/bugs/710630

Title:
  fglrx apport hook AssertionError in __setitem__

___
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to : ubuntu-x-swat@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-x-swat] [Bug 710630] Re: fglrx apport hook AssertionError in __setitem__

2011-02-02 Thread Brian Murray
This works fine:

In [9]: report['UnitySupportTest'] =
command_output(['/usr/lib/nux/unity_support_test', '-p'])

In [10]: report['UnitySupportTest']
Out[10]: '\x1b[0;38;48mNux: 
---\x1b[0;38;48m\n\x1b[0;38;48mNux: Device pci id 
detection ...\x1b[0;38;48m\n\x1b[0;38;48mNux: 
---\x1b[0;38;48m\n\x1b[1;32;48mNux: lspci: 01:00.0 VGA 
compatible controller [0300]: ATI Technologies Inc RV730 PRO [Radeon HD 4650] 
[1002:9498]\n\x1b[0;38;48m\n\x1b[1;32;48mNux: PCI [vendor:device]: 
[1002:9498]\x1b[0;38;48m\n\x1b[1;32;48mNux: Device Id: 
0x1002\x1b[0;38;48m\n\x1b[1;32;48mNux: Vendor Id: 
0x9498\x1b[0;38;48m\n\x1b[0;38;48mNux: 
\x1b[0;38;48m\n\x1b[0;38;48mNux: Graphics device info 
...\x1b[0;38;48m\n\x1b[0;38;48mNux: 
\x1b[0;38;48m\n\x1b[0;38;48mNux: 
\x1b[0;38;48m\n\x1b[0;38;48mNux: OpenGL version check 
...\x1b[0;38;48m\n\x1b[0;38;48mNux: 
\x1b[0;38;48m\n\x1b[1;32;48mNux: System OpenGL: 2.1 
[Minimum Required 1.4]\x1b[0;38;48m\n\x1b[0;38;48mNux: 
---_--\x1b[0;38;48m\n\x1b[0;38;48mNux: OpenGL extension 
check ...\x1b[0;38;48m\n\x1b[0;38;48mNux: 
--\x1b[0;38;48m\n\x1b[1;32;48mNux: Frame Buffer Object 
support: YES\x1b[0;38;48m\n\x1b[1;32;48mNux: ARB Vertex Program: 
YES\x1b[0;38;48m\n\x1b[1;32;48mNux: ARB Fragment Program: 
YES\x1b[0;38;48m\n\x1b[1;32;48mNux: Non Power Of Two Textures: 
YES\x1b[0;38;48m\n\x1b[1;32;48mNux: Rectangle Texture: 
YES\x1b[0;38;48m\n\x1b[1;32;48mNux: Vertex Buffer Object: 
YES\x1b[0;38;48m\n\x1b[1;32;48mNux: Pixel Buffer Object: 
YES\x1b[0;38;48m\n\x1b[0;38;48mNux: 
---\x1b[0;38;48m\n\x1b[0;38;48mNux: Unity support 
assesment ...\x1b[0;38;48m\n\x1b[0;38;48mNux: 
---\x1b[0;38;48m\n\x1b[1;32;48mNux: The system can run 
Unity.\x1b[0;38;48m'

so it is probably something in the __setitem__ funciton of
problem_report.py of apport.  It'd also be good if unity_support_test
had a switch made it not use colors.

Looking at the output of unity_support_test perhaps only the last line
is relevant?

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xorg in ubuntu.
https://bugs.launchpad.net/bugs/710630

Title:
  fglrx apport hook AssertionError in __setitem__

___
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to : ubuntu-x-swat@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help   : https://help.launchpad.net/ListHelp


Re: [Ubuntu-x-swat] [Bug 710630] Re: fglrx apport hook AssertionError in __setitem__

2011-02-02 Thread Bryce Harrington
On Wed, Feb 02, 2011 at 11:36:49PM -, Brian Murray wrote:
 Looking at the output of unity_support_test perhaps only the last line
 is relevant?

I assume in cases where the last line doesn't indicate that unity is
supported, they'd like to see the full details.

But I agree the color code stuff is ugly and should go.

If/when I ever get a few spare days I want to try to clean up the
integration of this script into the apport hook; it seems to have a
variety of problems.

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xorg in ubuntu.
https://bugs.launchpad.net/bugs/710630

Title:
  fglrx apport hook AssertionError in __setitem__

___
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to : ubuntu-x-swat@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-x-swat] [Bug 710630] Re: fglrx apport hook AssertionError in __setitem__

2011-02-02 Thread Brian Murray
As an interim solution this works around the issue and adds the data:

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

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xorg in ubuntu.
https://bugs.launchpad.net/bugs/710630

Title:
  fglrx apport hook AssertionError in __setitem__

___
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to : ubuntu-x-swat@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-x-swat] [Bug 710630] Re: fglrx apport hook AssertionError in __setitem__

2011-02-02 Thread Bryce Harrington
This issue may be worth putting in for alpha-2

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xorg in ubuntu.
https://bugs.launchpad.net/bugs/710630

Title:
  fglrx apport hook AssertionError in __setitem__

___
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to : ubuntu-x-swat@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-x-swat] [Bug 710630] Re: fglrx apport hook AssertionError in __setitem__

2011-02-02 Thread Bryce Harrington
I've pushed the fix (along with a try/except block to be extra sure) to git.
Checking with Kate about possible inclusion in alpha-2.

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xorg in ubuntu.
https://bugs.launchpad.net/bugs/710630

Title:
  fglrx apport hook AssertionError in __setitem__

___
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to : ubuntu-x-swat@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-x-swat] [Bug 710630] Re: fglrx apport hook AssertionError in __setitem__

2011-02-02 Thread Bryce Harrington
The consequence of this bug is it makes it harder for people to report
bugs against compiz (and maybe xorg).  Since the purpose of the alpha-2
release is specifically for testing, particularly of Unity, this seems
worth it to me to include.

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xorg in ubuntu.
https://bugs.launchpad.net/bugs/710630

Title:
  fglrx apport hook AssertionError in __setitem__

___
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to : ubuntu-x-swat@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-x-swat] [Bug 710630] Re: fglrx apport hook AssertionError in __setitem__

2011-02-02 Thread Launchpad Bug Tracker
This bug was fixed in the package xorg - 1:7.6~3ubuntu3

---
xorg (1:7.6~3ubuntu3) natty; urgency=low

  * apport/source_xorg.py:
- Tag bugs with compiz version
- Trim out colored output from unity_support_test, which causes apport
  to choke when reporting compiz bugs.
  (LP: #710630)
 -- Bryce Harrington br...@ubuntu.com   Wed, 02 Feb 2011 16:03:57 -0800

** Changed in: xorg (Ubuntu)
   Status: Triaged = Fix Released

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xorg in ubuntu.
https://bugs.launchpad.net/bugs/710630

Title:
  fglrx apport hook AssertionError in __setitem__

___
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to : ubuntu-x-swat@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help   : https://help.launchpad.net/ListHelp