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 623265 - Various memory leaks
Various memory leaks
Status: RESOLVED FIXED
Product: GtkHtml
Classification: Other
Component: API
3.31.x
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
: 627618 (view as bug list)
Depends on:
Blocks: 627707
 
 
Reported: 2010-07-01 07:29 UTC by David Woodhouse
Modified: 2010-09-07 16:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkhtml patch (4.36 KB, patch)
2010-09-07 16:37 UTC, Milan Crha
committed Details | Review

Description David Woodhouse 2010-07-01 07:29:55 UTC
==4945== 2,464 (1,152 direct, 1,312 indirect) bytes in 6 blocks are definitely lost in loss record 21,896 of 23,077
==4945==    at 0x4A0515D: malloc (vg_replace_malloc.c:195)
==4945==    by 0x319A044AE2: g_malloc (gmem.c:132)
==4945==    by 0x6DBEB09: html_cluev_new (htmlcluev.c:993)
==4945==    by 0x6DE3EF5: html_engine_parse (htmlengine.c:5365)
==4945==    by 0x6DA8ADC: gtk_html_begin_full (gtkhtml.c:3708)
==4945==    by 0xEE7D62E: html_stream_sync_write (em-html-stream.c:81)
==4945==    by 0xEE80978: sync_stream_process_message (em-sync-stream.c:68)
==4945==    by 0x319A03BD01: g_main_context_dispatch (gmain.c:1960)
==4945==    by 0x319A03FAE7: g_main_context_iterate (gmain.c:2591)
==4945==    by 0x319A03FFF4: g_main_loop_run (gmain.c:2799)
==4945==    by 0x31A19493C6: gtk_main (in /usr/lib64/libgtk-x11-2.0.so.0.2000.1)
==4945==    by 0x403022: main (main.c:631)
==4945==
Comment 1 David Woodhouse 2010-08-21 21:40:04 UTC
Also:

