Cluttersink - ClutterTexture memory leak

Sebastian Dröge sebastian at centricular.com
Sat Dec 7 02:14:14 PST 2013


On Do, 2013-12-05 at 18:40 +0200, Vladimir Caruntu wrote:
> Hi,
> I am using a pile like: appsrc -> ffmpegcolorspace -> cluttersink
> Then at some point I free the pipe, also destroy the texture attached to
> cluttersink, and I am opening a new similar pipe, there are situations when
> I need to run multiple similar pipes. The application is long running.
> 
> The problem, from my research relies somewhere in cluttersink <->
> ClutterTexture, if I don't set the 'texture' property to cluttersink (or if
> I'm not setting the width and height of texture after the size-change
> signal is fired on texture, or if I'm just using fakesink) then everything
> is fine, memory is freed.
> 
> I understand the slice allocator, maybe not 100% :), but the problem is
> that the memory usage grows until it fills up the RAM and the process gets
> killed by the system.
> 
> I did a basic test source code (using the pipe videotestsrc ->
> ffmpegcolorspace -> cluttersink) to demonstrate and to isolate the problem,
> please see the link below. It was tested and reproduced on:
> - Ubuntu 12.04, gstreamer 0.10.36 and clutter-gst 1.6.0
> - Windows 8, gstreamer 0.10.36 and clutter-gst 1.6.0
> - Ubuntu 13.10 gstreamer 1.2.0 and clutter-gst 2.0.8 (using videoconvert
> instead of ffmpegcolorspace)
> Test source code (after ~20-30 minutes the process eats up to 1GB of RAM):
> http://pastebin.com/sD1cYrZx

I don't see any obvious leaks in your code, but you could try running it
with valgrind (and let the application exit after 2-3 iterations) to see
if there's any memory being leaked and where it does come from.

As it works fine with fakesink and only fails with cluttersink, I would
assume it's a bug somewhere in clutter and you might want to a) try the
latest clutter version (which has some API changes, so your code does
not even compile there anymore... clutter_group_add() is gone for
example) to see if it still occurs there, and b) file a bug at
http://bugzilla.gnome.org against clutter or clutter-gst.

-- 
Sebastian Dröge <sebastian at centricular.com>
Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131207/eb7b891c/attachment-0001.pgp>


More information about the gstreamer-devel mailing list