GNOME Bugzilla – Bug 702062
crash after Gst.Pad.new_from_template
Last modified: 2014-06-09 09:22:53 UTC
I am making my own GstElement with a chain function from python, and I'm porting from 0.10 (working) to 1.0. The included file is enough to cause a seg fault. ubuntu package versions (ubuntu 12.10 with gstreamer-developers PPA): gir1.2-gstreamer-1.0 1.0.6-1~ubuntu12.10.1~ppa4 libgstreamer1.0-0:amd64 1.0.6-1~ubuntu12.10.1~ppa4 If I don't print sinkpad and I don't set_chain_function_full, I can actually run the pipeline. But printing sinkpad is enough to trigger a crash, and that set_chain_function_full invocation is probably wrong, too. It fails with a similar crash. import gi gi.require_version('Gst', '1.0') from gi.repository import GObject, Gst GObject.threads_init() Gst.init(None) pt = Gst.PadTemplate.new("sinkpadtemplate", Gst.PadDirection.SINK, Gst.PadPresence.ALWAYS, Gst.caps_from_string('ANY')) print pt sinkpad = Gst.Pad.new_from_template(pt, "sink") print "sinkpad" print sinkpad # this is enough to segfault print "set chain" def chainfunc(pad, buffer): return Gst.FLOW_OK sinkpad.set_chain_function_full(chainfunc, None)
This doesn't crash for me, can you get a backtrace? I tried with git master and 1.0.7 and there were no changes between 1.0.6 and 1.0.7 in that regard.
Here's the crash from the print. Below is the more important crash from the set_chain_function_full call. In case anyone wants to reproduce this output, here's what I ran: 1. sudo aptitude install python-gobject-dbg 2. gdb --args /usr/bin/python2.7-dbg /tmp/cr.py 3. r 4. bt
+ Trace 232064
well that got mangled. The first #0..#8 is the top of the traceback from the code as displayed. The next #0..#18 is the full trace from the code when I remove the 'print sinkpad' line.
Which versions of python-gi and gobject-introspection are you using?
nevermind, 3.4.0. I have 3.8.2 here, maybe that's what fixes it. The backtrace doesn't point in GStreamer's direction at least
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!