Handle GStreamer built without debug infrastructure without crashing
Hello,
I have some trouble getting rust plugins work (particularly fallbackswitch) on my RPi 4. The same pipelines including fallbackswitch work perfectly on my laptop, but on the RPi (also running gstreamer 1.18.2), there seems to be an assertion failure in the gstreamer-rs side. Might be some configuration or incompatibility issue, but I'm not able to tell. Here's the full trace:
Setting pipeline to PAUSED ...
thread '<unnamed>' panicked at 'assertion failed: !ptr.is_null()', /home/pi/.cargo/git/checkouts/gstreamer-rs-79e52a2d27eb91a3/927cca1/gstreamer/src/log.rs:65:13
stack backtrace:
Pipeline is live and does not need PREROLL ...
Got context from element 'souphttpsrc0': gst.soup.session=context, session=(SoupSession)NULL, force=(boolean)false;
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0: std::panicking::begin_panic
at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:521:12
1: gstreamer::log::DebugCategory::new
at ./.cargo/git/checkouts/gstreamer-rs-79e52a2d27eb91a3/927cca1/gstreamer/src/log.rs:65:13
2: gstfallbackswitch::fallbackswitch::imp::CAT::{{closure}}
at ./build/gst-plugins-rs/utils/fallbackswitch/src/fallbackswitch/imp.rs:64:5
3: core::ops::function::FnOnce::call_once
at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/ops/function.rs:227:5
4: core::ops::function::FnOnce::call_once
at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/ops/function.rs:227:5
5: once_cell::sync::Lazy<T,F>::force::{{closure}}
at ./.cargo/registry/src/github.com-1285ae84e5963aae/once_cell-1.5.2/src/lib.rs:1001:28
6: once_cell::sync::OnceCell<T>::get_or_init::{{closure}}
at ./.cargo/registry/src/github.com-1285ae84e5963aae/once_cell-1.5.2/src/lib.rs:834:57
7: once_cell::imp::OnceCell<T>::initialize::{{closure}}
at ./.cargo/registry/src/github.com-1285ae84e5963aae/once_cell-1.5.2/src/imp_std.rs:93:19
8: once_cell::imp::initialize_inner
at ./.cargo/registry/src/github.com-1285ae84e5963aae/once_cell-1.5.2/src/imp_std.rs:167:31
9: once_cell::imp::OnceCell<T>::initialize
at ./.cargo/registry/src/github.com-1285ae84e5963aae/once_cell-1.5.2/src/imp_std.rs:91:9
10: once_cell::sync::OnceCell<T>::get_or_try_init
at ./.cargo/registry/src/github.com-1285ae84e5963aae/once_cell-1.5.2/src/lib.rs:874:13
11: once_cell::sync::OnceCell<T>::get_or_init
at ./.cargo/registry/src/github.com-1285ae84e5963aae/once_cell-1.5.2/src/lib.rs:834:19
12: once_cell::sync::Lazy<T,F>::force
at ./.cargo/registry/src/github.com-1285ae84e5963aae/once_cell-1.5.2/src/lib.rs:1000:13
13: <once_cell::sync::Lazy<T,F> as core::ops::deref::Deref>::deref
at ./.cargo/registry/src/github.com-1285ae84e5963aae/once_cell-1.5.2/src/lib.rs:1010:13
14: <gstfallbackswitch::fallbackswitch::imp::FallbackSwitch as gstfallbackswitch::gst_base_compat::subclass::aggregator::AggregatorImpl>::get_next_time
at ./build/gst-plugins-rs/utils/fallbackswitch/src/fallbackswitch/imp.rs:1044:13
15: gstfallbackswitch::gst_base_compat::subclass::aggregator::aggregator_get_next_time::{{closure}}
at ./build/gst-plugins-rs/utils/fallbackswitch/src/base/subclass/aggregator.rs:925:9
16: core::ops::function::FnOnce::call_once
at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/ops/function.rs:227:5
17: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panic.rs:322:9
18: std::panicking::try::do_call
at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:381:40
19: __rust_try.llvm.2388119712112984368
20: std::panicking::try
at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:345:19
21: std::panic::catch_unwind
at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panic.rs:396:14
22: gstfallbackswitch::gst_base_compat::subclass::aggregator::aggregator_get_next_time
at ./build/gst-plugins-rs/utils/fallbackswitch/src/base/subclass/aggregator.rs:924:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
ERROR: from element /GstPipeline:pipeline0/FallbackSwitch:s: GStreamer encountered a general supporting library error.
Additional debug info:
utils/fallbackswitch/src/base/subclass/aggregator.rs(924): gstfallbackswitch::gst_base_compat::subclass::aggregator (): /GstPipeline:pipeline0/FallbackSwitch:s:
Panicked: assertion failed: !ptr.is_null()
ERROR: from element /GstPipeline:pipeline0/FallbackSwitch:s: GStreamer encountered a general supporting library error.
Additional debug info:
utils/fallbackswitch/src/base/subclass/aggregator.rs(717): gstfallbackswitch::gst_base_compat::subclass::aggregator (): /GstPipeline:pipeline0/FallbackSwitch:s:
Panicked
Execution ended after 0:00:00.116109953
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/FallbackSwitch:s: GStreamer encountered a general supporting library error.
Additional debug info:
utils/fallbackswitch/src/base/subclass/aggregator.rs(784): gstfallbackswitch::gst_base_compat::subclass::aggregator (): /GstPipeline:pipeline0/FallbackSwitch:s:
Panicked
ERROR: from element /GstPipeline:pipeline0/FallbackSwitch:s: GStreamer encountered a general supporting library error.
Additional debug info:
utils/fallbackswitch/src/base/subclass/aggregator.rs(924): gstfallbackswitch::gst_base_compat::subclass::aggregator (): /GstPipeline:pipeline0/FallbackSwitch:s:
Panicked
ERROR: from element /GstPipeline:pipeline0/FallbackSwitch:s: GStreamer encountered a general supporting library error.
Additional debug info:
/home/pi/.cargo/git/checkouts/gstreamer-rs-79e52a2d27eb91a3/927cca1/gstreamer/src/subclass/element.rs(386): gstreamer::subclass::element (): /GstPipeline:pipeline0/FallbackSwitch:s:
Panicked
ERROR: from element /GstPipeline:pipeline0/FallbackSwitch:s: GStreamer encountered a general supporting library error.
Additional debug info:
utils/fallbackswitch/src/base/subclass/aggregator.rs(784): gstfallbackswitch::gst_base_compat::subclass::aggregator (): /GstPipeline:pipeline0/FallbackSwitch:s:
Panicked
ERROR: from element /GstPipeline:pipeline0/FallbackSwitch:s: GStreamer encountered a general supporting library error.
Additional debug info:
utils/fallbackswitch/src/base/subclass/aggregator.rs(739): gstfallbackswitch::gst_base_compat::subclass::aggregator (): /GstPipeline:pipeline0/FallbackSwitch:s:
Panicked
ERROR: from element /GstPipeline:pipeline0/FallbackSwitch:s: GStreamer encountered a general supporting library error.
Additional debug info:
utils/fallbackswitch/src/base/subclass/aggregator.rs(784): gstfallbackswitch::gst_base_compat::subclass::aggregator (): /GstPipeline:pipeline0/FallbackSwitch:s:
Panicked
ERROR: from element /GstPipeline:pipeline0/FallbackSwitch:s: GStreamer encountered a general supporting library error.
Additional debug info:
utils/fallbackswitch/src/base/subclass/aggregator.rs(739): gstfallbackswitch::gst_base_compat::subclass::aggregator (): /GstPipeline:pipeline0/FallbackSwitch:s:
Panicked
ERROR: from element /GstPipeline:pipeline0/FallbackSwitch:s: GStreamer encountered a general supporting library error.
Additional debug info:
/home/pi/.cargo/git/checkouts/gstreamer-rs-79e52a2d27eb91a3/927cca1/gstreamer/src/subclass/element.rs(386): gstreamer::subclass::element (): /GstPipeline:pipeline0/FallbackSwitch:s:
Panicked
ERROR: from element /GstPipeline:pipeline0/FallbackSwitch:s: GStreamer encountered a general supporting library error.
Additional debug info:
/home/pi/.cargo/git/checkouts/gstreamer-rs-79e52a2d27eb91a3/927cca1/gstreamer/src/subclass/element.rs(386): gstreamer::subclass::element (): /GstPipeline:pipeline0/FallbackSwitch:s:
Panicked
Freeing pipeline ...
The plugin is compiled and installed according to instructions in the README. Any idea what might be going on? Thanks.
Edited by Sebastian Dröge