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 668343 - [0.11] - segfault when using missing plugin support in 0.11
[0.11] - segfault when using missing plugin support in 0.11
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.11.x
Other Linux
: Normal blocker
: 0.11.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-20 13:09 UTC by Christian Fredrik Kalager Schaller
Modified: 2012-02-25 00:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GST_DEBUG log (251.35 KB, application/x-bzip)
2012-01-20 13:10 UTC, Christian Fredrik Kalager Schaller
Details

Description Christian Fredrik Kalager Schaller 2012-01-20 13:09:30 UTC
Getting the following when trying to use the missing plugin support in pbutils:

checking for elements
containerchoise is MXF
incomingcaps is application/mxf
containerchoice returned is False
containerstatus is here False
strmissing is ['gstreamer|0.11|transmageddon.py|Material eXchange Format (MXF) muxer|encoder-application/mxf']
Segmentation fault
Comment 1 Christian Fredrik Kalager Schaller 2012-01-20 13:10:25 UTC
Created attachment 205695 [details]
GST_DEBUG log
Comment 2 Christian Fredrik Kalager Schaller 2012-01-20 13:23:14 UTC
Program received signal SIGSEGV, Segmentation fault.
0x4e30fc3f in __strcmp_sse4_2 () from /lib/libc.so.6
(gdb) thread apply all bt

Thread 1 (Thread 0xb7fd76c0 (LWP 21595))

  • #0 __strcmp_sse4_2
    from /lib/libc.so.6
  • #1 ptr_array_contains_string
    at install-plugins.c line 500
  • #2 gst_install_plugins_spawn_child
    at install-plugins.c line 528
  • #3 gst_install_plugins_async
    at install-plugins.c line 654
  • #4 ffi_call_SYSV
    from /usr/lib/libffi.so.5
  • #5 ffi_call
    from /usr/lib/libffi.so.5
  • #6 _g_callable_info_invoke
    at girepository/gicallableinfo.c line 518
  • #7 g_function_info_invoke
    at girepository/gifunctioninfo.c line 273
  • #8 ??
    from /usr/lib/python2.7/site-packages/gi/_gi.so
  • #9 PyCFunction_Call
    from /usr/lib/libpython2.7.so.1.0
  • #10 PyEval_EvalFrameEx
    from /usr/lib/libpython2.7.so.1.0
  • #11 PyEval_EvalCodeEx
    from /usr/lib/libpython2.7.so.1.0
  • #12 PyEval_EvalFrameEx
    from /usr/lib/libpython2.7.so.1.0
  • #13 PyEval_EvalFrameEx
    from /usr/lib/libpython2.7.so.1.0
  • #14 PyEval_EvalCodeEx
    from /usr/lib/libpython2.7.so.1.0
  • #15 ??
    from /usr/lib/libpython2.7.so.1.0
  • #16 PyObject_Call
    from /usr/lib/libpython2.7.so.1.0
  • #17 ??
    from /usr/lib/libpython2.7.so.1.0
  • #18 PyObject_Call
    from /usr/lib/libpython2.7.so.1.0
  • #19 PyEval_CallObjectWithKeywords
    from /usr/lib/libpython2.7.so.1.0
  • #20 PyObject_CallObject
    from /usr/lib/libpython2.7.so.1.0
  • #21 ??
    from /usr/lib/python2.7/site-packages/gi/_gi.so
  • #22 g_closure_invoke
    at gclosure.c line 774
  • #23 signal_emit_unlocked_R
    at gsignal.c line 3372
  • #24 g_signal_emit_valist
    at gsignal.c line 3033
  • #25 g_signal_emit
    at gsignal.c line 3090
  • #26 ??
    from /usr/lib/libgtk-3.so.0
  • #27 gtk_combo_box_set_active_iter
    from /usr/lib/libgtk-3.so.0
  • #28 ??
    from /usr/lib/libgtk-3.so.0
  • #29 g_cclosure_marshal_VOID__STRING
    at gmarshal.c line 504
  • #30 g_closure_invoke
    at gclosure.c line 774
  • #31 signal_emit_unlocked_R
    at gsignal.c line 3302
  • #32 g_signal_emit_valist
    at gsignal.c line 3033
  • #33 g_signal_emit
    at gsignal.c line 3090
  • #34 ??
    from /usr/lib/libgtk-3.so.0
  • #35 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 85
  • #36 g_closure_invoke
    at gclosure.c line 774
  • #37 signal_emit_unlocked_R
    at gsignal.c line 3302
  • #38 g_signal_emit_valist
    at gsignal.c line 3033
  • #39 g_signal_emit
    at gsignal.c line 3090
  • #40 gtk_widget_activate
    from /usr/lib/libgtk-3.so.0
  • #41 gtk_menu_shell_activate_item
    from /usr/lib/libgtk-3.so.0
  • #42 ??
    from /usr/lib/libgtk-3.so.0
  • #43 ??
    from /usr/lib/libgtk-3.so.0
  • #44 ??
    from /usr/lib/libgtk-3.so.0
  • #45 g_type_class_meta_marshal
    at gclosure.c line 885
  • #46 g_closure_invoke
    at gclosure.c line 774
  • #47 signal_emit_unlocked_R
    at gsignal.c line 3340
  • #48 g_signal_emit_valist
    at gsignal.c line 3043
  • #49 g_signal_emit
    at gsignal.c line 3090
  • #50 ??
    from /usr/lib/libgtk-3.so.0
  • #51 gtk_propagate_event
    from /usr/lib/libgtk-3.so.0
  • #52 gtk_main_do_event
    from /usr/lib/libgtk-3.so.0
  • #53 ??
    from /usr/lib/libgdk-3.so.0
  • #54 ??
    from /usr/lib/libgdk-3.so.0
  • #55 g_main_dispatch
    at gmain.c line 2513
  • #56 g_main_context_dispatch
    at gmain.c line 3050
  • #57 g_main_context_iterate
    at gmain.c line 3121
  • #58 g_main_context_iterate
    at gmain.c line 3058
  • #59 g_main_loop_run
    at gmain.c line 3315
  • #60 gtk_main
    from /usr/lib/libgtk-3.so.0
  • #61 ffi_call_SYSV
    from /usr/lib/libffi.so.5
  • #62 ffi_call
    from /usr/lib/libffi.so.5
  • #63 _g_callable_info_invoke
    at girepository/gicallableinfo.c line 518
  • #64 g_function_info_invoke
    at girepository/gifunctioninfo.c line 273
  • #65 ??
    from /usr/lib/python2.7/site-packages/gi/_gi.so
  • #66 PyCFunction_Call
    from /usr/lib/libpython2.7.so.1.0
  • #67 PyEval_EvalFrameEx
    from /usr/lib/libpython2.7.so.1.0
  • #68 PyEval_EvalCodeEx
    from /usr/lib/libpython2.7.so.1.0
  • #69 PyEval_EvalFrameEx
    from /usr/lib/libpython2.7.so.1.0
  • #70 PyEval_EvalCodeEx
    from /usr/lib/libpython2.7.so.1.0
  • #71 PyEval_EvalCode
    from /usr/lib/libpython2.7.so.1.0
  • #72 ??
    from /usr/lib/libpython2.7.so.1.0
  • #73 PyRun_FileExFlags
    from /usr/lib/libpython2.7.so.1.0
  • #74 PyRun_SimpleFileExFlags
    from /usr/lib/libpython2.7.so.1.0
  • #75 PyRun_AnyFileExFlags
    from /usr/lib/libpython2.7.so.1.0
  • #76 Py_Main
    from /usr/lib/libpython2.7.so.1.0
  • #77 main

