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

Crash on selecting device #71

Closed
bhelm opened this issue Apr 16, 2016 · 1 comment
Closed

Crash on selecting device #71

bhelm opened this issue Apr 16, 2016 · 1 comment
Labels

Comments

@bhelm
Copy link

bhelm commented Apr 16, 2016

  1. started librespot as headless daemon
  2. started spotify desktop client
  3. selected libresprot device
  4. librespot crashed:
librespot c0f9e40 (2016-03-26). Built on 2016-04-16.
Password: 
Connecting to AP sto3-accesspoint-a72.ap.spotify.com:443
Authenticated !
Using PulseAudioSink
kMessageTypeHello S4 69c195a662b9112a35f65e12d131a5b27SDDf2b 1 1460769391127
kMessageTypeHello rawvm a519a3b3c18e1b76819a38fsssD3dgf77db6e922071 1 0
kMessageTypeNotify S4 69c195a662b9112a35f65e12d131a5b27SDDf2b 2 1460769391127
kMessageTypeHello rawvm a519a3b3c18e1b76819a38fsssD3dgf77db6e922071 2 0
kMessageTypeNotify S4 69c195a662b9112a35f65e12d131a5b27SDDf2b 3 1460769391127
kMessageTypeHello rawvm a519a3b3c18e1b76819a38fsssD3dgf77db6e922071 3 0
kMessageTypeNotify S4 69c195a662b9112a35f65e12d131a5b27SDDf2b 4 1460769391127
kMessageTypeLoad rawvm a519a3b3c18e1b76819a38fsssD3dgf77db6e922071 1 0
thread '<unnamed>' panicked at 'index out of bounds: the len is 0 but the index is 0', src/libcollections/vec.rs:1134
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libcore/result.rs:688
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libcore/result.rs:688
  1. today i have seen rust code the first time, no idea whats going on
  2. if i start a song on the spotify desktop client and THEN select the librespot device, it works like expected.
@sambaum
Copy link

sambaum commented Apr 28, 2016

At the moment I permanently get an error when I try to control librespot from a Windows Spotify instance (librespot itself is running on raspberr). It happens when I click on "DEVICES AVAILABLE", not even choosing the device. (Windows with Spotify 1.0.28.87.g8f9312a4):

librespot ist running and was compiled on Raspberry:
Linux MusicBox 4.1.19+ #858 Tue Mar 15 15:52:03 GMT 2016 armv6l GNU/Linux
rustc 1.10.0-nightly (bd938166d 2016-04-25)
cargo 0.11.0-nightly (6151a85 2016-04-25)

I get this error:

`thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', /buildslave/rust-buildbot/slave/nightly-dist-rustc-cross-host-linux/build/src/libcore/result.rs:785
stack backtrace:
   1: 0x7f7aa133 - std::sys::backtrace::tracing::imp::write::hde19f675ec7fd657
   2: 0x7f7adacf - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::h249242759c36d52a
   3: 0x7f7ad64f - std::panicking::default_hook::h14a84f0f402280a9
   4: 0x7f79b4af - std::sys_common::unwind::begin_unwind_inner::h4f3571dea6eed37d
   5: 0x7f79c6df - std::sys_common::unwind::begin_unwind_fmt::h5801479b38abd6aa
   6: 0x7f7a94b3 - rust_begin_unwind
   7: 0x7f7d6f1f - core::panicking::panic_fmt::h3eeafae3c6ce6d4f
   8: 0x7f69edef - core::result::unwrap_failed::h8a714e6747cb89b5
   9: 0x7f69e403 - librespot::mercury::MercuryManager::complete_request::h6be47c826ea1ea33
  10: 0x7f6a01e3 - _<mercury..MercuryManager as connection..PacketHandler>::handle::h6119052d95172ff2
  11: 0x7f6cbfff - librespot::session::Session::poll::ha7c2b664c9f26a0d
  12: 0x7f62549b - librespot::main::h4c8ffcc1bb2b23f0
  13: 0x7f7ad20b - std::sys_common::unwind::try::try_fn::h76efc8ed010787e5
  14: 0x7f7a944b - __rust_try
  15: 0x7f7acc3b - std::rt::lang_start::h73c48c6a9af036ed
  16: 0xb6d6581b - __libc_start_main`

If I'm controlling librespot with the Linux version of Spotify (Spotify version 1.0.25.127.g58007b4c), I get a different behavior. In this case it works fine if music is playing, but not if there is no music playing. It gives this error when I switch from librespot to local (but does not completely crash):

`thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Stream is stopped', /buildslave/rust-buildbot/slave/nightly-dist-rustc-cross-host-linux/build/src/libcore/result.rs:785
stack backtrace:
   1: 0x7f70d133 - std::sys::backtrace::tracing::imp::write::hde19f675ec7fd657
   2: 0x7f710acf - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::h249242759c36d52a
   3: 0x7f71064f - std::panicking::default_hook::h14a84f0f402280a9
   4: 0x7f6fe4af - std::sys_common::unwind::begin_unwind_inner::h4f3571dea6eed37d
   5: 0x7f6ff6df - std::sys_common::unwind::begin_unwind_fmt::h5801479b38abd6aa
   6: 0x7f70c4b3 - rust_begin_unwind
   7: 0x7f739f1f - core::panicking::panic_fmt::h3eeafae3c6ce6d4f
   8: 0x7f5f1587 - core::result::unwrap_failed::h30991e0e10c87ef7
   9: 0x7f5f19f7 - _<audio_backend..portaudio..PortAudioSink<'a> as audio_backend..Sink>::stop::h077cdc250aad581a
  10: 0x7f60b7cb - librespot::player::PlayerInternal::run::h3fc386e9ba030a89
  11: 0x7f652d97 - std::sys_common::unwind::try::try_fn::hb2f76b2db5224ef0
  12: 0x7f70c44b - __rust_try
  13: 0x7f70c3d3 - std::sys_common::unwind::inner_try::h012db03be6c2ef95
  14: 0x7f65371f - _<F asDEBUG:librespot::spirc: kMessageTypeNotify "MusicBox" 34aee17358367ce034fe6896a117955318021821 6 1461880285027
 std..boxed..FnBox<A>>::call_box::h3e60553acb5559ed
  15: 0x7f70f0af - std::sys::thread::Thread::new::thread_start::h9ea133c9dadd9d86
Stream drop error: PortAudio not initialized
DEBUG:librespot::spirc: kMessageTypeNotify "sam-ThinkPad-X250" 2d5fab191b27ea7635110f0d568e08a5a8407ee0 11 1461880283972`

When I switch again from local to librespot, it completely terminates:

`thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', /buildslave/rust-buildbot/slave/nightly-dist-rustc-cross-host-linux/build/src/libcore/result.rs:785
stack backtrace:
   1: 0x7f70d133 - std::sys::backtrace::tracing::imp::write::hde19f675ec7fd657
   2: 0x7f710acf - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::h249242759c36d52a
   3: 0x7f71064f - std::panicking::default_hook::h14a84f0f402280a9
   4: 0x7f6fe4af - std::sys_common::unwind::begin_unwind_inner::h4f3571dea6eed37d
   5: 0x7f6ff6df - std::sys_common::unwind::begin_unwind_fmt::h5801479b38abd6aa
   6: 0x7f70c4b3 - rust_begin_unwind
   7: 0x7f739f1f - core::panicking::panic_fmt::h3eeafae3c6ce6d4f
   8: 0x7f6082db - core::result::unwrap_failed::hf67ed130655eb884
   9: 0x7f607f5b - librespot::player::Player::command::hb73efb782a0b86b7
  10: 0x7f640627 - librespot::spirc::SpircManager::run::h915a765a6c3ffa25
  11: 0x7f5923bf - std::sys_common::unwind::try::try_fn::h34d73c3d1c0d30d3
  12: 0x7f70c44b - __rust_try
  13: 0x7f70c3d3 - std::sys_common::unwind::inner_try::h012db03be6c2ef95
  14: 0x7f59269f - _<F as std..boxed..FnBox<A>>::call_box::h507526a50646619a
  15: 0x7f70f0af - std::sys::thread::Thread::new::thread_start::h9ea133c9dadd9d86
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', /buildslave/rust-buildbot/slave/nightly-dist-rustc-cross-host-linux/build/src/libcore/result.rs:785
stack backtrace:
   1: 0x7f70d133 - std::sys::backtrace::tracing::imp::write::hde19f675ec7fd657
   2: 0x7f710acf - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::h249242759c36d52a
   3: 0x7f71064f - std::panicking::default_hook::h14a84f0f402280a9
   4: 0x7f6fe4af - std::sys_common::unwind::begin_unwind_inner::h4f3571dea6eed37d
   5: 0x7f6ff6df - std::sys_common::unwind::begin_unwind_fmt::h5801479b38abd6aa
   6: 0x7f70c4b3 - rust_begin_unwind
   7: 0x7f739f1f - core::panicking::panic_fmt::h3eeafae3c6ce6d4f
   8: 0x7f601def - core::result::unwrap_failed::h8a714e6747cb89b5
   9: 0x7f601403 - librespot::mercury::MercuryManager::complete_request::h6be47c826ea1ea33
  10: 0x7f6031e3 - _<mercury..MercuryManager as connection..PacketHandler>::handle::h6119052d95172ff2
  11: 0x7f62efff - librespot::session::Session::poll::ha7c2b664c9f26a0d
  12: 0x7f58849b - librespot::main::h4c8ffcc1bb2b23f0
  13: 0x7f71020b - std::sys_common::unwind::try::try_fn::h76efc8ed010787e5
  14: 0x7f70c44b - __rust_try
  15: 0x7f70fc3b - std::rt::lang_start::h73c48c6a9af036ed
  16: 0xb6ddb81b - __libc_start_main`

@plietar plietar added the bug label May 7, 2016
joerg-krause added a commit to joerg-krause/librespot that referenced this issue Aug 23, 2016
Selecting a librespot device with the Spotify desktop client causes a
crash if the playlist is empty.

Take into account the case where an empty list of tracks is received. In
this case notify the desktop client, so it will accept the device and
turn the status bar green.

Closes: plietar#71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants