minimal program panics
A minimal program consisting of:
extern crate mpris_player;
use mpris_player::MprisPlayer;
fn main() {
let _p = MprisPlayer::new("mtest".to_string(), "mtest".to_string(), "mtest".to_string());
}
fails with:
$ RUST_BACKTRACE=1 cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
Running `target/debug/mpris`
thread 'main' panicked at 'assertion failed: MainContext::default().is_owner()', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.10.3/src/source.rs:236:9
stack backtrace:
0: rust_begin_unwind
at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/panicking.rs:493:5
1: core::panicking::panic_fmt
at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/panicking.rs:92:14
2: core::panicking::panic
at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/panicking.rs:50:5
3: glib::source::timeout_add_local
at /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.10.3/src/source.rs:236:9
4: mpris_player::mpris_player::MprisPlayer::new
at /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mpris-player-0.6.1/src/mpris_player.rs:163:9
5: mpris::main
at ./src/main.rs:6:14
6: core::ops::function::FnOnce::call_once
at /home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5