jackersson / gst-python-plugins

42 stars 12 forks source link

object assert errors in sample plugins? #6

Closed ivost closed 3 years ago

ivost commented 3 years ago

I really like gstreamer-python and I am trying to use it. I spent a lot of time installing, configuring - still no luck. I followed instructions, docker example (in issue #1)... Even following the docker example - I see some "core dumped" at the end. I installed on clean Ubuntu 18.04.5 VM - and executed the steps in the Dockerfile in the VM. I had to change slightly symlink and GST_PYTHON_PATH. gst-inspect shows 3 python plugins - but there is some G_OBJECT assertion - which I initially thought is related to float property. If I comment float prop - it shows after int property. I suspect it is something with ref.count / early destruction maybe?

If I try gst-launch-1.0 videotestsrc ! gstplugin_py ! fakesink - it works fine but adding even 1 property causes crash

GST_DEBUG=python:6 gst-launch-1.0 videotestsrc ! gstplugin_py int-prop=100 str-prop="set" ! fakesink sys:1: Warning: g_object_class_find_property: assertion 'G_IS_OBJECT_CLASS (class)' failed sys:1: Warning: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(gst-launch-1.0:28107): GStreamer-CRITICAL : 09:25:36.982: gst_bin_add: assertion 'GST_IS_ELEMENT (element)' failed ERROR:./grammar.y:646:gst_parse_perform_link: assertion failed: (GST_IS_ELEMENT (sink))

I guess something has changed on system level or in related libraries - pygobject, gstreamer which causes the problem. Here is some version info

Successfully installed attrs-21.2.0 autopep8-1.5.7 flake8-3.9.1 gstreamer-python-0.0.3.dev18+gc8d4e04 importlib-metadata-4.0.1 iniconfig-1.1.1 mccabe-0.6.1 numpy-1.19.5 packaging-20.9 pluggy-0.13.1 py-1.10.0 py-cpuinfo-8.0.0 pycairo-1.20.0 pycodestyle-2.7.0 pyflakes-2.3.1 pyparsing-2.4.7 pytest-6.2.4 pytest-benchmark-3.4.1 toml-0.10.2 typing-extensions-3.10.0.0 zipp-3.4.1 I am attaching couple of screenshots...

inspect

launch

I will do one more try with venv

ivost commented 3 years ago

I noticed that my python points to 2.7 not to 3.6 After simply following readme instructions for venv setup - it WORKS. Didn't touch my GST_PLUGIN_PATH or anything else (but did requirements of course). I guess wrong python 2.7 can create havoc... All is good - it is just very picky to environment setup.