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 564137 - [ffmpegcolorspace] memory leak when registering plugin
[ffmpegcolorspace] memory leak when registering plugin
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: common
git master
Other Linux
: Normal blocker
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-12-11 16:20 UTC by Edward Hervey
Modified: 2008-12-12 09:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Edward Hervey 2008-12-11 16:20:08 UTC
The caps (through most likely the pad tempalte) created in _register() are leaked:

==20322== 11,672 (56 direct, 11,616 indirect) bytes in 1 blocks are definitely lost in loss record 3,743 of 3,824
==20322==    at 0x4C2299E: malloc (vg_replace_malloc.c:207)
==20322==    by 0x68D3472: g_malloc (in /usr/lib64/libglib-2.0.so.0.1800.3)
==20322==    by 0x68E8757: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.1800.3)
==20322==    by 0x529C42E: gst_caps_new_empty (gstcaps.c:140)
==20322==    by 0x7924724: gst_ffmpegcsp_codectype_to_caps (gstffmpegcodecmap.c:477)
==20322==    by 0x79221F2: gst_ffmpegcolorspace_register (gstffmpegcolorspace.c:496)
==20322==    by 0x7922190: plugin_init (gstffmpeg.c:38)
==20322==    by 0x52C5ED6: gst_plugin_register_func (gstplugin.c:334)
==20322==    by 0x52C6776: gst_plugin_load_file (gstplugin.c:545)
==20322==    by 0x52C6D32: gst_plugin_load_by_name (gstplugin.c:963)
==20322==    by 0x52C7D25: gst_plugin_feature_load (gstpluginfeature.c:110)
==20322==    by 0x52A9278: gst_element_factory_create (gstelementfactory.c:386)
==20322==    by 0x52A9B6E: gst_element_factory_make (gstelementfactory.c:474)
==20322==    by 0x72C41EA: gen_video_element (gstplaybin.c:842)
==20322==    by 0x72C5593: setup_sinks (gstplaybin.c:1606)
==20322==    by 0x72D2B0E: group_commit (gstplaybasebin.c:486)
==20322==    by 0x72D5342: gst_play_base_bin_change_state (gstplaybasebin.c:2181)
==20322==    by 0x72C627E: gst_play_bin_change_state (gstplaybin.c:1932)
==20322==    by 0x52A43CB: gst_element_change_state (gstelement.c:2427)
==20322==    by 0x52A708D: gst_element_set_state_func (gstelement.c:2377)
Comment 1 Wim Taymans 2008-12-11 16:26:09 UTC
Please rerun without the slice allocator like

G_SLICE=always_malloc

Comment 2 Edward Hervey 2008-12-11 16:34:26 UTC
this is the output of make check-valgrind from the g64-unstable buildslave

http://pitivi.org:8010/builders/g64~-base-full/builds/3/steps/make-check-valgrind/logs/stdio

Comment 3 Edward Hervey 2008-12-12 09:57:31 UTC
Added an assertion in common for this, since it will create dynamic pad templates.

2008-12-12  Edward Hervey  <edward.hervey@collabora.co.uk>

        * gst.supp:
        A whole bunch of suppressions detected on latest gentoo ~amd64.
        Make some existing suppressions more generic (for subtle dependecy
        code changes).
        Added suppressions for glibc-2.9.
        Added suppressions for new variants of ALSA leaks.
        Added suppressions for a series of leaks in plugins registrations due
        to some pad templates' caps calculated at runtime.
        Added suppressions for variants of some leaks in pango/fontconfig.
        Added suppressions for leak in gstffmpegcsp.c (nothing we can do
        about it, but will only exist once).