Public bug reported:

Binary package hint: unity

Running "unity --reset" results in a NameError crash.

I do not have the exact backtrace (I can get it if nescessary), but it
was very short, and very obvious that it will happen if you look at the
code:

http://bazaar.launchpad.net/~unity-
team/unity/trunk/view/head:/tools/unity.cmake#L72

72          try:
73              current_profile_schema = 
client.get_schema("/apps/compizconfig-1/current_profile")
74          except GError, e:
75              print "WARNING: environment is incorrect: %s\nDid you just try 
to reset in a tty?" % e

There is a NameError on GError, since GError has not been imported. Some
experimentation/googling suggests it should be glib.GError.

It seems that bug #753528 was never fixed at all, since this code was
introduced to fix that bug (revision 1154.1.1) , but if it had been
tested even once this issue would have been located (unless this was a
caused by a bad merge and an import being lost)

Further, even when you fix that issue, you get another exception 2 lines
later - something like "AttributeError: 'str' object has no attribute
'get_string'". I'm guessing this could be a change in what type of
values are actually returned.

I had to change the line:
  if current_profile_gconfvalue.get_string() == 'unity':
to
  if current_profile_gconfvalue == 'unity':'

(I think this is bug 737320 - but the bug I'm reporting is different
from that).

Then it finally worked.

Please note, in trying to reproduce this, I had some issues, I think
related to whether unity was running or not. The primary issue that
caused all this was unity failing to run or something (I ended up in a
session with no interface at all, and had to google to try to work out a
fix).  So I can try to reproduce backtraces if you want, but it might be
tricky, and just inspection of the code reveals the bug.

** Affects: unity (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/774280

Title:
  unity --reset crashes with NameError

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to