jazzfool / iced_video_player

Video player component for Iced
Apache License 2.0
128 stars 19 forks source link

Can't run minimal example : panics immediately #2

Closed GTimothy closed 3 years ago

GTimothy commented 3 years ago

Can't run minimal example : panics immediately

I tried running the example provided but it panics immediately with thread 'main' panicked at 'called "Result::unwrap()" on an "Err" value: StateChange(StateChangeError)', examples/minimal.rs:41:18

This error is very cryptic, but I figured it comes from gstreamer directly (gstreamer-0.16.5/src/enums.rs). Does anybody else have the same issue or is it just me ?

Here are the backtraces with RUST_BACKTRACE=1 and RUST_BACKTRACE=full, if it helps :

RUST_BACKTRACE=1

RUST_BACKTRACE=1__cargo__run__--example__minimal.txt
    Finished dev [unoptimized + debuginfo] target(s) in 0.10s
     Running `target/debug/examples/minimal`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: StateChange(StateChangeError)', examples/minimal.rs:41:18
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: core::result::Result<T,E>::unwrap
             at $HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:973:23
   4: <minimal::App as iced::application::Application>::new
             at ./examples/minimal.rs:29:24
   5: <iced::application::Instance<A> as iced_winit::application::Application>::new
             at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/iced-0.1.1/src/application.rs:225:30
   6: iced_winit::application::Application::run::{{closure}}
             at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/iced_winit-0.1.0/src/application.rs:140:30
   7: tokio::runtime::context::enter
             at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.24/src/runtime/context.rs:72:5
   8: tokio::runtime::handle::Handle::enter
             at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.24/src/runtime/handle.rs:76:9
   9: tokio::runtime::Runtime::enter
             at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.24/src/runtime/mod.rs:486:9
  10: <iced::executor::platform::Default as iced_futures::executor::Executor>::enter
             at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/iced-0.1.1/src/executor.rs:43:13
  11: iced_futures::runtime::Runtime<Hasher,Event,Executor,Sender,Message>::enter
             at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/iced_futures-0.1.2/src/runtime.rs:58:9
  12: iced_winit::application::Application::run
             at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/iced_winit-0.1.0/src/application.rs:140:13
  13: iced::application::Application::run
             at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/iced-0.1.1/src/application.rs:201:13
  14: minimal::main
             at ./examples/minimal.rs:7:5
  15: core::ops::function::FnOnce::call_once
             at $HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

RUST_BACKTRACE=full

RUST_BACKTRACE=full cargo run --example minimal
    Finished dev [unoptimized + debuginfo] target(s) in 0.10s
     Running `target/debug/examples/minimal`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: StateChange(StateChangeError)', examples/minimal.rs:41:18
