[gstreamer-bugs] [Bug 357432] New: [libs] GstController needs to keep controlled objects alive
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Sun Sep 24 03:45:48 PDT 2006
Do not reply to this via email (we are currently unable to handle email
responses and they get discarded). You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=357432
GStreamer | gstreamer (core) | Ver: HEAD CVS
Summary: [libs] GstController needs to keep controlled objects
alive
Product: GStreamer
Version: HEAD CVS
Platform: Other
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: mail at renestadler.de
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME version: Unspecified
GNOME milestone: Unspecified
The pointer to the controlled object that controllers store is not backed by a
reference, thus the object can be destructed without the controller being
notified. It's clear that one would not want to create a controller for an
object and then would drop all references to the object before
uncontrolling/disposing the controller, which is why this bug has no negative
side effects in C code so far. In bindings to higher level languages (with
garbage collectors) however, one is not necessarily in control over the exact
order in which objects as destroyed (or one does not care). Attaching a patch
that turns this little python session
>>> import pygst; pygst.require ("0.10"); import gst, gc
>>> gst.Controller (gst.element_factory_make ("volume"), "volume")
<gst.Controller object (GstController) at 0xb76855f4>
>>> gc.collect ()
1
>>> gc.collect ()
__main__:1: Warning: instance with invalid (NULL) class pointer
__main__:1: Warning: g_signal_handler_disconnect: assertion
`G_TYPE_CHECK_INSTANCE (instance)' failed
__main__:1: Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)'
failed
1
>>> gc.collect ()
0
...into this...
>>> import pygst; pygst.require ("0.10"); import gst, gc
>>> gst.Controller (gst.element_factory_make ("volume"), "volume")
<gst.Controller object (GstController) at 0xb75d59dc>
>>> gc.collect ()
0
>>> gc.collect ()
1
>>> gc.collect ()
1
>>> gc.collect ()
0
--
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Gstreamer-bugs
mailing list