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 621632 - [0.11] switch to using G_INITIALLY_UNOWNED for floating objects
[0.11] switch to using G_INITIALLY_UNOWNED for floating objects
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: 0.11.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 639384 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-06-15 12:06 UTC by Jonathan Matthew
Modified: 2012-02-28 12:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
demonstration (686 bytes, application/octet-stream)
2010-06-15 12:06 UTC, Jonathan Matthew
Details

Description Jonathan Matthew 2010-06-15 12:06:20 UTC
Created attachment 163671 [details]
demonstration

The recent removal of sinkfuncs (bug 583909) is causing problems with gst-python, which registers a sinkfunc that uses GStreamer's floating reference implementation.

With current pygobject git master, the attached program crashes due to reference counting problems.  The gst.GhostPad objects are disposed immediately after being added to the bin, which causes a crash when later trying to link the bin to another element.  After reverting commit 0462748 it works as expected.

This is also the cause of rhythmbox bug 621540.  I don't know what the right solution is here, I'm just an innocent application developer caught in the middle.
Comment 1 Edward Hervey 2010-06-20 09:20:40 UTC
Looks like GStreamer should switch to using g_object_ref_sink and G_TYPE_INITIALLY_UNOWNED
Comment 2 Edward Hervey 2010-06-21 09:01:05 UTC
Moving bug to GStreamer core, would have been nice to have some warning before the switch :)
Comment 3 Tim-Philipp Müller 2010-06-21 09:04:29 UTC
Why can't they fix it and maintain backwards compatibility?
Comment 4 Edward Hervey 2010-06-21 09:05:35 UTC
I'm actually wondering if switching to using
G_INITIALLY_UNOWNED/g_object_ref_sink/g_object_is_floating wouldn't be
considering an API/behaviour break at the GStreamer level...
Comment 5 Tomeu Vizoso 2010-06-21 15:39:25 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=583909 has been fixed and will be in a PyGObject release soon, sorry about the trouble.
Comment 6 Tim-Philipp Müller 2010-06-21 15:47:40 UTC
(In reply to comment #5)
> https://bugzilla.gnome.org/show_bug.cgi?id=583909 has been fixed and will be in
> a PyGObject release soon, sorry about the trouble.

Thanks a lot!

So I guess this bug can be closed then?
Comment 7 Tomeu Vizoso 2010-06-21 15:59:21 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > https://bugzilla.gnome.org/show_bug.cgi?id=583909 has been fixed and will be in
> > a PyGObject release soon, sorry about the trouble.
> 
> Thanks a lot!
> 
> So I guess this bug can be closed then?

Well, the function for registering sinkfuncs is deprecated, so would be good if GStreamer dropped it at some point. Wonder how people are using GStreamer from gjs and other languages?
Comment 8 Edward Hervey 2010-06-21 16:03:44 UTC
We should still switch at one point for the reasons Tomeu mentions. I'm just worried about keeping API/ABI compatibility though.
Comment 9 Edward Hervey 2011-01-13 08:05:36 UTC
*** Bug 639384 has been marked as a duplicate of this bug. ***
Comment 10 Tim-Philipp Müller 2012-02-28 12:45:30 UTC
In 0.11 GstObjects (elements, pads) derive from GInitiallyUnowned, so I guess we can close this.