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 631870 - Memory leak in e_week_view after GtkObject removal
Memory leak in e_week_view after GtkObject removal
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Calendar
3.0.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-calendar-maintainers
Evolution QA team
Depends on:
Blocks: 627707
 
 
Reported: 2010-10-11 10:47 UTC by David Woodhouse
Modified: 2013-09-13 01:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Woodhouse 2010-10-11 10:47:09 UTC
==19653== 12,192 (10,400 direct, 1,792 indirect) bytes in 20 blocks are definitely lost in loss record 42,737 of 43,153
==19653==    at 0x4A0615D: malloc (vg_replace_malloc.c:195)
==19653==    by 0x3197848B52: g_malloc (gmem.c:164)
==19653==    by 0x319785F656: g_slice_alloc (gslice.c:842)
==19653==    by 0x319785F905: g_slice_alloc0 (gslice.c:854)
==19653==    by 0x319A4319AA: g_type_create_instance (gtype.c:1867)
==19653==    by 0x319A40FE8B: g_object_constructor (gobject.c:1597)
==19653==    by 0x319A4131C0: g_object_newv (gobject.c:1381)
==19653==    by 0x319A413E0B: g_object_new (gobject.c:1293)
==19653==    by 0x6252FF2: gnome_canvas_item_new (gnome-canvas.c:212)
==19653==    by 0x10E94BDA: e_week_view_reshape_event_span (e-week-view.c:3202)
==19653==    by 0x10E94FFC: e_week_view_check_layout (e-week-view.c:2942)
==19653==    by 0x10E960D4: e_week_view_size_allocate (e-week-view.c:1251)
Comment 1 Milan Crha 2010-10-22 13:41:37 UTC
Hmm, maybe related to bug #631320, when moving away from GtkObject, but even if I change gtk_object_run_dispose, then the application starts crashing.

Mine reports are these two:
==25946== 10,504 (8,712 direct, 1,792 indirect) bytes in 121 blocks are definitely lost in loss record 18,533 of 18,597
==25946==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==25946==    by 0x4F19E48: g_malloc (gmem.c:164)
==25946==    by 0x4F31FC2: g_slice_alloc (gslice.c:842)
==25946==    by 0x4F32007: g_slice_alloc0 (gslice.c:854)
==25946==    by 0x480831B: g_type_create_instance (gtype.c:1867)
==25946==    by 0x47EFF6E: g_object_constructor (gobject.c:1597)
==25946==    by 0x47EF661: g_object_newv (gobject.c:1381)
==25946==    by 0x47EF3D7: g_object_new (gobject.c:1293)
==25946==    by 0x4235CEA: gnome_canvas_item_new (gnome-canvas.c:212)
==25946==    by 0x5AC44F0: e_week_view_reshape_event_span (e-week-view.c:3173)
==25946==    by 0x5AC3A9E: e_week_view_reshape_events (e-week-view.c:2941)
==25946==    by 0x5AC3919: e_week_view_check_layout (e-week-view.c:2884)

e-week-view.c:3173: span->background_item =
			gnome_canvas_item_new (...

==25946== 52,128 (48,400 direct, 3,728 indirect) bytes in 121 blocks are definitely lost in loss record 18,584 of 18,597
==25946==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==25946==    by 0x4F19E48: g_malloc (gmem.c:164)
==25946==    by 0x4F31FC2: g_slice_alloc (gslice.c:842)
==25946==    by 0x4F32007: g_slice_alloc0 (gslice.c:854)
==25946==    by 0x480831B: g_type_create_instance (gtype.c:1867)
==25946==    by 0x47EFF6E: g_object_constructor (gobject.c:1597)
==25946==    by 0x47EF661: g_object_newv (gobject.c:1381)
==25946==    by 0x47EF3D7: g_object_new (gobject.c:1293)
==25946==    by 0x4235CEA: gnome_canvas_item_new (gnome-canvas.c:212)
==25946==    by 0x5AC4749: e_week_view_reshape_event_span (e-week-view.c:3201)
==25946==    by 0x5AC3A9E: e_week_view_reshape_events (e-week-view.c:2941)
==25946==    by 0x5AC3919: e_week_view_check_layout (e-week-view.c:2884)

e-week-view.c:3201 span->text_item =
			gnome_canvas_item_new (...

I found few other obvious leaks on this, so I'll commit that.
Comment 2 Milan Crha 2010-10-25 15:27:20 UTC
OK, so I chose a wrong parent type when removing GtkObject, it was supposed to be G_TYPE_INITIALLY_UNOWNED instead of G_TYPE_OBJECT.
Comment 3 Milan Crha 2010-10-25 15:29:45 UTC
Created commit 2ac302d in evo master (2.91.2+)