GNOME Bugzilla – Bug 157233
[PATCH] playbin leak fixes
Last modified: 2004-12-22 21:47:04 UTC
Found using valgrind on totem
Created attachment 33387 [details] [review] leak fixes valgrind traces: ==3158== 28 bytes in 1 blocks are definitely lost in loss record 9670 of 17049 ==3158== at 0x1B907901: calloc (vg_replace_malloc.c:176) ==3158== by 0x1C34B0DE: IA__g_malloc0 (gmem.c:154) ==3158== by 0x1C0BAFF1: gst_caps_new_empty (gstcaps.c:81) ==3158== by 0x1C0BB02A: gst_caps_new_any (gstcaps.c:100) ==3158== by 0x1C0DEF95: gst_pad_get_caps (gstpad.c:2696) ==3158== by 0x1D67047C: setup_source (gstplaybasebin.c:544) ==3158== by 0x1D6712DC: gst_play_base_bin_change_state (gstplaybasebin.c:768)==3158== by 0x1D66E89C: gst_play_bin_change_state (gstplaybin.c:667) ==3158== by 0x1C0C9DBD: gst_element_set_state_func (gstelement.c:2796) ==3158== by 0x1C0C9AA1: gst_element_set_state (gstelement.c:2739) ==3158== by 0x805E07A: bacon_video_widget_open (bacon-video-widget-gst.c:1098) ==3158== by 0x8065616: totem_action_set_mrl (totem.c:802) ==3158== by 0x8064EC2: totem_action_restore_pl (totem.c:640) ==3158== by 0x806D7BC: main (totem.c:3934) ==3158== 56 bytes in 2 blocks are definitely lost in loss record 13532 of 17049 ==3158== at 0x1B907901: calloc (vg_replace_malloc.c:176) ==3158== by 0x1C34B0DE: IA__g_malloc0 (gmem.c:154) ==3158== by 0x1C0BAFF1: gst_caps_new_empty (gstcaps.c:81) ==3158== by 0x1C0BB172: gst_caps_copy (gstcaps.c:205) ==3158== by 0x1C0DE558: gst_pad_explicit_getcaps (gstpad.c:2508) ==3158== by 0x1C0DECE7: gst_pad_get_caps (gstpad.c:2637) ==3158== by 0x1D7FC26A: close_link (gstdecodebin.c:795) ==3158== by 0x1D7FAEF3: try_to_link_1 (gstdecodebin.c:515) ==3158== by 0x1D7FAB10: close_pad_link (gstdecodebin.c:445) ==3158== by 0x1D7FBAF5: new_pad (gstdecodebin.c:649) ==3158== by 0x1C1F031B: IA__g_cclosure_marshal_VOID__OBJECT (gmarshal.c:636) ==3158== by 0x1C1D8946: IA__g_closure_invoke (gclosure.c:437) ==3158== by 0x1C1EEDAC: signal_emit_unlocked_R (gsignal.c:2442) ==3158== by 0x1C1EDFC6: IA__g_signal_emit_valist (gsignal.c:2201) ==3158== by 0x1C1EE31D: IA__g_signal_emit (gsignal.c:2245) ==3158== by 0x1C0C39FE: gst_element_add_pad (gstelement.c:1147) ==3158== by 0x1D84A099: gst_avi_demux_add_stream (gstavidemux.c:1084) ==3158== by 0x1D84C602: gst_avi_demux_stream_header (gstavidemux.c:1805) ==3158== by 0x1D84DF39: gst_avi_demux_loop (gstavidemux.c:2104) ==3158== by 0x1D6A6658: loop_group_schedule_function (gstoptimalscheduler.c:1343) ==3158== by 0x1D6A5D77: schedule_group (gstoptimalscheduler.c:1169) ==3158== by 0x1D6A5F40: gst_opt_scheduler_schedule_run_queue (gstoptimalscheduler.c:1216) ==3158== by 0x1D6A61D0: schedule_chain (gstoptimalscheduler.c:1269) ==3158== by 0x1D6AA5F5: gst_opt_scheduler_iterate (gstoptimalscheduler.c:2604) ==3158== by 0x1C0F069F: gst_scheduler_iterate (gstscheduler.c:738) ==3158== by 0x1C0B9DB4: gst_bin_iterate_func (gstbin.c:1213) ==3158== by 0x1C109E50: gst_marshal_BOOLEAN__VOID (gstmarshal.c:472) ==3158== by 0x1C1D8BD2: g_type_class_meta_marshal (gclosure.c:514) ==3158== by 0x1C1D8946: IA__g_closure_invoke (gclosure.c:437) ==3158== by 0x1C1EEFC4: signal_emit_unlocked_R (gsignal.c:2480) ==3158== by 0x1C1EE04F: IA__g_signal_emit_valist (gsignal.c:2211) ==3158== by 0x1C1EE31D: IA__g_signal_emit (gsignal.c:2245) ==3158== by 0x1C0BA0B9: gst_bin_iterate (gstbin.c:1266) ==3158== by 0x1C0FB3BE: gst_thread_main_loop (gstthread.c:688) ==3158== by 0x1C35FB6C: g_thread_create_proxy (gthread.c:560) ==3158== by 0x1C577D42: thread_wrapper (vg_libpthread.c:867) ==3158== by 0xB000F5DF: do__quit (vg_scheduler.c:1872)
Created attachment 33388 [details] [review] first patch was missing a bit.
Created attachment 33390 [details] [review] same patch, fixing a few additionnal leaks
In the last patch, I added a g_hash_table_destroy in the _dispose function, maybe there is more stuff to be freed there.
wtay, can you review this patch?
Setting milestone and adding patch prefix
Added the remaining ones to CVS, some were already fixed. Thanks.