==24539== 3,024 bytes in 21 blocks are definitely lost in loss record 22,242 of 23,262
==24539==    at 0x4A0515D: malloc (vg_replace_malloc.c:195)
==24539==    by 0x3A4DC45784: g_malloc (in /lib64/libglib-2.0.so.0.2512.0)
==24539==    by 0x7052B4A: html_text_slave_new (htmltextslave.c:1135)
==24539==    by 0x7052F26: hts_fit_line (htmltextslave.c:70)
==24539==    by 0x700AB36: html_clue_flow_real_calc_size (htmlclueflow.c:958)
==24539==    by 0x70396A9: html_object_calc_size (htmlobject.c:1079)
==24539==    by 0x700C9C0: html_cluev_do_layout (htmlcluev.c:209)
==24539==    by 0x70396A9: html_object_calc_size (htmlobject.c:1079)
==24539==    by 0x700C9C0: html_cluev_do_layout (htmlcluev.c:209)
==24539==    by 0x70396A9: html_object_calc_size (htmlobject.c:1079)
==24539==    by 0x7026E23: html_engine_calc_size (htmlengine.c:5299)
==24539==    by 0x6FFC469: gtk_html_size_request (gtkhtml.c:1254)
==24539==
Comment 2 David Woodhouse 2010-08-21 21:41:02 UTC
==24539== 344 (200 direct, 144 indirect) bytes in 1 blocks are definitely lost in loss record 23,595 of 28,865
==24539==    at 0x4A0515D: malloc (vg_replace_malloc.c:195)
==24539==    by 0x3A4DC45784: g_malloc (in /lib64/libglib-2.0.so.0.2512.0)
==24539==    by 0x703BFE0: html_object_dup (htmlobject.c:890)
==24539==    by 0x704FF43: object_split (htmltext.c:691)
==24539==    by 0x70152F7: insert_object_for_undo (htmlengine-edit-cut-and-paste.c:369)
==24539==    by 0x7016F24: insert_object.clone.1 (htmlengine-edit-cut-and-paste.c:1141)
==24539==    by 0x6FF6BCF: gtk_html_insert_html_generic (gtkhtml.c:6211)
==24539==    by 0xF5DC402: e_msg_composer_show_sig_file (e-msg-composer.c:4035)
==24539==    by 0xF5DC797: set_editor_text (e-msg-composer.c:1438)
==24539==    by 0xF146723: em_utils_reply_to_message (em-composer-utils.c:2355)
==24539==    by 0xF139AA9: e_mail_reader_reply_to_message (e-mail-reader-utils.c:436)
==24539==    by 0x3A4E40D7BD: g_closure_invoke (in /lib64/libgobject-2.0.so.0.2512.0)
==24539==
Comment 3 David Woodhouse 2010-08-21 21:41:23 UTC
==24539== 768 bytes in 4 blocks are definitely lost in loss record 25,016 of 28,865
==24539==    at 0x4A0515D: malloc (vg_replace_malloc.c:195)
==24539==    by 0x3A4DC45784: g_malloc (in /lib64/libglib-2.0.so.0.2512.0)
==24539==    by 0x703BFE0: html_object_dup (htmlobject.c:890)
==24539==    by 0x7004646: op_helper (htmlclue.c:140)
==24539==    by 0x700486E: op_cut (htmlclue.c:186)
==24539==    by 0x701590C: delete_object (htmlengine-edit-cut-and-paste.c:592)
==24539==    by 0x70165D9: html_engine_delete (htmlengine-edit-cut-and-paste.c:1914)
==24539==    by 0x7050BD7: html_text_backspace (htmltext.c:2784)
==24539==    by 0x7017997: html_engine_delete_n (htmlengine-edit-cut-and-paste.c:1551)
==24539==    by 0x7000580: command (gtkhtml.c:5299)
==24539==    by 0x70007B0: gtk_html_command (gtkhtml.c:6087)
==24539==    by 0xF5DC4A2: e_msg_composer_show_sig_file (e-msg-composer.c:4020)
Comment 4 David Woodhouse 2010-08-21 21:41:36 UTC
==24539== 776 (576 direct, 200 indirect) bytes in 4 blocks are definitely lost in loss record 25,018 of 28,865
==24539==    at 0x4A0515D: malloc (vg_replace_malloc.c:195)
==24539==    by 0x3A4DC45784: g_malloc (in /lib64/libglib-2.0.so.0.2512.0)
==24539==    by 0x7052B4A: html_text_slave_new (htmltextslave.c:1135)
==24539==    by 0x704E875: ht_fit_line (htmltext.c:1069)
==24539==    by 0x700A91D: html_clue_flow_real_calc_size (htmlclueflow.c:911)
==24539==    by 0x70396A9: html_object_calc_size (htmlobject.c:1079)
==24539==    by 0x700C9C0: html_cluev_do_layout (htmlcluev.c:209)
==24539==    by 0x70396A9: html_object_calc_size (htmlobject.c:1079)
==24539==    by 0x7026E23: html_engine_calc_size (htmlengine.c:5299)
==24539==    by 0x7027D3F: html_engine_refresh_fonts (htmlengine.c:7009)
==24539==    by 0x6FFECF8: style_set (gtkhtml.c:1005)
==24539==    by 0x3A4E40D7BD: g_closure_invoke (in /lib64/libgobject-2.0.so.0.2512.0)
Comment 5 David Woodhouse 2010-08-21 23:27:46 UTC
==30229== 840 bytes in 5 blocks are definitely lost in loss record 16,914 of 19,024
==30229==    at 0x4A04481: calloc (vg_replace_malloc.c:418)
==30229==    by 0x3A4DC456A7: g_malloc0 (in /lib64/libglib-2.0.so.0.2512.0)
==30229==    by 0x701023A: html_embedded_new_widget (htmlembedded.c:377)
==30229==    by 0x702C34C: element_parse_object (htmlengine.c:1615)
==30229==    by 0x7023A47: parse_one_token (htmlengine.c:3983)
==30229==    by 0x7030B2D: html_engine_timer_event (htmlengine.c:1430)
==30229==    by 0x7030C37: html_engine_flush (htmlengine.c:6940)
==30229==    by 0xF160F60: html_stream_sync_flush (em-html-stream.c:108)
==30229==    by 0xF164408: sync_stream_process_message (em-sync-stream.c:87)
==30229==    by 0x3A4DC3C841: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.2512.0)
==30229==    by 0x3A4DC406F7: ??? (in /lib64/libglib-2.0.so.0.2512.0)
==30229==    by 0x3A4DC40C04: g_main_loop_run (in /lib64/libglib-2.0.so.0.2512.0)
Comment 6 David Woodhouse 2010-08-22 00:35:37 UTC
==23683== 1,840 bytes in 10 blocks are definitely lost in loss record 25,123 of 26,937
==23683==    at 0x4A0515D: malloc (vg_replace_malloc.c:195)
==23683==    by 0x3A4DC45784: g_malloc (in /lib64/libglib-2.0.so.0.2512.0)
==23683==    by 0x70061A9: html_clueflow_new (htmlclueflow.c:2588)
==23683==    by 0x7022478: flow_new (htmlengine.c:757)
==23683==    by 0x70289F3: html_engine_ensure_editable (htmlengine.c:4544)
==23683==    by 0x3A4E40D7BD: g_closure_invoke (in /lib64/libgobject-2.0.so.0.2512.0)
==23683==    by 0x3A4E425D68: ??? (in /lib64/libgobject-2.0.so.0.2512.0)
==23683==    by 0x3A4E4274C5: g_signal_emit_valist (in /lib64/libgobject-2.0.so.0.2512.0)
==23683==    by 0x3A4E427D22: g_signal_emit (in /lib64/libgobject-2.0.so.0.2512.0)
==23683==    by 0x3A4E40D7BD: g_closure_invoke (in /lib64/libgobject-2.0.so.0.2512.0)
==23683==    by 0x3A4E425D68: ??? (in /lib64/libgobject-2.0.so.0.2512.0)
==23683==    by 0x3A4E4274C5: g_signal_emit_valist (in /lib64/libgobject-2.0.so.0.2512.0)
Comment 7 David Woodhouse 2010-08-22 00:36:20 UTC
==23683== 2,000 bytes in 10 blocks are definitely lost in loss record 25,360 of 26,937
==23683==    at 0x4A0515D: malloc (vg_replace_malloc.c:195)
==23683==    by 0x3A4DC45784: g_malloc (in /lib64/libglib-2.0.so.0.2512.0)
==23683==    by 0x704DD92: html_text_new_with_len (htmltext.c:2975)
==23683==    by 0x702141D: text_new (htmlengine.c:730)
==23683==    by 0x70289A3: html_engine_ensure_editable (htmlengine.c:4554)
==23683==    by 0x3A4E40D7BD: g_closure_invoke (in /lib64/libgobject-2.0.so.0.2512.0)
==23683==    by 0x3A4E425D68: ??? (in /lib64/libgobject-2.0.so.0.2512.0)
==23683==    by 0x3A4E4274C5: g_signal_emit_valist (in /lib64/libgobject-2.0.so.0.2512.0)
==23683==    by 0x3A4E427D22: g_signal_emit (in /lib64/libgobject-2.0.so.0.2512.0)
==23683==    by 0x3A4E40D7BD: g_closure_invoke (in /lib64/libgobject-2.0.so.0.2512.0)
==23683==    by 0x3A4E425D68: ??? (in /lib64/libgobject-2.0.so.0.2512.0)
==23683==    by 0x3A4E4274C5: g_signal_emit_valist (in /lib64/libgobject-2.0.so.0.2512.0)
==23683==
Comment 8 David Woodhouse 2010-08-24 17:21:31 UTC
==16968== 17,232 (16,600 direct, 632 indirect) bytes in 83 blocks are definitely lost in loss record 22,164 of 22,411
==16968==    at 0x4A0515D: malloc (vg_replace_malloc.c:195)
==16968==    by 0x3A4DC45784: g_malloc (in /lib64/libglib-2.0.so.0.2512.0)
==16968==    by 0x703C000: html_object_dup (htmlobject.c:890)
==16968==    by 0x704EB4F: html_text_op_copy_helper (htmltext.c:354)
==16968==    by 0x7004861: op_helper (htmlclue.c:159)
==16968==    by 0x7004903: op_copy (htmlclue.c:176)
==16968==    by 0x7009339: op_helper (htmlclueflow.c:276)
==16968==    by 0x7009473: op_copy (htmlclueflow.c:288)
==16968==    by 0x7004861: op_helper (htmlclue.c:159)
==16968==    by 0x7004903: op_copy (htmlclue.c:176)
==16968==    by 0x70144BD: html_engine_copy_object (htmlengine-edit-cut-and-paste.c:397)
==16968==    by 0x6FFF6D8: command (gtkhtml.c:5094)
Comment 9 David Woodhouse 2010-09-03 00:30:07 UTC
Possibly the same as comment 2... 
==21464== 5,264 bytes in 28 blocks are definitely lost in loss record 32,593 of 33,527
==21464==    at 0x4A0615D: malloc (vg_replace_malloc.c:195)
==21464==    by 0x3D3D645C80: g_malloc (gmem.c:134)
==21464==    by 0x703E000: html_object_dup (htmlobject.c:890)
==21464==    by 0x700653B: split (htmlclue.c:224)
==21464==    by 0x700B887: split (htmlclueflow.c:346)
==21464==    by 0x7017317: insert_object_for_undo (htmlengine-edit-cut-and-paste.c:369)
==21464==    by 0x7018F44: insert_object.clone.1 (htmlengine-edit-cut-and-paste.c:1141)
==21464==    by 0x6FF8BEF: gtk_html_insert_html_generic (gtkhtml.c:6216)
==21464==    by 0xEF06512: e_msg_composer_show_sig_file (e-msg-composer.c:4011)
==21464==    by 0x3D3DE0E50D: g_closure_invoke (gclosure.c:766)
==21464==    by 0x3D3DE2000A: signal_emit_unlocked_R (gsignal.c:3252)
==21464==    by 0x3D3DE29B49: g_signal_emit_valist (gsignal.c:2983)
Comment 10 Milan Crha 2010-09-06 15:13:17 UTC
*** Bug 627618 has been marked as a duplicate of this bug. ***
Comment 11 Milan Crha 2010-09-07 16:37:05 UTC
Created attachment 169686 [details] [review]
gtkhtml patch

for gtkhtml;

There are my bits. Most crucial is the last chunk in the file. It's a regression from bug #607324, so I'm reverting it and I reopened that bug too. I did also few leak fixes in other projects, so I'll mention them here too.
Comment 12 Milan Crha 2010-09-07 16:42:20 UTC
Created commit 84f4f37 in gtkhtml master (3.31.92+)
Created commit 09ec942 in eds master (2.31.92+)
Created commit 101305e in evo master (2.31.92+)
Created commit 9cb13a6 in ema master (0.31.92+)