GNOME Bugzilla – Bug 736260
pbutils: assertion warnings after import of GstPbutils in Python (e.g. g_array_append_vals: assertion 'array' failed)
Last modified: 2018-01-10 20:46:05 UTC
Whenever I import "GstPbutils" from Python I some warnings about failed assertions. $ python Python 2.7.5 (default, Jun 25 2014, 10:19:55) [GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from gi.repository import GstPbutils …/lib64/python2.7/site-packages/gi/module.py:178: Warning: g_array_append_vals: assertion 'array' failed g_type = info.get_g_type() …/lib64/python2.7/site-packages/gi/module.py:178: Warning: g_hash_table_lookup: assertion 'hash_table != NULL' failed g_type = info.get_g_type() …/lib64/python2.7/site-packages/gi/module.py:178: Warning: g_hash_table_insert_internal: assertion 'hash_table != NULL' failed g_type = info.get_g_type() >>>
could you run it in gdb with G_DEBUG=fatal_warnings and get a stack trace?
Actually the right component might be 'gst-editing-services' because this happens when "info" is "ObjectInfo(EncodingVideoProfile)" but I don't feel knowledgeable enough to figure that out. I tried getting a core dump but it seems that my install (jhbuild/git) is missing debugging symbols. Any hint how I can tell jhbuild that it should retain all symbols?
Actually I managed to get a part of the trace which might be already enough for you to figure out what's going on:
+ Trace 234072
You need to run Gst.init() before that import apparently, not great
(In reply to comment #4) > You need to run Gst.init() before that import apparently, not great Thank you very much for that. Is that considered as a "good enough" workaround or should I keep the bug open?
No, importing modules should always be possible without having to call any functions before that. Not sure why it doesn't work out of the box though. The GI information for PbUtils says that gst_init(NULL, NULL) must be called. > --add-init-section="gst_init(NULL,NULL);" Probably a bug in pygi.
The bug is that gst-python doesn't doesn't call gst_init() in the overrides while accessing types. http://cgit.freedesktop.org/gstreamer/gst-python/commit/?id=9d1666ad0758617df6921d6ebd5dd802350e7148 If you don't depend on gst-python I'd recommend this before any import: import sys sys.modules["gi.overrides.Gst"] = None sys.modules["gi.overrides.GstPbutils"] = None also because the overrides break the pygobject provided API if installed.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pygobject/issues/83.