Closed saivert closed 1 year ago
The recently added MetadataExt::connect_changed crashes. Some of the values can be null.
MetadataExt::connect_changed
thread 'main' panicked at 'assertion failed: !ptr.is_null()', /home/saivert/Projects/pwvucontrol/builddir/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/glib-0.18.1/src/gstring.rs:1973:9 stack backtrace: 0: rust_begin_unwind 1: core::panicking::panic_fmt 2: core::panicking::panic 3: <glib::gstring::GString as glib::translate::FromGlibPtrBorrow<*const u8>>::from_glib_borrow at /home/saivert/Projects/pwvucontrol/builddir/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/glib-0.18.1/src/gstring.rs:1973:9 4: glib::translate::from_glib_borrow at /home/saivert/Projects/pwvucontrol/builddir/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/glib-0.18.1/src/translate.rs:1640:5 5: <glib::gstring::GString as glib::translate::FromGlibPtrBorrow<*mut i8>>::from_glib_borrow at /home/saivert/Projects/pwvucontrol/builddir/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/glib-0.18.1/src/gstring.rs:2005:9 6: wireplumber::auto::metadata::MetadataExt::connect_changed::changed_trampoline at /home/saivert/Projects/pwvucontrol/builddir/cargo-home/git/checkouts/wireplumber.rs-cb0425781db64edb/0516ee9/src/auto/metadata.rs:74:76 7: <unknown> 8: <unknown> 9: ffi_call 10: g_cclosure_marshal_generic 11: g_closure_invoke 12: <unknown> 13: g_signal_emit_valist 14: g_signal_emit 15: <unknown> 16: <unknown> 17: <unknown> 18: <unknown> 19: <unknown> 20: <unknown> 21: g_main_context_dispatch 22: <unknown> 23: g_main_context_iteration 24: g_application_run 25: gio::application::ApplicationExtManual::run_with_args at /home/saivert/Projects/pwvucontrol/builddir/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/gio-0.18.1/src/application.rs:29:13 26: gio::application::ApplicationExtManual::run at /home/saivert/Projects/pwvucontrol/builddir/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/gio-0.18.1/src/application.rs:22:9 27: pwvucontrol::main at /home/saivert/Projects/pwvucontrol/src/main.rs:117:5 28: core::ops::function::FnOnce::call_once at /builddir/build/BUILD/rustc-1.71.0-src/library/core/src/ops/function.rs:250:5 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Safer to use the more generic metadata.connect_local("changed"...) function for now.
metadata.connect_local("changed"...)
Yeah those argument types definitely needed to be Option<String>s, since it also triggers when a value is removed. Thanks for the bug report, this should be fixed now!
Option<String>
The recently added
MetadataExt::connect_changed
crashes. Some of the values can be null.Safer to use the more generic
metadata.connect_local("changed"...)
function for now.