GNOME Bugzilla – Bug 365565
segfault just trying to read a gconf key
Last modified: 2006-11-05 12:54:13 UTC
Originally filed as https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=197254 Description of problem: Python will segfault if you try to read GConf keys. Version-Release number of selected component (if applicable): gnome-python2-gconf-2.12.4-1.i386 How reproducible: Always Steps to Reproduce: Pick one: python -c 'import gconf; c=gconf.Client(); c.get_bool("/desktop/gnome/background/draw_background")' python -c 'import gconf; c=gconf.Client(); c.get("/desktop/gnome/background/draw_background")' python -c 'import gconf; c=gconf.Client(); c.get_string("/desktop/gnome/background/picture_filename")' Probably others, but I got bored. :) Actual results: segmentation fault python -c Expected results: A return value. Jeremy commented: Don't you need to do 'c = gconf.client_get_default()' rather than just instantiating a random GConfClient?
Yes, gconf.client_get_default() should normally be used, but c=gconf.Client() shouldn't cause a crash; at most raise an exception...
Why not make gconf.Client() an alias for gconf.client_get_default() ?
Yes, probably. I really don't understand why the GConf API allows more than one client...
* gconf/gconf.override: Make gconf.Client constructor call gconf_client_get_default(); Closes #365565.