GNOME Bugzilla – Bug 621632
[0.11] switch to using G_INITIALLY_UNOWNED for floating objects
Last modified: 2012-02-28 12:45:30 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.
Looks like GStreamer should switch to using g_object_ref_sink and G_TYPE_INITIALLY_UNOWNED
Moving bug to GStreamer core, would have been nice to have some warning before the switch :)
Why can't they fix it and maintain backwards compatibility?
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...
https://bugzilla.gnome.org/show_bug.cgi?id=583909 has been fixed and will be in a PyGObject release soon, sorry about the trouble.
(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?
(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?
We should still switch at one point for the reasons Tomeu mentions. I'm just worried about keeping API/ABI compatibility though.
*** Bug 639384 has been marked as a duplicate of this bug. ***
In 0.11 GstObjects (elements, pads) derive from GInitiallyUnowned, so I guess we can close this.