Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running with max gstreamer debug -ggg causes a crash #302

Open
wlcx opened this issue Sep 19, 2023 · 0 comments
Open

Running with max gstreamer debug -ggg causes a crash #302

wlcx opened this issue Sep 19, 2023 · 0 comments

Comments

@wlcx
Copy link

wlcx commented Sep 19, 2023

While trying to debug another issue, I ran voctocore with -ggg:

❯ python voctocore/voctocore.py -ggg
Traceback (most recent call last):
  File "/home/samw/prog/voctomix/voctocore/voctocore.py", line 111, in <module>
    main()
  File "/home/samw/prog/voctomix/voctocore/voctocore.py", line 98, in main
    voctocore = Voctocore()
  File "/home/samw/prog/voctomix/voctocore/voctocore.py", line 49, in __init__
    self.pipeline = Pipeline()
  File "/home/samw/prog/voctomix/voctocore/lib/pipeline.py", line 169, in __init__
    self.pipeline.use_clock(Clock)
AttributeError: 'Bin' object has no attribute 'use_clock'. Did you mean: 'set_clock'?

The really weird thing is that something is causing Gst.parse_launch to return a different type of object. If we add:

--- a/voctocore/lib/pipeline.py
+++ b/voctocore/lib/pipeline.py
@@ -166,6 +166,7 @@ class Pipeline(object):
         for bin in self.bins:
             bin.attach(self.pipeline)
 
+        print(type(self.pipeline))
         self.pipeline.use_clock(Clock)
 
         # fetch all queues

and run with -gg, we see (as expected):

❯ python voctocore/voctocore.py -gg                                     
<class 'gi.overrides.Gst.Pipeline'>
^C

but if we run with -ggg, the type has changed!:

❯ python voctocore/voctocore.py -ggg
<class 'gi.overrides.Gst.Bin'>
.... traceback omitted ....

I've narrowed it down to Gst.debug_add_log_function in debug.py. If you comment that out, it works. So it seems to be a combination of setting the default threshold to DEBUG and adding a log function.

To be honest this caused me psychic damage but I thought I'd better write it down somewhere...

This is on voctomix 27e2c58.

    INFO root: Python Version: sys.version_info(major=3, minor=10, micro=12, releaselevel='final', serial=0)
    INFO root: GStreamer Version: (major=1, minor=22, micro=5, nano=0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant