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 449105 - gst.element_register() causes core dump
gst.element_register() causes core dump
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-python
0.10.6
Other All
: Normal critical
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-06-19 12:47 UTC by Corey O.
Modified: 2007-06-29 16:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Corey O. 2007-06-19 12:47:11 UTC
Steps to reproduce:
1. include the code below in any python file
2. removing the __gstdetails__ variable stops the coredump, but the element will not properly register
3. commenting the last line of this code also stops the core dump


Stack trace:
import pygst
pygst.require('0.10')
import gst
import gobject

class Identity(gst.Element):

  __gstdetails__ = ('Identity Plugin',
                    "identity.py",
                    "Simple Identity Filter Example",
                    "Corey O.")

  _srcpadtemplate = gst.PadTemplate ("srcpadtemplate",
                                     gst.PAD_SRC,
				     gst.PAD_ALWAYS,
				     gst.caps_new_any())

  _sinkpadtemplate = gst.PadTemplate ("sinkpadtemplate",
                                      gst.PAD_SINK,
                                      gst.PAD_ALWAYS,
                                      gst.caps_new_any())



  def __init__(self, name):
    gst.Element.__init__(self)
    self.set_name(name)
    self.srcpad = gst.Pad(self._srcpadtemplate, "src")
    self.sinkpad = gst.Pad(self._sinkpadtemplate, "sink")
    self.add_pad(self.srcpad)
    self.add_pad(self.sinkpad)

    self.sinkpad.set_chain_function(self.chainfunc)
    self.sinkpad.set_event_function(self.eventfunc)

  def chainfunc(self, pad, buffer):
    return self.srcpad.push(buffer)

  def eventfunc(self, pad, event):
    return self.srcpad.push_event(event)

gobject.type_register(Identity)
gst.element_register(Identity, 'identity')

Other information:
Comment 1 Corey O. 2007-06-19 12:48:28 UTC
current version of GStreamer is 0.10.12 from the feisty repository
Comment 2 Jan Schmidt 2007-06-29 16:11:03 UTC
This was fixed in 0.10.13 of GStreamer core:

2007-05-12  David Schleef  <ds@schleef.org>

        * gst/gstelementfactory.c:
          Allow gst_element_register() to be called with plugin==NULL.
          Did nobody notice that static elements were broken?