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 642604 - GtkCssProvider leaks GError
GtkCssProvider leaks GError
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkStyleContext
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: Carlos Garnacho
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-02-17 18:33 UTC by Felix Riemann
Modified: 2011-03-07 22:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Felix Riemann 2011-02-17 18:33:31 UTC
Valgrind'd eog and spotted this in the log:

==12748== 76 (32 direct, 44 indirect) bytes in 2 blocks are definitely lost in loss record 6,210 of 9,985
==12748==    at 0x4C2940E: malloc (vg_replace_malloc.c:236)
==12748==    by 0xE3CA3D2: g_malloc (gmem.c:164)
==12748==    by 0xE3E0DA4: g_slice_alloc (gslice.c:842)
==12748==    by 0xE3AFF11: g_error_new_literal (gerror.c:119)
==12748==    by 0xE3B0114: g_set_error_literal (gerror.c:255)
==12748==    by 0x6599007: css_provider_parse_value (gtkcssprovider.c:3098)
==12748==    by 0x659A645: parse_stylesheet (gtkcssprovider.c:3473)
==12748==    by 0x659AC86: gtk_css_provider_load_from_path_internal (gtkcssprovider.c:3708)
==12748==    by 0x659B3EE: gtk_css_provider_get_named (gtkcssprovider.c:4224)
==12748==    by 0x667CCCE: settings_update_theme (gtksettings.c:2726)
==12748==    by 0x667CE81: gtk_settings_get_for_screen (gtksettings.c:1437)
==12748==    by 0x6630FB1: display_opened_cb (gtkmodules.c:494)
==12748==    by 0xD707E89: g_closure_invoke (gclosure.c:767)
==12748==    by 0xD71A451: signal_emit_unlocked_R (gsignal.c:3252)
==12748==    by 0xD723F58: g_signal_emit_valist (gsignal.c:2983)
==12748==    by 0xD7242C1: g_signal_emit_by_name (gsignal.c:3077)
==12748==    by 0x6D2E9AB: _gdk_x11_display_open (gdkdisplay-x11.c:1414)
==12748==    by 0x6D2C67F: gdk_x11_display_manager_open_display (gdkdisplaymanager-x11.c:55)
==12748==    by 0x6614EB6: post_parse_hook (gtkmain.c:904)
==12748==    by 0xE3D03F8: g_option_context_parse (goption.c:1952)
==12748==    by 0x41F525: main (main.c:210)
Comment 1 Carlos Garnacho 2011-03-07 22:53:23 UTC
Thanks for spotting! I've fixed this in commit 794593a

commit 794593a4f8208c8c52363e4bdf7103f5f215a9fc
Author: Carlos Garnacho <carlosg@gnome.org>
Date:   Mon Mar 7 22:42:33 2011 +0100

    cssprovider: return immediately if there's remaining data behind a parsed value
    
    parse_value() could fill in a GError, but yet (incorrectly) return G_TOKEN_NONE,
    having the GError leaked as a result.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=642604 , Reported by Felix Riemann.