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 451989 - assertion `key_file != NULL' failed
assertion `key_file != NULL' failed
Status: RESOLVED DUPLICATE of bug 453916
Product: gdm
Classification: Core
Component: general
2.19.x
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2007-06-28 19:15 UTC by Sebastien Bacher
Modified: 2007-08-09 23:22 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Build against todays svn head (1.29 KB, patch)
2007-07-01 23:13 UTC, Lukasz Zalewski
none Details | Review

Description Sebastien Bacher 2007-06-28 19:15:00 UTC
The bug has been opened on https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/121119

"Found in gutsy, gdm version: 2.19.3-0ubuntu1.
Every time I boot, I get the following in my daemon.log:

Jun 18 22:24:04 snifer-laptop gdm[5177]: GLib-CRITICAL: g_key_file_get_string: assertion `key_file != NULL' failed
Jun 18 22:24:04 snifer-laptop gdm[5177]: GLib-CRITICAL: g_key_file_get_string: assertion `key_file != NULL' failed
Jun 18 22:24:04 snifer-laptop gdm[5177]: GLib-CRITICAL: g_key_file_free: assertion `key_file != NULL' failed"
Comment 1 Brian Cameron 2007-06-29 01:25:02 UTC
Could you track down which configuration file and which keys are causing this problem?  If you turn on debug enable=true in your GDM configuration, the system log might help show which ones
are causing problems.
 
Comment 2 Sebastien Bacher 2007-06-29 12:18:03 UTC
the line before the warnings is "DEBUG: Attempting to parse key string: GdmGreeterTheme/Greeter"

"$ gdmflexiserver --command="GET_CONFIG GdmGreeterTheme/Greeter"
ERROR 50 Unsupported key <GdmGreeterTheme/Greeter>"
Comment 3 Lukasz Zalewski 2007-06-29 14:59:49 UTC
GdmGreeterTheme/Greeter is specific to the graphical themes and it is not stored in the daemon configuration file so the output of 
gdmflexiserver --command="GET_CONFIG GdmGreeterTheme/Greeter"
is correct - the configuration key you trying to request does not exist there.

It can be found in GdmGreeterTheme.desktop file in each of the themes directories. Can you check if the syntax of the file is correct for the theme(s) you are using?

For some reason I cant replicate your problem
Comment 4 Sebastien Bacher 2007-06-29 19:22:50 UTC
GdmGreeterTheme.desktop:

[GdmGreeterTheme]
Greeter=Human.xml
Name=Human
Description=Ubuntu Default Welcome Theme
Description[fr]=Thème de bienvenue par défaut d'Ubuntu
Author=Jeff Waugh, Mark Shuttleworth, Jozef Mak, Jonathan Austin, Frank Schoep
Copyright=(c) 2004-2006 Canonical Ltd.
Screenshot=screenshot.png
Comment 5 Lukasz Zalewski 2007-06-30 17:49:19 UTC
I managed to replicate your problem which i think its caused by a wrong file permissions. What the error suggests is that the file cannot be opened (assertion `key_file != NULL' failed). The code seems to check only for the file existence (F_OK) not if the file i readable. Make sure that the user under which gdmgreeter is running (usually gdm) can read that file, as its not the daemon but greeter that needs to read it.
Brian maybe it would be a good idea to check for R_OK rather than F_OK in gui/gdmconfig.c when reading the themes (and maybe provide more relevan error message).
Comment 6 Lukasz Zalewski 2007-07-01 23:13:27 UTC
Created attachment 90994 [details] [review]
Build against todays svn head

Attached quick fix for the bug
Comment 7 Brian Cameron 2007-07-02 02:12:44 UTC
Ok, this patch is upstream.  Thanks Lukasz.  I'm marking this as fixed.  If there is still a problem, please reopen.
Comment 8 Sebastien Bacher 2007-07-02 08:43:04 UTC
There is no new debug message with the patch and the configuration files can be read by any user, reopening the bug
Comment 9 Lukasz Zalewski 2007-07-02 09:11:26 UTC
Sebastien can you mail me the theme you are using and the permissions that are set on the dir/files please.
Comment 10 Sebastien Bacher 2007-07-02 09:45:22 UTC
That happens using the upstream gdm circle theme, what directory and files do you want to know about? /etc/gdm and all the files it contains are u+r
Comment 11 Brian Cameron 2007-07-02 10:15:02 UTC
Does gdmflexiserver actually know to read the theme configuration file?  It wouldn't surprise me if it is hardcoded to only know about the main GDM configuration files.

Remember the configuration engine was rewritten by William Jon McCann recently, so if this used to work and doesn't with the latest GDM 2.19 builds, I'd be this got lost in the rewrite.  Adding William on the cc: list.
Comment 12 Lukasz Zalewski 2007-07-02 12:22:00 UTC
Hmmm circle theme works fine for me (no errors)
Comment 13 Sebastien Bacher 2007-08-09 23:22:52 UTC

*** This bug has been marked as a duplicate of 453916 ***