unity crashed with AttributeError in reset_unity_compiz_profile(): 'str' object has no attribute 'get_string'

Bug #737320 reported by Anduu
200
This bug affects 37 people
Affects Status Importance Assigned to Milestone
Unity
Fix Released
Low
Didier Roche-Tolomelli
unity (Ubuntu)
Fix Released
Low
Didier Roche-Tolomelli
Natty
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: unity

1. install unity 3.8.14
2. run unity --reset
-> for people getting the crash, it shouldn't anymore (just not reset)

ProblemType: Crash
DistroRelease: Ubuntu 11.04
Package: unity 3.6.6-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-7.35-generic 2.6.38
Uname: Linux 2.6.38-7-generic x86_64
Architecture: amd64
CompizPlugins: [core,bailer,detection,composite,opengl,compiztoolbox,decor,grid,snap,imgpng,place,move,resize,gnomecompat,vpswitch,regex,mousepoll,session,animation,wall,workarounds,expo,ezoom,staticswitcher,fade,scale]
Date: Thu Mar 17 21:48:16 2011
ExecutablePath: /usr/bin/unity
InterpreterPath: /usr/bin/python2.7
ProcCmdline: /usr/bin/python /usr/bin/unity --reset
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_CA.UTF-8
 LANGUAGE=en_CA:en
PythonArgs: ['/usr/bin/unity', '--reset']
SourcePackage: unity
Title: unity crashed with AttributeError in reset_unity_compiz_profile(): 'str' object has no attribute 'get_string'
UpgradeStatus: Upgraded to natty on 2010-08-06 (224 days ago)
UserGroups: adm cdrom dialout dip fax floppy fuse plugdev tape video

Revision history for this message
Anduu (anduu) wrote :
Revision history for this message
Apport retracing service (apport) wrote : Possible regression detected

This crash has the same stack trace characteristics as bug #711105. However, the latter was already fixed in an earlier package version than the one in this report. This might be a regression or because the problem is in a dependent package.

tags: removed: need-duplicate-check
tags: added: regression-retracer
visibility: private → public
Changed in unity (Ubuntu):
importance: Undecided → Low
assignee: nobody → Didier Roche (didrocks)
Alex Launi (alexlauni)
Changed in unity (Ubuntu):
status: New → Confirmed
Changed in unity:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Hey Anduu,

I can get a pretty easy fix for that, but this issue shouldn't happen, so, can you please try this and print the output back here:

python -c "import gconf; client = gconf.client_get_default(); current_profile_schema = client.get_schema('/apps/compizconfig-1/current_profile'); current_profile_gconfvalue = current_profile_schema.get_default_value(); print current_profile_gconfvalue; print current_profile_gconfvalue.get_string()"

(all in one line on a terminal).
Thanks!

