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 674787 - base video classes memleaks
base video classes memleaks
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.x
Other Linux
: Normal normal
: 0.10.37
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-04-25 12:16 UTC by Nicola
Modified: 2012-06-07 10:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nicola 2012-04-25 12:16:53 UTC
this pipeline:

gst-launch -e videotestsrc ! jpegenc ! jpegdec ! fakesink

produce the following leaks:


==3531== 312 bytes in 1 blocks are definitely lost in loss record 2,067 of 2,171
==3531==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3531==    by 0x53BBA38: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x53CEC62: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x53CF1A5: g_slice_alloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x96D7B0A: gst_video_encoder_sink_setcaps (gstvideoencoder.c:496)
==3531==    by 0x4E8C5AE: gst_pad_set_caps (gstpad.c:2730)
==3531==    by 0x4E8DF7F: gst_pad_push_data (gstpad.c:4247)
==3531==    by 0x4E91A65: gst_pad_push (gstpad.c:4730)
==3531==    by 0x9003D47: gst_base_src_loop (gstbasesrc.c:2559)
==3531==    by 0x4EB857B: gst_task_func (gsttask.c:328)
==3531==    by 0x53D8207: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x53D79A4: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x566AE99: start_thread (pthread_create.c:308)


==3531== 312 bytes in 1 blocks are definitely lost in loss record 2,068 of 2,171
==3531==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3531==    by 0x53BBA38: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x53CEC62: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x53CF1A5: g_slice_alloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x96DA114: gst_video_encoder_set_output_state (gstvideoencoder.c:462)
==3531==    by 0x94AE5E7: gst_jpegenc_set_format (gstjpegenc.c:354)
==3531==    by 0x96D7D20: gst_video_encoder_sink_setcaps (gstvideoencoder.c:545)
==3531==    by 0x4E8C5AE: gst_pad_set_caps (gstpad.c:2730)
==3531==    by 0x4E8DF7F: gst_pad_push_data (gstpad.c:4247)
==3531==    by 0x4E91A65: gst_pad_push (gstpad.c:4730)
==3531==    by 0x9003D47: gst_base_src_loop (gstbasesrc.c:2559)
==3531==    by 0x4EB857B: gst_task_func (gsttask.c:328)
==3531==    by 0x53D8207: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x53D79A4: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x566AE99: start_thread (pthread_create.c:308)


==3531== 312 bytes in 1 blocks are definitely lost in loss record 2,069 of 2,171
==3531==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3531==    by 0x53BBA38: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x53CEC62: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x53CF1A5: g_slice_alloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x96D5C29: gst_video_decoder_set_output_state (gstvideodecoder.c:519)
==3531==    by 0x94B07F9: gst_jpeg_dec_handle_frame (gstjpegdec.c:1072)
==3531==    by 0x96CF8BC: gst_video_decoder_have_frame_2 (gstvideodecoder.c:2290)
==3531==    by 0x96D588F: gst_video_decoder_have_frame (gstvideodecoder.c:2234)
==3531==    by 0x94AF5B8: gst_jpeg_dec_parse (gstjpegdec.c:606)
==3531==    by 0x96CFC12: gst_video_decoder_chain_forward (gstvideodecoder.c:1440)
==3531==    by 0x96D3B24: gst_video_decoder_chain (gstvideodecoder.c:1670)
==3531==    by 0x4E8E054: gst_pad_push_data (gstpad.c:4271)
==3531==    by 0x4E91A65: gst_pad_push (gstpad.c:4730)
==3531==    by 0x96D9BE0: gst_video_encoder_finish_frame (gstvideoencoder.c:1453)
==3531==    by 0x94ADC14: gst_jpegenc_term_destination (gstjpegenc.c:233)
==3531==    by 0x98F1B49: jpeg_finish_compress (in /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2)
==3531==    by 0x94AE2F6: gst_jpegenc_handle_frame (gstjpegenc.c:512)
==3531==    by 0x96D89DA: gst_video_encoder_chain (gstvideoencoder.c:1143)
==3531==    by 0x4E8E054: gst_pad_push_data (gstpad.c:4271)
==3531==    by 0x4E91A65: gst_pad_push (gstpad.c:4730)


==3531== 736 (312 direct, 424 indirect) bytes in 1 blocks are definitely lost in loss record 2,099 of 2,171
==3531==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3531==    by 0x53BBA38: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x53CEC62: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x53CF1A5: g_slice_alloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x96D258C: gst_video_decoder_sink_setcaps (gstvideodecoder.c:491)
==3531==    by 0x4E8C5AE: gst_pad_set_caps (gstpad.c:2730)
==3531==    by 0x4E8DF7F: gst_pad_push_data (gstpad.c:4247)
==3531==    by 0x4E91A65: gst_pad_push (gstpad.c:4730)
==3531==    by 0x96D9BE0: gst_video_encoder_finish_frame (gstvideoencoder.c:1453)
==3531==    by 0x94ADC14: gst_jpegenc_term_destination (gstjpegenc.c:233)
==3531==    by 0x98F1B49: jpeg_finish_compress (in /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2)
==3531==    by 0x94AE2F6: gst_jpegenc_handle_frame (gstjpegenc.c:512)
==3531==    by 0x96D89DA: gst_video_encoder_chain (gstvideoencoder.c:1143)
==3531==    by 0x4E8E054: gst_pad_push_data (gstpad.c:4271)
==3531==    by 0x4E91A65: gst_pad_push (gstpad.c:4730)
==3531==    by 0x9003D47: gst_base_src_loop (gstbasesrc.c:2559)
==3531==    by 0x4EB857B: gst_task_func (gsttask.c:328)
==3531==    by 0x53D8207: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x53D79A4: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.1)
==3531==    by 0x566AE99: start_thread (pthread_create.c:308)
Comment 1 Vincent Penquerc'h 2012-06-07 10:31:02 UTC
And it's only whem closing the bug that I realize I haven't added the BZ URL in the commit message. Ah well. Fixed by:

commit fd35793c387362ae0022d880cfdbcaa2cd51b3e4
Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Date:   Thu Jun 7 11:15:57 2012 +0100

    video: fix memory leak

and:

commit 1dad35eefff6b65a2474fcc24d9d84363c86888e
Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Date:   Thu Jun 7 11:16:37 2012 +0100

    jpegdec: fix video state leak



Similar fixes went in for theoradec and pngenc/pngdec.
I'll go look in other plugins if there's any such leaks too.