GNOME Bugzilla – Bug 90843
No error reporting at read with gconf_client_get_xxx.
Last modified: 2018-08-17 13:54:25 UTC
Overview: At case that the configuration file is empty, the gconf_client_get_xxx did not return error. Steps to reproduce: Run a program which use gconf. This program set a key with any value(in our case gconf_client_set_int(client,path,val,&error)). Stop the running of this program and wait until the locks are deleted. Search our configfile where it set the int value.(specified in path) Edit this file, and delete all keys. The file will be 0 size. Change our program, that to read this int key with val = gconf_client_get_int(client,path,&error); In this case val will has 0 value, and did not get a error message about that the key does not exist. The key unreacheble error is not signaled.
Nonexistent keys aren't supposed to return an error. (Though in retrospect it might have been a nice feature.)
See http://www.gnome.org/projects/gconf/plans.html
GConf has been deprecated since 2011. GConf is not under active development anymore. Its codebase has been archived: https://gitlab.gnome.org/Archive/gconf/commits/master dconf and gsettings are its successors. See https://developer.gnome.org/gio/stable/ch34.html and https://developer.gnome.org/GSettings/ for porting info. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Feel free to open a task in GNOME Gitlab if the issue described in this task still applies to a recent + supported version of dconf/gsettings. Thanks!