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 648531 - Segfaults with Gst.Discoverer (Python - GObject-Introspection)
Segfaults with Gst.Discoverer (Python - GObject-Introspection)
Status: RESOLVED DUPLICATE of bug 631901
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-23 23:26 UTC by Matteo Drera
Modified: 2012-04-23 17:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Python code to test GstDiscoverer through GObject-Introspection (200 bytes, application/octet-stream)
2011-04-23 23:26 UTC, Matteo Drera
Details

Description Matteo Drera 2011-04-23 23:26:16 UTC
Created attachment 186538 [details]
Python code to test GstDiscoverer through GObject-Introspection

I'm currently trying to use GStreamer in python to obtain info from media (i.e. tag from audio files) and to do this I would use new feature such as GObject-Introspection

Unluckly GstDiscoverer seem to be broken due to some type casting error.

Running simple test code (attached) in python2.7, this is the result you get:
/usr/lib/python2.7/site-packages/gi/types.py:44: Warning: g_object_get_qdata: assertion `G_IS_OBJECT (object)' failed
  return info.invoke(*args)
Segmentation fault

This is the result of running in python3.2:
/usr/lib/python3.2/site-packages/gi/types.py:44: Warning: g_object_get_qdata: assertion `G_IS_OBJECT (object)' failed
  return info.invoke(*args)
/usr/lib/python3.2/site-packages/gi/types.py:44: Warning: g_type_get_qdata: assertion `node != NULL' failed
  return info.invoke(*args)
/usr/lib/python3.2/site-packages/gi/types.py:44: Warning: g_ascii_strncasecmp: assertion `s2 != NULL' failed
  return info.invoke(*args)
Segmentation fault


I don't know how is introspection supported in GStreamer, neither I can tell if type casting problems depends on GStreamer or PyGObject.

---
gstreamer0.10-base-plugins : 0.10.32-4
py3gobject : 2.28.4-1
Comment 1 Sebastian Dröge (slomo) 2011-04-26 13:53:03 UTC
This looks more like a bug in g-i/pygobject... Might be related to the fact that the return type is a GstMiniObject subclass and pygobject does not support non-GObject fundamental types yet.

Backtrace is this btw:

  • #0 __strcmp_ssse3
    at ../sysdeps/x86_64/multiarch/../strcmp.S line 100
  • #1 g_typelib_get_dir_entry_by_gtype
    from /usr/lib/libgirepository-1.0.so.1
  • #2 ??
    from /usr/lib/libgirepository-1.0.so.1
  • #3 g_hash_table_foreach
    at /tmp/buildd/glib2.0-2.28.6/./glib/ghash.c line 1330
  • #4 g_irepository_find_by_gtype
    from /usr/lib/libgirepository-1.0.so.1
  • #5 pygi_type_import_by_g_type_real
    at /build/bigon-pygobject_2.28.3-3-amd64-etHEm9/pygobject-2.28.3/gi/pygi-type.c line 61
  • #6 pygi_type_import_by_g_type
    at /build/bigon-pygobject_2.28.3-3-amd64-etHEm9/pygobject-2.28.3/gi/pygi.h line 118
  • #7 pygobject_lookup_class
    at /build/bigon-pygobject_2.28.3-3-amd64-etHEm9/pygobject-2.28.3/gobject/pygobject.c line 910
  • #8 pyg_type_get_bases
    at /build/bigon-pygobject_2.28.3-3-amd64-etHEm9/pygobject-2.28.3/gobject/pygobject.c line 659
  • #9 pygobject_new_with_interfaces
    at /build/bigon-pygobject_2.28.3-3-amd64-etHEm9/pygobject-2.28.3/gobject/pyg---Type <return> to continue, or q <return> to quit--- object.c line 702
  • #10 pygobject_lookup_class
    at /build/bigon-pygobject_2.28.3-3-amd64-etHEm9/pygobject-2.28.3/gobject/pygobject.c line 913
  • #11 pyg_type_get_bases
    at /build/bigon-pygobject_2.28.3-3-amd64-etHEm9/pygobject-2.28.3/gobject/pygobject.c line 659
  • #12 pygobject_new_with_interfaces
    at /build/bigon-pygobject_2.28.3-3-amd64-etHEm9/pygobject-2.28.3/gobject/pygobject.c line 702
  • #13 pygobject_lookup_class
    at /build/bigon-pygobject_2.28.3-3-amd64-etHEm9/pygobject-2.28.3/gobject/pygobject.c line 913
  • #14 pygobject_new_full
    at /build/bigon-pygobject_2.28.3-3-amd64-etHEm9/pygobject-2.28.3/gobject/pygobject.c line 958
  • #15 _pygi_argument_to_object
    at /build/bigon-pygobject_2.28.3-3-amd64-etHEm9/pygobject-2.28.3/gi/pygi-argument.c line 1655
  • #16 _process_invocation_state
  • #17 _wrap_g_callable_info_invoke
  • #18 ext_do_call
    at ../Python/ceval.c line 4060
  • #19 PyEval_EvalFrameEx
    at ../Python/ceval.c line 2452
  • #20 PyEval_EvalCodeEx
  • #21 fast_function
    at ../Python/ceval.c line 3846
  • #22 call_function
    at ../Python/ceval.c line 3771
  • #23 PyEval_EvalFrameEx
  • #24 PyEval_EvalCodeEx
    at ../Python/ceval.c line 3000
  • #25 PyEval_EvalCode
    at ../Python/ceval.c line 541
  • #26 run_mod
    at ../Python/pythonrun.c line 1351
  • #27 PyRun_FileExFlags
    at ../Python/pythonrun.c line 1337
  • #28 PyRun_SimpleFileExFlags
    at ../Python/pythonrun.c line 941
  • #29 Py_Main
    at ../Modules/main.c line 577
  • #30 __libc_start_main
    at libc-start.c line 228
  • #31 _start

Comment 2 Tomeu Vizoso 2011-04-26 14:48:08 UTC
(In reply to comment #1)
> This looks more like a bug in g-i/pygobject... Might be related to the fact
> that the return type is a GstMiniObject subclass and pygobject does not support
> non-GObject fundamental types yet.

Could be, see https://bugzilla.gnome.org/show_bug.cgi?id=631901
Comment 3 Martin Pitt 2012-04-23 17:53:06 UTC
Most likely a duplicate of bug 631901, and introspection is not supported with Gstreamer 0.10, only with 0.11/1.0 (where it is reportedly working).

So this is either a duplicate or invalid, marking as a dupe for now.

*** This bug has been marked as a duplicate of bug 631901 ***