Changed in unity:
status: Confirmed → Incomplete
Changed in unity (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
James Luscher (jluscher) wrote : Re: [Bug 737320] Re: unity crashed with AttributeError in reset_unity_compiz_profile(): 'str' object has no attribute 'get_string'

jjl@jjl-VirtualBox:~$ python -c "import gconf; client =
gconf.client_get_default(); current_profile_schema =
client.get_schema('/apps/compizconfig-1/current_profile');
current_profile_gconfvalue = current_profile_schema.get_default_value();
print current_profile_gconfvalue; print
current_profile_gconfvalue.get_string()"
<GConfValue at 0x8848e50>
unity
jjl@jjl-VirtualBox:~$

On Tue, Mar 22, 2011 at 1:55 PM, Didier Roche <email address hidden> wrote:

> Hey Anduu,
>
> I can get a pretty easy fix for that, but this issue shouldn't happen,
> so, can you please try this and print the output back here:
>
> python -c "import gconf; client = gconf.client_get_default();
> current_profile_schema =
> client.get_schema('/apps/compizconfig-1/current_profile');
> current_profile_gconfvalue = current_profile_schema.get_default_value();
> print current_profile_gconfvalue; print
> current_profile_gconfvalue.get_string()"
>
> (all in one line on a terminal).
> Thanks!
>
> ** Changed in: unity
> Status: Confirmed => Incomplete
>
> ** Changed in: unity (Ubuntu)
> Status: Confirmed => Incomplete
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/737320
>
> Title:
> unity crashed with AttributeError in reset_unity_compiz_profile():
> 'str' object has no attribute 'get_string'
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/unity/+bug/737320/+subscribe
>

--
If you can't be happy naturally, be unnaturally happy.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Hey James, did you get that bug before? Do you still have it when you run unity --reset?

Seems like it can't happen with the current values you have.

Revision history for this message
James Luscher (jluscher) wrote :

The problem I have been trying to solve is I don't get the Unity left-side
dock, etc. and when I tried the unity --reset command it failed - which I
reported.

Here is the result of doing both in terminal:

jjl@jjl-VirtualBox:~$ python -c "import gconf; client =
gconf.client_get_default(); current_profile_schema =
client.get_schema('/apps/compizconfig-1/current_profile');
current_profile_gconfvalue = current_profile_schema.get_default_value();
print current_profile_gconfvalue; print
current_profile_gconfvalue.get_string()"
<GConfValue at 0x84a2e50>
unity
jjl@jjl-VirtualBox:~$ unity --reset
WARNING: Unity currently default profile, so switching to metacity while
resetting the values
unity-panel-service: no process found
Backend : gconf
Integration : true
Profile : unity
Adding plugins
Initializing core options...done
Initializing bailer options...done
Initializing detection options...done
Initializing composite options...done
compiz (opengl) - Fatal: GLX_EXT_texture_from_pixmap is missing
compiz (opengl) - Fatal: Software rendering detected
compiz (bailer) - Info: Ensuring a shell for your session
jjl@jjl-VirtualBox:~$ Cannot register the panel shell: there is already one
running.
jjl@jjl-VirtualBox:~$

I don't understand the "unity-panel-service" being missing but the "Fatal"
message is the "GLX_EXT_texture_from_pixmap" is missing.

This report was combined by someone with more familiarity (not difficult to
find!) so I can only assume it is part of the string problem.

I hope this helps.

James

On Tue, Mar 22, 2011 at 2:45 PM, Didier Roche <email address hidden> wrote:

> Hey James, did you get that bug before? Do you still have it when you
> run unity --reset?
>
> Seems like it can't happen with the current values you have.
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/737320
>
> Title:
> unity crashed with AttributeError in reset_unity_compiz_profile():
> 'str' object has no attribute 'get_string'
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/unity/+bug/737320/+subscribe
>

--
If you can't be happy naturally, be unnaturally happy.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

@James:
the issue you are showing (unity which doesn't start) isn't at all related to unity --reset. It's just that you don't have opengl support in your virtualbox.

Revision history for this message
James Luscher (jluscher) wrote :

I appreciate your letting me know what the problem is.

Here I thought I would be some help in testing the pre-release Natty, and
now I find out it can't run Unity, the basic UI in VirtualBox.

I thought that was the whole point of running pre-release systems inside
virtual environments - allowing testing without disturbing the existing
system... I should have known it was too good to be true. :-(

I'm sorry to have wasted your time with this.

James

On Tue, Mar 22, 2011 at 4:01 PM, Didier Roche <email address hidden> wrote:

> @James:
> the issue you are showing (unity which doesn't start) isn't at all related
> to unity --reset. It's just that you don't have opengl support in your
> virtualbox.
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/737320
>
> Title:
> unity crashed with AttributeError in reset_unity_compiz_profile():
> 'str' object has no attribute 'get_string'
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/unity/+bug/737320/+subscribe
>

--
If you can't be happy naturally, be unnaturally happy.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

No worry James :)
Of course, all testing is really appreciated!

So, yeah, Unity has some 3D requirement to be able to run, what virtualbox doesn't provide out the box. I think you should find some thread how to install this 3D driver for virtualbox on the ubuntu forums. I didn't test this personaly.

Another option is to take the current development release iso and to put it on a usb stick and start from there. The 3D driver should be activated on it if you don't have a nvidia card and you can give all the tests (of course, it will be a little be slower) you want :)

Revision history for this message
James Luscher (jluscher) wrote :

On Wed, Mar 23, 2011 at 2:47 AM, Didier Roche <email address hidden> wrote:

> No worry James :)
> Of course, all testing is really appreciated!
>
> So, yeah, Unity has some 3D requirement to be able to run, what
> virtualbox doesn't provide out the box. I think you should find some
> thread how to install this 3D driver for virtualbox on the ubuntu
> forums. I didn't test this personaly.
>

I'll look into the possibility of installing a 3D driver in VirtualBox and
see what I can find.
If it doesn't pan out I'll give the USB method a try.
All the best,
James

>
> Another option is to take the current development release iso and to put
> it on a usb stick and start from there. The 3D driver should be
> activated on it if you don't have a nvidia card and you can give all the
> tests (of course, it will be a little be slower) you want :)
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/737320
>
> Title:
> unity crashed with AttributeError in reset_unity_compiz_profile():
> 'str' object has no attribute 'get_string'
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/unity/+bug/737320/+subscribe
>

--
If you can't be happy naturally, be unnaturally happy.

Revision history for this message
James Luscher (jluscher) wrote :

The problem appears to be Virtual Box related - unsupported GL.
Thanks Didier.
James

Changed in unity (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
James Luscher (jluscher) wrote :

Sorry. I shouldn't have changed it to invalid - since others might be affected. I'll leave it as Incomplete - just not a problem for me.

Changed in unity (Ubuntu):
status: Invalid → Incomplete
Revision history for this message
Petsie-web (petsie-web) wrote :

I did not do anything but looking at the new launchbar. After ~30seconds of doing nothing I got a crash from compiz and a second later this one. Maybe I stared too intense ;-). Sorry, no idea, what might have gone wrong.

Revision history for this message
James Kemp (james+ubuntu) wrote :

for me unity is crashing on login, so I just see an empty desktop if I choose 'ubuntu' on the login screen. While in gnome I ran the code suggested

james@ace-garp:~$ python -c "import gconf; client = gconf.client_get_default(); current_profile_schema = client.get_schema('/apps/compizconfig-1/current_profile'); current_profile_gconfvalue = current_profile_schema.get_default_value(); print current_profile_gconfvalue; print current_profile_gconfvalue.get_string()"
<GConfValue at 0xa1a5c50>
unity

Happy to try other things if it helps, I'm on an Acer Aspire One D150 netbook if that helps at all.

Revision history for this message
Rassiel (rassiel) wrote :

I'm having the same error when running unity --reset
Not running on virtual box.

Revision history for this message
Rassiel (rassiel) wrote :

rassiel@Tassadar:~$ unity --reset
Traceback (most recent call last):
  File "/usr/bin/unity", line 198, in <module>
    reset_unity_compiz_profile ()
  File "/usr/bin/unity", line 83, in reset_unity_compiz_profile
    if current_profile_gconfvalue.get_string() == 'unity':
AttributeError: 'str' object has no attribute 'get_string'

Revision history for this message
Jaap Hoetmer (jaap.hoetmer) wrote :

Hi, I have the same issue, when logged in there's only the desktop wallpaper, no sidebar nor top bar, and when issued the

unity --reset

command it terminates with the AttributeError: 'str' object has no attribute 'get_string'

Not sure if it is relevant, but the system is a Lenovo S10e netbook with Intel GMA 950 graphics.
I am not using a virtualbox session, it is a straightforward upgrade from Ubuntu 10.10 using the update manager.

Thanks, regards.

Revision history for this message
Jaap Hoetmer (jaap.hoetmer) wrote :

Oh, forgot to mention that I have tried to perform an update as well, using apt-get update & apt-get upgrade. It did download and install new packages, however, after rebooting once the updates were completed this apparently did not fix the problem. The same symptoms re-appeared as mentioned, and the unity --reset command gave the same errors.

If any other testing needs to be performed, please let me know.

Changed in unity:
status: Incomplete → Fix Committed
Changed in unity (Ubuntu):
status: Incomplete → Fix Committed
Changed in unity:
assignee: nobody → Didier Roche (didrocks)
milestone: none → 3.8.14
Revision history for this message
Jaap Hoetmer (jaap.hoetmer) wrote :

FYI, I performed the same upgrade, from 10.10 to 11.04 on a similar system, Lenovo S10-2, and this worked fine. The only difference is that this concerns a newer version of the S10 (S10e vs S10-2), but the specs aren't that much different. Standard Intel Atom, Intel GMA, but different design.

Revision history for this message
Kirill Kabardin (kkabardin) wrote :

I run 11.04 from usb-stick and have this bug. Unity was crashing at first (bug with nvidia-173 drivers, I have geForce fx 5500) but I installed updates later. Now I can't launch Unity and 'unity --reset' gives me that "AttributeError: 'str' object has no attribute 'get_string'" thing.

I launched python script from comment #3 and it gave me that:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'get_default_value'

Revision history for this message
Dan Crews (crewsd) wrote :

Here's a fix to this problem:

sudo nano /usr/bin/

At line ~83, you'll find:

    if current_profile_gconfvalue.get_string() == 'unity':
        print "WARNING: Unity currently default profile, so switching to metacity while resetting the values"
        subprocess.Popen(["metacity", "--replace"]) #TODO: check if compiz is indeed running
        # wait for compiz to stop
        time.sleep(2)
        current_profile_gconfvalue.set_string('fooo')
        current_profile_schema.set_default_value(current_profile_gconfvalue)
        client.set_schema("/apps/compizconfig-1/current_profile", current_profile_schema)
        # the python binding doesn't recursive-unset right
        subprocess.Popen(["gconftool-2", "--recursive-unset", "/apps/compiz-1"]).communicate()

Change this to (we're just wrapping another if around it to make sure the object it's trying to use isn't the empty string we started with):

    if current_profile_gconfvalue != "":
        if current_profile_gconfvalue.get_string() == 'unity':
     print "WARNING: Unity currently default profile, so switching to metacity while resetting the values"
            subprocess.Popen(["metacity", "--replace"]) #TODO: check if compiz is indeed running
            # wait for compiz to stop
            time.sleep(2)
            current_profile_gconfvalue.set_string('fooo')
            current_profile_schema.set_default_value(current_profile_gconfvalue)
            client.set_schema("/apps/compizconfig-1/current_profile", current_profile_schema)
            # the python binding doesn't recursive-unset right
            subprocess.Popen(["gconftool-2", "--recursive-unset", "/apps/compiz-1"]).communicate()

Then run

unity --reset

It'll all be back to normal.
Enjoy

Revision history for this message
Dan Crews (crewsd) wrote :

I guess I need to correct myself on that one. I'm now able to run unity --reset to make it load, but when it first loads, I'm still not getting the launcher until I run unity.

Revision history for this message
Dan Crews (crewsd) wrote :

After my fix, my version of this problem went away when I chose to login using "Ubuntu" rather than "Ubuntu Netbook Edition". Because I initially had 10.10 with Unity (netbook edition), it chose that by default.

Revision history for this message
Dnc Live (dnclive) wrote :

sudo nano /usr/bin/unity

it not work:

 if current_profile_gconfvalue.get_string() == 'unity':
        print "WARNING: Unity currently default profile, so switching to metacity while resetting the values"
        subprocess.Popen(["metacity", "--replace"]) #TODO: check if compiz is indeed running
        # wait for compiz to stop
        time.sleep(2)
        current_profile_gconfvalue.set_string('fooo')
        current_profile_schema.set_default_value(current_profile_gconfvalue)
        client.set_schema("/apps/compizconfig-1/current_profile", current_profile_schema)
        # the python binding doesn't recursive-unset right
        subprocess.Popen(["gconftool-2", "--recursive-unset", "/apps/compiz-1"]).communicate()

it work! ( i drop get_string()):

    if current_profile_gconfvalue == 'unity':
        print "WARNING: Unity currently default profile, so switching to metacity while resetting the values"
        subprocess.Popen(["metacity", "--replace"]) #TODO: check if compiz is indeed running
        # wait for compiz to stop
        time.sleep(2)
        current_profile_gconfvalue.set_string('fooo')
        current_profile_schema.set_default_value(current_profile_gconfvalue)
        client.set_schema("/apps/compizconfig-1/current_profile", current_profile_schema)
        # the python binding doesn't recursive-unset right
        subprocess.Popen(["gconftool-2", "--recursive-unset", "/apps/compiz-1"]).communicate()

now unity --reset successful)

description: updated
Changed in unity:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity - 3.8.14-0ubuntu1

---------------
unity (3.8.14-0ubuntu1) oneiric; urgency=low

  * New upstream bug-fix release.
    - In a dual monitor setup with different resolutions, Unity places windows
      in the "dead zone" (LP: #752098)
    - Left pixel of launcher is not clickable on session start (LP: #758026)
    - unity crashed with AttributeError in reset_unity_compiz_profile(): 'str'
      object has no attribute 'get_string' (LP: #737320)
    - unity --reset crashes with NameError (LP: #774280)
    - Bottom icon on launcher tilts when it maybe shouldn't if icons fill
      launcher nearly exactly (LP: #728949)
    - Dodge active window - launcher should not show when modal dialog is
      opened (LP: #718185)
    - Unity maximizes windows that don't support resize on launch (LP: #769781)
    - compiz crashed with SIGSEGV in sigc::signal_base::impl() (LP: #762801)
    - inactive menus becomes brighter on sub-sequent clicks (LP: #733740)
    - Unity crashes when dynamic quicklist dbusmenu contains a hidden menuitem.
      (LP: #759174)
    - Opening quicklist with launcher keynav returns focus to previous window
      (LP: #750781)
    - window's title does not fade in the right position (LP: #722178)
  * debian/control:
    - depends on compiz for some people upgrading (LP: #773253)
  * debian/patches/01_add_scp_to_systray.patch:
    - remove, upstream now
 -- Didier Roche <email address hidden> Thu, 26 May 2011 17:41:14 +0200

Changed in unity (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted unity into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in unity (Ubuntu Natty):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity - 3.8.14-0ubuntu1~natty1

---------------
unity (3.8.14-0ubuntu1~natty1) natty-proposed; urgency=low

  * New upstream bug-fix release.
    - In a dual monitor setup with different resolutions, Unity places windows
      in the "dead zone" (LP: #752098)
    - Left pixel of launcher is not clickable on session start (LP: #758026)
    - unity crashed with AttributeError in reset_unity_compiz_profile(): 'str'
      object has no attribute 'get_string' (LP: #737320)
    - unity --reset crashes with NameError (LP: #774280)
    - Bottom icon on launcher tilts when it maybe shouldn't if icons fill
      launcher nearly exactly (LP: #728949)
    - Dodge active window - launcher should not show when modal dialog is
      opened (LP: #718185)
    - Unity maximizes windows that don't support resize on launch (LP: #769781)
    - compiz crashed with SIGSEGV in sigc::signal_base::impl() (LP: #762801)
    - inactive menus becomes brighter on sub-sequent clicks (LP: #733740)
    - Unity crashes when dynamic quicklist dbusmenu contains a hidden menuitem.
      (LP: #759174)
    - Opening quicklist with launcher keynav returns focus to previous window
      (LP: #750781)
    - window's title does not fade in the right position (LP: #722178)
  * debian/control:
    - depends on compiz for some people upgrading (LP: #773253)
  * debian/patches/01_add_scp_to_systray.patch:
    - remove, upstream now
 -- Didier Roche <email address hidden> Thu, 26 May 2011 17:41:14 +0200

Changed in unity (Ubuntu Natty):
status: Fix Committed → Fix Released
Revision history for this message
GNAServicesInc (gnaservicesinc) wrote :

This bug is not fixed or has broken by a regression as of unity 4.2.0-0ubuntu2 see #809378

Revision history for this message
Ursula Junque (ursinha) wrote :

Said bug (bug 809378) is Fix Released now. Please, if the issue still happens, open a new bug mentioning the old ones. Thanks!

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.