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 492903 - NULL pointer comparison in gnome-wp-item.c
NULL pointer comparison in gnome-wp-item.c
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] Appearance
2.20.x
Other Linux
: Normal major
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-03 02:48 UTC by Josselin Mouette
Modified: 2007-11-03 11:00 UTC
See Also:
GNOME target: 2.22.x
GNOME version: 2.19/2.20



Description Josselin Mouette 2007-11-03 02:48:28 UTC
One of our users saw some of his GConf settings smashed after an emergency shutdown. After that, gnome-appearance-properties started to crash on startup with the following trace:

  • #0 strcmp
    from /lib/i686/cmov/libc.so.6
  • #1 gnome_wp_item_get_thumbnail
    at gnome-wp-item.c line 226
  • #2 wp_props_load_wallpaper
    at appearance-desktop.c line 130
  • #3 wp_add_image
    at appearance-desktop.c line 169
  • #4 wp_load_stuffs
    at appearance-desktop.c line 870
  • #5 g_idle_dispatch
    at /tmp/buildd/glib2.0-2.14.1/glib/gmain.c line 4132
  • #6 IA__g_main_context_dispatch
    at /tmp/buildd/glib2.0-2.14.1/glib/gmain.c line 2061
  • #7 g_main_context_iterate
    at /tmp/buildd/glib2.0-2.14.1/glib/gmain.c line 2694
  • #8 IA__g_main_loop_run
    at /tmp/buildd/glib2.0-2.14.1/glib/gmain.c line 2898
  • #9 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #10 main
    at appearance-main.c line 190

According to him, item->shade_type was NULL and this is what caused the crash.

Note that I have not managed to reproduce the bug, even by unregistering the schemas and removing the shading_type key, but I guess a !NULL check cannot hurt anyway.

Reference: http://bugs.debian.org/435005
Comment 1 Jens Granseuer 2007-11-03 11:00:38 UTC
A NULL check there would only mask the real problem (if there is one). I also suspect the report against 2.20 is a different issue than the one against 2.18, but we should be more robust now in any case.

2007-11-03  Jens Granseuer  <jensgr@gmx.net>

        * appearance-desktop.c: (wp_color_changed), (wp_props_wp_set):
        * gnome-wp-item.c: (gnome_wp_item_new), (gnome_wp_item_free),
        (gnome_wp_item_dup):
        * gnome-wp-item.h:
        * gnome-wp-xml.c: (gnome_wp_xml_load_xml), (gnome_wp_xml_save_list):
        be more careful when reading background information from GConf and make
        sure we don't choke on NULL values later on (bug #492903)