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

bbb-core seems to panic if PortAudio can't find a default output device #1

Closed
isislovecruft opened this issue Mar 12, 2019 · 1 comment

Comments

@isislovecruft
Copy link

∃!isisⒶwintermute:(master=)~/code/rust/bbb-cli ∴ RUST_BACKTRACE=1 bbb-cli repl
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:345:21
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:70
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:58
             at src/libstd/panicking.rs:200
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:215
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:385
   6: rust_begin_unwind
             at src/libstd/panicking.rs:312
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   8: core::panicking::panic
             at src/libcore/panicking.rs:49
   9: portaudio::PortAudio::default_output_device
  10: bbb_core::player::Player::new
  11: bbb_cli::interpreter::interpret
  12: bbb_cli::main
  13: std::rt::lang_start::{{closure}}
  14: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:297
  15: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:92
  16: std::rt::lang_start_internal
             at src/libstd/panicking.rs:276
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  17: main
  18: __libc_start_main
  19: <unknown>
@clarkenciel
Copy link
Owner

Oh wow! Sorry you had to find this. It looks like the underlying issue is still open over on rust-portaudio, but since I have no idea when the fix will get merged in, I'll wrap my usage in catch_unwind.

Thanks for letting me know!

clarkenciel added a commit that referenced this issue Mar 16, 2019
clarkenciel added a commit that referenced this issue Mar 16, 2019
Fix #1 by handling PA panic when default audio device cannot be found
clarkenciel added a commit to clarkenciel/bbb-cli that referenced this issue Mar 16, 2019
Pull fix for clarkenciel/bbb-core#1 to avoid unhandled PA panics
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

2 participants