GNOME Bugzilla – Bug 689136
Crash in dconf_writer_real_end(): change is NULL (when $XDG_CONFIG_HOME/dconf does not exist)
Last modified: 2013-01-02 19:23:33 UTC
Created attachment 229973 [details] reproducer I noticed that in my jhbuild session with temporary XDG dirs, dconf-service crashes when I try to change a gsettings key. Program received signal SIGSEGV, Segmentation fault. 0x000000000040a0ca in dconf_writer_real_end (writer=0x43c020) at dconf-writer.c:162 162 g_free (change->tag); change is NULL: (gdb) p change $1 = (TaggedChange *) 0x0 Backtrace:
+ Trace 231230
(gdb) p change $1 = (TaggedChange *) 0x0 I wrote a little shell script which reproduces the crash. It works fine on version 0.5.2 (which I have in current Ubuntu raring), but fails in jhbuild, i. e. on current git master.
I noticed that when I run the script on 0.5.2, it properly creates /tmp/testhome/config/dconf/user /tmp/testhome/runtime/dconf/user However, in jhbuild it only creates /tmp/testhome/runtime/dconf/user. It does create the /tmp/testhome/config/ dir, but not the "dconf" subdirectory. When I add mkdir -p $XDG_CONFIG_HOME/dconf after the three exports in the reproducer, the crash is gone. So it seems somewhere between 0.5.2 and current git an important mkdir was called?
(In reply to comment #1) > after the three exports in the reproducer, the crash is gone. So it seems > somewhere between 0.5.2 and current git an important mkdir was called? Err, "dropped", not "called".
There are two issues here. - the missing mkdir - dconf crashing when uncommited changes happen (due to a typo) 3928089f34a17102b958fe39959215a447192ae0 fixes the crash. Attaching a patch for the mkdir.
Created attachment 232558 [details] [review] service: try mkdir_with_parents() on failed writes If we fail to write the database file, try g_mkdir_with_parents() to create the parent directory and try again.
Attachment 232558 [details] pushed as a2bad17 - service: try mkdir_with_parents() on failed writes