GNOME Bugzilla – Bug 736668
Memory leak when streaming in to SDL texture.
Last modified: 2016-06-20 10:54:47 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.
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
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.
"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.
Created attachment 286271 [details] memlive log
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?
(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.
Created attachment 286278 [details] memlive + valgrind 2014 09 14
How does it crash? got a backtrace?
(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.
(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)
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!