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 620376 - Crashes getting uint from dconf
Crashes getting uint from dconf
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gsettings
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Allison Karlitskaya (desrt)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-06-02 16:55 UTC by Bastien Nocera
Modified: 2010-06-02 17:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the schema file (625 bytes, text/xml)
2010-06-02 16:55 UTC, Bastien Nocera
Details

Description Bastien Nocera 2010-06-02 16:55:17 UTC
Created attachment 162555 [details]
the schema file

glib2-2.25.7-1.fc14.x86_64
dconf-0.3.1-2.fc14.x86_64

$ gsettings get org.freedesktop.Geoclue gps-baudrate

Program received signal SIGSEGV, Segmentation fault.
gvdb_table_lookup (file=0x0, key=0x60ad20 "/apps/geoclue/gps-baudrate", type=118 'v') at ../gvdb/gvdb-reader.c:255
255	  if G_UNLIKELY (file->n_buckets == 0 || file->n_hash_items == 0)
(gdb) bt
  • #0 gvdb_table_lookup
    at ../gvdb/gvdb-reader.c line 255
  • #1 gvdb_table_get_value
    at ../gvdb/gvdb-reader.c line 449
  • #2 dconf_engine_read
    at ../engine/dconf-engine.c line 52
  • #3 dconf_settings_backend_read
    at dconfsettingsbackend.c line 327
  • #4 IA__g_settings_get_value
    at gsettings.c line 766
  • #5 handle_get
    at gsettings-tool.c line 137
  • #6 main
    at gsettings-tool.c line 390

Note that the schema does validate
Comment 1 Allison Karlitskaya (desrt) 2010-06-02 17:29:05 UTC
Ok.  It was nothing to do with the schema.

I'm betting you don't have a ~/.config/dconf file (as a result of never having written anything to dconf before).

The code doesn't check this case and if the open fails it goes straight ahead and does a null pointer dereference.

I've added a check now, committed on master.

Thanks for the report