After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 365565 - segfault just trying to read a gconf key
segfault just trying to read a gconf key
Status: RESOLVED FIXED
Product: gnome-python
Classification: Deprecated
Component: gconf
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-27 03:45 UTC by Matthias Clasen
Modified: 2006-11-05 12:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Clasen 2006-10-27 03:45:09 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?
Comment 1 Gustavo Carneiro 2006-10-29 14:50:55 UTC
Yes, gconf.client_get_default() should normally be used, but c=gconf.Client() shouldn't cause a crash; at most raise an exception...
Comment 2 Johan (not receiving bugmail) Dahlin 2006-10-30 13:29:07 UTC
Why not make gconf.Client() an alias for gconf.client_get_default() ?
Comment 3 Gustavo Carneiro 2006-10-30 18:54:06 UTC
Yes, probably.  I really don't understand why the GConf API allows more than one client...
Comment 4 Gustavo Carneiro 2006-11-05 12:54:13 UTC
	* gconf/gconf.override: Make gconf.Client constructor call
	gconf_client_get_default(); Closes #365565.