Comment 3 Christian Fredrik Kalager Schaller 2012-02-23 11:21:59 UTC
Just tested this with current git master and it is still an issue.
Comment 4 Tim-Philipp Müller 2012-02-23 11:30:50 UTC
But it can't be reproduced with a simple python script ?
Comment 5 Christian Fredrik Kalager Schaller 2012-02-23 11:49:24 UTC
Doing the following in ipython reproduces it for me:

from gi.repository import Gst
from gi.repository import GstPbutils
Gst.init(None)
GObject.threads_init()

caps=Gst.Caps.from_string("application/mxf")
missing = GstPbutils.missing_encoder_installer_detail_new(caps)
context = GstPbutils.InstallPluginsContext ()
strmissing = str(missing)

def donemessage():
  print "done"

GstPbutils.install_plugins_async (strmissing, context, donemessage, None)
Comment 6 Tim-Philipp Müller 2012-02-25 00:44:30 UTC
Fixed the annotation and also allowed context to be None:

 commit 5dbb27fb50116da00fe9bc84e2a3e37e53dc0232
 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
 Date:   Sat Feb 25 00:39:53 2012 +0000

    pbutils: fix gst_install_plugins_{sync,async} g-i annotations
    
    the gir scanner doesn't use a sensible defaults for string array
    arguments, so we have to annotate it properly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=668343



Something to actually test/reproduce this properly (need to run main loop; need a plugin installer script, otherwise we just get a no-script error return right away without it even doing anything, at least in an uninstalled setup):

from gi.repository import Gst
from gi.repository import Gtk
from gi.repository import GstPbutils
from gi.repository import GObject
import os

Gst.init(None)
GObject.threads_init()

helper_bin='/tmp/dummy-plugin-install-helper.sh'
f = file(helper_bin, "w")
f.writelines(['#!/bin/sh\n', 'echo INSTALL: $*\n'])
f.close()
os.chmod(helper_bin, 0755)

caps=Gst.Caps.from_string("application/mxf")
missing = GstPbutils.missing_encoder_installer_detail_new(caps)

def donemessage(result, data):
  print "done!!!", result
  Gtk.main_quit()

os.environ['GST_INSTALL_PLUGINS_HELPER'] = helper_bin
GstPbutils.install_plugins_async ([ missing ], None, donemessage, None)

Gtk.main()