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 321543 - GstPadTemplate leaks
GstPadTemplate leaks
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-11-15 19:04 UTC by Johan (not receiving bugmail) Dahlin
Modified: 2006-03-07 10:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstbasesrc (700 bytes, patch)
2005-11-15 19:05 UTC, Johan (not receiving bugmail) Dahlin
none Details | Review
gst-plugins-base: oggdemux/vorbisdec fixes (3.56 KB, patch)
2005-11-15 19:05 UTC, Johan (not receiving bugmail) Dahlin
none Details | Review

Description Johan (not receiving bugmail) Dahlin 2005-11-15 19:04:35 UTC
According to valgrind we're leaking quite a few GstPadTemplates.
I've fixed a few of them, which I'll submit patches for here.

Can anything be done in the general case, to make it easier to not leak?
Comment 1 Johan (not receiving bugmail) Dahlin 2005-11-15 19:05:28 UTC
Created attachment 54793 [details] [review]
gstbasesrc
Comment 2 Johan (not receiving bugmail) Dahlin 2005-11-15 19:05:58 UTC
Created attachment 54794 [details] [review]
gst-plugins-base: oggdemux/vorbisdec fixes
Comment 3 Jan Schmidt 2006-01-27 18:03:44 UTC
Something weird here - none of those pad_templates are supposed to need unreffing.

Can you still reproduce the problem in valgrind?
Comment 4 Johan (not receiving bugmail) Dahlin 2006-01-27 18:32:10 UTC
I don't have a tree so I cannot check right now.

It might be/have been a mismatch between GObject and GstObject. Did any fixes related to templates go in since I reported this bug?
Comment 5 Jan Schmidt 2006-01-28 02:05:22 UTC
Actually, I'm wrong - the basesrc patch no longer seems relevant, gst_pad_new_from_static_template', which does correct unreffing.

The remaining fix is a leaked refcount in vorbisdec adding pad_templates to the class in base_init, but almost everywhere has that leak. We never unload classes though, so noone ever notices and I'm not sure we should bother fixing it until a hypothetical future where we've reworked every plugin to support it.


Comment 6 Jan Schmidt 2006-01-28 20:05:01 UTC
Hrmn, something got lost in translation there.

I was trying to say that there are leaks when adding the pad template to the class, and leaks adding pads from the pad template. The 2nd case seems to have been fixed in vorbisdec and oggdemux by using  gst_pad_new_from_static_template,
and I'm not sure we need to fix the first one since we never unload classes anyway.