stack backtrace:
   0:     0x55c25856bc50 - std::backtrace_rs::backtrace::libunwind::trace::h04d12fdcddff82aa
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/../../backtrace/src/backtrace/libunwind.rs:100:5
   1:     0x55c25856bc50 - std::backtrace_rs::backtrace::trace_unsynchronized::h1459b974b6fbe5e1
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55c25856bc50 - std::sys_common::backtrace::_print_fmt::h9b8396a669123d95
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x55c25856bc50 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he009dcaaa75eed60
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x55c25858ec0c - core::fmt::write::h77b4746b0dea1dd3
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/fmt/mod.rs:1078:17
   5:     0x55c2585683d2 - std::io::Write::write_fmt::heb7e50902e98831c
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/io/mod.rs:1518:15
   6:     0x55c25856e235 - std::sys_common::backtrace::_print::h2d880c9e69a21be9
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x55c25856e235 - std::sys_common::backtrace::print::h5f02b1bb49f36879
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x55c25856e235 - std::panicking::default_hook::{{closure}}::h658e288a7a809b29
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:208:50
   9:     0x55c25856ded8 - std::panicking::default_hook::hb52d73f0da9a4bb8
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:227:9
  10:     0x55c25856e9d1 - std::panicking::rust_panic_with_hook::hfe7e1c684e3e6462
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:593:17
  11:     0x55c25856e517 - std::panicking::begin_panic_handler::{{closure}}::h42939e004b32765c
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:499:13
  12:     0x55c25856c10c - std::sys_common::backtrace::__rust_end_short_backtrace::h9d2070f7bf9fd56c
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:141:18
  13:     0x55c25856e479 - rust_begin_unwind
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
  14:     0x55c25858c891 - core::panicking::panic_fmt::ha0bb065d9a260792
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
  15:     0x55c25858c6b3 - core::option::expect_none_failed::h7e1dd0a94971eb61
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
  16:     0x55c25787946e - core::result::Result<T,E>::unwrap::h13eda91a4ec4b576
                               at $HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:973:23
  17:     0x55c25784e33a - <minimal::App as iced::application::Application>::new::hc31bf7e3b826933f
                               at $HOME/projects/rust/iced_video_player/examples/minimal.rs:29:24
  18:     0x55c2578dfaf4 - <iced::application::Instance<A> as iced_winit::application::Application>::new::h40f55763aab0fafc
                               at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/iced-0.1.1/src/application.rs:225:30
  19:     0x55c2578bd231 - iced_winit::application::Application::run::{{closure}}::h3572e332bbf1bf05
                               at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/iced_winit-0.1.0/src/application.rs:140:30
  20:     0x55c257855875 - tokio::runtime::context::enter::h62c17da4910f83a1
                               at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.24/src/runtime/context.rs:72:5
  21:     0x55c2578d8122 - tokio::runtime::handle::Handle::enter::hba588674a1e3346b
                               at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.24/src/runtime/handle.rs:76:9
  22:     0x55c25787cc0c - tokio::runtime::Runtime::enter::hd4e3b9d04f79cad7
                               at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.24/src/runtime/mod.rs:486:9
  23:     0x55c25787dd55 - <iced::executor::platform::Default as iced_futures::executor::Executor>::enter::hb79346c49092d39f
                               at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/iced-0.1.1/src/executor.rs:43:13
  24:     0x55c257870985 - iced_futures::runtime::Runtime<Hasher,Event,Executor,Sender,Message>::enter::hcbc7b0f9fb8f58b9
                               at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/iced_futures-0.1.2/src/runtime.rs:58:9
  25:     0x55c2578deac6 - iced_winit::application::Application::run::h0fc28c997ae1c609
                               at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/iced_winit-0.1.0/src/application.rs:140:13
  26:     0x55c2578ed689 - iced::application::Application::run::h3bce76b83a8b7a26
                               at $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/iced-0.1.1/src/application.rs:201:13
  27:     0x55c25784e1b8 - minimal::main::he068a7f08f6ed9d9
                               at $HOME/projects/rust/iced_video_player/examples/minimal.rs:7:5
  28:     0x55c2578f2a2b - core::ops::function::FnOnce::call_once::hd767815048ed947b
                               at $HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5
  29:     0x55c2578e261e - std::sys_common::backtrace::__rust_begin_short_backtrace::h7113b261fe9b9517
                               at $HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:125:18
  30:     0x55c25786ad11 - std::rt::lang_start::{{closure}}::h5b8d10649c563563
                               at $HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:66:18
  31:     0x55c25856eee7 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h57e2a071d427b24c
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/ops/function.rs:259:13
  32:     0x55c25856eee7 - std::panicking::try::do_call::h81cbbe0c3b30a28e
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:381:40
  33:     0x55c25856eee7 - std::panicking::try::hbeeb95b4e1f0a876
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:345:19
  34:     0x55c25856eee7 - std::panic::catch_unwind::h59c48ccb40a0bf20
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panic.rs:396:14
  35:     0x55c25856eee7 - std::rt::lang_start_internal::ha53ab63f88fee728
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/rt.rs:51:25
  36:     0x55c25786ace7 - std::rt::lang_start::hadcca67865f2e6f2
                               at $HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:65:5
  37:     0x55c25784ec6a - main
  38:     0x7fce284000b3 - __libc_start_main
  39:     0x55c25784e0de - _start
  40:                0x0 - <unknown>
GTimothy commented 3 years ago

Nevermind, apparently I hadn't properly installed all of the gstreamer dependencies for gstreamer.rs (I really thought I did though...)!

GTimothy commented 3 years ago

BTW, thanks for this nice work ! :+1: