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 736668 - Memory leak when streaming in to SDL texture.
Memory leak when streaming in to SDL texture.
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.4.1
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-15 11:27 UTC by Janos Kiss
Modified: 2016-06-20 10:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
source + valgrind log (207.13 KB, application/zip)
2014-09-15 11:31 UTC, Janos Kiss
Details
memlive log (106.75 KB, text/plain)
2014-09-16 09:34 UTC, Janos Kiss
Details
memlive + valgrind 2014 09 14 (162.16 KB, application/zip)
2014-09-16 10:03 UTC, Janos Kiss
Details

Description Janos Kiss 2014-09-15 11:27:08 UTC
Hi,

I have attached my source code, test video, and valgrind log.

The libraries: 
gstreamer-1.4.1
gst-plugins-base-1.4.1
gst-libav-1.4.1
gst-plugins-bad-1.4.1
gst-plugins-good-1.4.1
gst-plugins-ugly-1.4.1

SDL2-2.0.3

Ubuntu 14.04 64bit.
Comment 1 Janos Kiss 2014-09-15 11:31:18 UTC
Created attachment 286194 [details]
source  + valgrind log

source + valgrind log

The test video is located in this zip.
http://www63.zippyshare.com/v/13915709/file.html
Comment 2 Matthew Waters (ystreet00) 2014-09-16 09:08:11 UTC
In video.cpp:47

replace 
    gst_buffer_unref(buffer);
with
    gst_sample_unref (sample);

Also, there is the environment variable GST_TRACE=mem-live which will output the GstObjects that are still alive at the end of the program.
Comment 3 Janos Kiss 2014-09-16 09:34:20 UTC
"replace 
    gst_buffer_unref(buffer);
with
    gst_sample_unref (sample);"

I did it, but it doesn't helped.
I attached the log of mem-live.
Comment 4 Janos Kiss 2014-09-16 09:34:50 UTC
Created attachment 286271 [details]
memlive log
Comment 5 Matthew Waters (ystreet00) 2014-09-16 09:47:36 UTC
Yes it did. Before that you were leaking GstSample's.

They look like typefinding artifacts.  Try adding a gst_deinit() at the end of your program.

Do you have any specific issue with the current program?
Comment 6 Janos Kiss 2014-09-16 10:00:32 UTC
(In reply to comment #5)
> Yes it did. Before that you were leaking GstSample's.
> 
> They look like typefinding artifacts.  Try adding a gst_deinit() at the end of
> your program.
> 
> Do you have any specific issue with the current program?

gst_deinit() added. There is way less object in the memlive log. I attach the new one.

The program works, but If I leave it running in looped playing, it will crash after a while.
Comment 7 Janos Kiss 2014-09-16 10:03:03 UTC
Created attachment 286278 [details]
memlive + valgrind 2014 09 14
Comment 8 Matthew Waters (ystreet00) 2014-09-16 11:05:02 UTC
How does it crash? got a backtrace?
Comment 9 Janos Kiss 2014-09-16 13:52:05 UTC
(In reply to comment #8)
> How does it crash? got a backtrace?

Unfortunately I didn't made last time.

I'm making it now. I'm running the application with gdb.
(It may take a day, the current memory usage growing is way smaller then it before) 

[ERR]    mem allocation failed!


And this was the last error message what I had.
Comment 10 Janos Kiss 2014-09-17 08:23:29 UTC
(In reply to comment #8)
> How does it crash? got a backtrace?

[Thread 0x7fffee3ca700 (LWP 3244) exited]

Program terminated with signal SIGKILL, Killed.
The program no longer exists.
(gdb)
Comment 11 Tim-Philipp Müller 2016-06-20 10:54:47 UTC
Unfortunately we don't have enough information here to pursue this further. Hopefully it's been fixed in the almost 2 years since you ran into this. If it's still an issue with latest gstreamer please re-open or file a new bug, thanks!