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 702062 - crash after Gst.Pad.new_from_template
crash after Gst.Pad.new_from_template
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gst-python
1.0.6
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-12 07:19 UTC by Drew Perttula
Modified: 2014-06-09 09:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Drew Perttula 2013-06-12 07:19:13 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)
Comment 1 Sebastian Dröge (slomo) 2013-06-14 11:42:25 UTC
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.
Comment 2 Drew Perttula 2013-06-14 18:25:38 UTC
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


  • #0 pygobject_repr
    at /build/buildd/pygobject-3.4.0/gi/_gobject/pygobject.c line 1188
  • #1 object_str
    at ../Objects/typeobject.c line 3012
  • #2 _PyObject_Str
    at ../Objects/object.c line 430
  • #3 PyObject_Str
    at ../Objects/object.c line 451
  • #4 internal_print
    at ../Objects/object.c line 303
  • #5 PyObject_Print
    at ../Objects/object.c line 330
  • #6 file_PyObject_Print
    at ../Objects/fileobject.c line 110
  • #7 PyFile_WriteObject
    at ../Objects/fileobject.c line 2572
  • #8 PyEval_EvalFrameEx
  • #0 _pygi_marshal_from_py_interface_instance
    at /build/buildd/pygobject-3.4.0/gi/pygi-marshal-from-py.c line 1712
  • #1 _invoke_marshal_in_args
    at /build/buildd/pygobject-3.4.0/gi/pygi-invoke.c line 502
  • #2 pygi_callable_info_invoke
  • #3 _wrap_g_callable_info_invoke
  • #4 PyCFunction_Call
  • #5 ext_do_call
    at ../Python/ceval.c line 4331
  • #6 PyEval_EvalFrameEx
  • #7 PyEval_EvalCodeEx
  • #8 fast_function
    at ../Python/ceval.c line 4117
  • #9 call_function
    at ../Python/ceval.c line 4042
  • #10 PyEval_EvalFrameEx
  • #11 PyEval_EvalCodeEx
  • #12 PyEval_EvalCode
  • #13 run_mod
  • #14 PyRun_FileExFlags
  • #15 PyRun_SimpleFileExFlags
    at ../Python/pythonrun.c line 943
  • #16 PyRun_AnyFileExFlags
  • #17 Py_Main
    at ../Modules/main.c line 639
  • #18 main
    at ../Modules/python.c line 23

Comment 3 Drew Perttula 2013-06-14 18:26:44 UTC
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.
Comment 4 Sebastian Dröge (slomo) 2013-06-18 09:17:46 UTC
Which versions of python-gi and gobject-introspection are you using?
Comment 5 Sebastian Dröge (slomo) 2013-06-18 09:18:36 UTC
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
Comment 6 Thibault Saunier 2014-06-09 09:22:53 UTC
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!