[GH-ISSUE #182] librespot panicks on one song, but will eventually play it. #124

Closed
opened 2026-02-27 19:28:58 +03:00 by kerem · 5 comments
Owner

Originally created by @cortegedusage on GitHub (Mar 5, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/182

Listening to a playlist I noticed librespot crashing on a certain song.
I can reproduce it everytime, now the strange thing is,
sometimes it will play.

I'm running librespot on volumio2 with the plugin from balbuze.
So when it crashes it restarts when after a crash I select the device again, it wil play...

I got the following error when running librespot from the command line with verbose output.
hope it does make sense.

INFO:librespot::player: Loaded Track "Death Don't Have No Mercy" by Rev. Gary Da vis from Harlem Street Singer (Remastered)
thread '' panicked at 'index out of bounds: the len is 2 but the index is 2', /checkout/src/liballoc/vec.rs:1551:10
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose bac ktrace.
stack backtrace:
0: std::sys::unix::backtrace::tracing:👿:unwind_backtrace
at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::print
at /checkout/src/libstd/sys_common/backtrace.rs:68
at /checkout/src/libstd/sys_common/backtrace.rs:57
2: std::panicking::default_hook::{{closure}}
at /checkout/src/libstd/panicking.rs:381
3: std::panicking::default_hook
at /checkout/src/libstd/panicking.rs:397
4: std::panicking::rust_panic_with_hook
at /checkout/src/libstd/panicking.rs:577
5: std::panicking::begin_panic
at /checkout/src/libstd/panicking.rs:538
6: std::panicking::begin_panic_fmt
at /checkout/src/libstd/panicking.rs:522
7: rust_begin_unwind
at /checkout/src/libstd/panicking.rs:498
8: core::panicking::panic_fmt
at /checkout/src/libcore/panicking.rs:71
9: core::panicking::panic_bounds_check
at /checkout/src/libcore/panicking.rs:58
10: librespot::player::PlayerInternal::handle_command
11: librespot::player::PlayerInternal::run
thread 'main' panicked at 'called Result::unwrap() on an Err value: "SendError(..)"', /checkout/src/libcore/result.rs:916:5
stack backtrace:
0: std::sys::unix::backtrace::tracing:👿:unwind_backtrace
at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::print
at /checkout/src/libstd/sys_common/backtrace.rs:68
at /checkout/src/libstd/sys_common/backtrace.rs:57
2: std::panicking::default_hook::{{closure}}
at /checkout/src/libstd/panicking.rs:381
3: std::panicking::default_hook
at /checkout/src/libstd/panicking.rs:397
4: std::panicking::rust_panic_with_hook
at /checkout/src/libstd/panicking.rs:577
5: std::panicking::begin_panic
at /checkout/src/libstd/panicking.rs:538
6: std::panicking::begin_panic_fmt
at /checkout/src/libstd/panicking.rs:522
7: rust_begin_unwind
at /checkout/src/libstd/panicking.rs:498
8: core::panicking::panic_fmt
at /checkout/src/libcore/panicking.rs:71
9: core::result::unwrap_failed
10: librespot::player::Player::load
11: librespot::spirc::SpircTask::load_track
12: <librespot::spirc::SpircTask as futures::future::Future>::poll
13: <librespot::Main as futures::future::Future>::poll
14: futures::task_impl::std::set
15: <scoped_tls::ScopedKey>::set
16: tokio_core::reactor::Core::run
17: librespot::main
18: std::rt::lang_start::{{closure}}
19: std::panicking::try::do_call
at /checkout/src/libstd/rt.rs:59
at /checkout/src/libstd/panicking.rs:480
20: __rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:101
21: std::rt::lang_start_internal
at /checkout/src/libstd/panicking.rs:459
at /checkout/src/libstd/panic.rs:365
at /checkout/src/libstd/rt.rs:58
22: main
23: __libc_start_main
ERROR:librespot::player: Player thread panicked!

A quick search didn't gave me anyting.
So hope you could help.

many thanks!

Originally created by @cortegedusage on GitHub (Mar 5, 2018). Original GitHub issue: https://github.com/librespot-org/librespot/issues/182 Listening to a playlist I noticed librespot crashing on a certain song. I can reproduce it everytime, now the strange thing is, sometimes it will play. I'm running librespot on volumio2 with the plugin from balbuze. So when it crashes it restarts when after a crash I select the device again, it wil play... I got the following error when running librespot from the command line with verbose output. hope it does make sense. INFO:librespot::player: Loaded Track "Death Don't Have No Mercy" by Rev. Gary Da vis from Harlem Street Singer (Remastered) thread '<unnamed>' panicked at 'index out of bounds: the len is 2 but the index is 2', /checkout/src/liballoc/vec.rs:1551:10 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose bac ktrace. stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: std::sys_common::backtrace::print at /checkout/src/libstd/sys_common/backtrace.rs:68 at /checkout/src/libstd/sys_common/backtrace.rs:57 2: std::panicking::default_hook::{{closure}} at /checkout/src/libstd/panicking.rs:381 3: std::panicking::default_hook at /checkout/src/libstd/panicking.rs:397 4: std::panicking::rust_panic_with_hook at /checkout/src/libstd/panicking.rs:577 5: std::panicking::begin_panic at /checkout/src/libstd/panicking.rs:538 6: std::panicking::begin_panic_fmt at /checkout/src/libstd/panicking.rs:522 7: rust_begin_unwind at /checkout/src/libstd/panicking.rs:498 8: core::panicking::panic_fmt at /checkout/src/libcore/panicking.rs:71 9: core::panicking::panic_bounds_check at /checkout/src/libcore/panicking.rs:58 10: librespot::player::PlayerInternal::handle_command 11: librespot::player::PlayerInternal::run thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', /checkout/src/libcore/result.rs:916:5 stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: std::sys_common::backtrace::print at /checkout/src/libstd/sys_common/backtrace.rs:68 at /checkout/src/libstd/sys_common/backtrace.rs:57 2: std::panicking::default_hook::{{closure}} at /checkout/src/libstd/panicking.rs:381 3: std::panicking::default_hook at /checkout/src/libstd/panicking.rs:397 4: std::panicking::rust_panic_with_hook at /checkout/src/libstd/panicking.rs:577 5: std::panicking::begin_panic at /checkout/src/libstd/panicking.rs:538 6: std::panicking::begin_panic_fmt at /checkout/src/libstd/panicking.rs:522 7: rust_begin_unwind at /checkout/src/libstd/panicking.rs:498 8: core::panicking::panic_fmt at /checkout/src/libcore/panicking.rs:71 9: core::result::unwrap_failed 10: librespot::player::Player::load 11: librespot::spirc::SpircTask::load_track 12: <librespot::spirc::SpircTask as futures::future::Future>::poll 13: <librespot::Main as futures::future::Future>::poll 14: futures::task_impl::std::set 15: <scoped_tls::ScopedKey<T>>::set 16: tokio_core::reactor::Core::run 17: librespot::main 18: std::rt::lang_start::{{closure}} 19: std::panicking::try::do_call at /checkout/src/libstd/rt.rs:59 at /checkout/src/libstd/panicking.rs:480 20: __rust_maybe_catch_panic at /checkout/src/libpanic_unwind/lib.rs:101 21: std::rt::lang_start_internal at /checkout/src/libstd/panicking.rs:459 at /checkout/src/libstd/panic.rs:365 at /checkout/src/libstd/rt.rs:58 22: main 23: __libc_start_main ERROR:librespot::player: Player thread panicked! A quick search didn't gave me anyting. So hope you could help. many thanks!
kerem closed this issue 2026-02-27 19:28:58 +03:00
Author
Owner

@plietar commented on GitHub (Mar 6, 2018):

This seems to be a release build, so functions have been inlined and are missing from the stacktraces.

Could you rebuild librespot in debug mode (just omit the --release argument when calling cargo).

Thanks

<!-- gh-comment-id:370612578 --> @plietar commented on GitHub (Mar 6, 2018): This seems to be a release build, so functions have been inlined and are missing from the stacktraces. Could you rebuild librespot in debug mode (just omit the `--release` argument when calling cargo). Thanks
Author
Owner

@ashthespy commented on GitHub (Mar 6, 2018):

@cortegedusage @plietar
The error is from my additions to get get metadata out via udp for Volumio.

INFO:librespot::player: Loaded Track "Twelve Gates To The City" by Rev. Gary Davis from Harlem Street Singer (Remastered)
thread '<unnamed>' panicked at 'index out of bounds: the len is 2 but the index is 2', /checkout/src/liballoc/vec.rs:1551:10

The error is because this track (7DtrCdyysCDj5BlVKcassv) doesn't have a 600x600 image that I am trying to access (at index 2).

<Snip snip>
    "images" : [ {
      "height" : 300,
      "url" : "https://i.scdn.co/image/d163c004f88829741bd733b373c83f69663e849b",
      "width" : 300
    }, {
      "height" : 64,
      "url" : "https://i.scdn.co/image/cd86c236fdab45be2c40e3542abd5fc1966edd5f",
      "width" : 64
    } ],
    "name" : "Harlem Street Singer (Remastered)",
    "release_date" : "1992",
    "release_date_precision" : "year",
    "type" : "album",
    "uri" : "spotify:album:4IwcZDJileSoKXbfQjyRFB"
  },

Will make it more robust.

<!-- gh-comment-id:370651168 --> @ashthespy commented on GitHub (Mar 6, 2018): @cortegedusage @plietar The error is from my additions to get get metadata out via udp for Volumio. ``` INFO:librespot::player: Loaded Track "Twelve Gates To The City" by Rev. Gary Davis from Harlem Street Singer (Remastered) thread '<unnamed>' panicked at 'index out of bounds: the len is 2 but the index is 2', /checkout/src/liballoc/vec.rs:1551:10 ``` The error is because this track (`7DtrCdyysCDj5BlVKcassv`) doesn't have a `600x600` image that I am trying to access (at index 2). ``` <Snip snip> "images" : [ { "height" : 300, "url" : "https://i.scdn.co/image/d163c004f88829741bd733b373c83f69663e849b", "width" : 300 }, { "height" : 64, "url" : "https://i.scdn.co/image/cd86c236fdab45be2c40e3542abd5fc1966edd5f", "width" : 64 } ], "name" : "Harlem Street Singer (Remastered)", "release_date" : "1992", "release_date_precision" : "year", "type" : "album", "uri" : "spotify:album:4IwcZDJileSoKXbfQjyRFB" }, ``` Will make it more robust.
Author
Owner

@cortegedusage commented on GitHub (Mar 6, 2018):

ah

@plietar I didn't realise the additions from @ashthespy weren't implemented in this repo.
Should I remove this thread?

@ashthespy Thanks for your quick reply. Looking forward for a fix,

and both thanks for your hard work, I'm a heavy user both at home and at work.
cheers

<!-- gh-comment-id:370694580 --> @cortegedusage commented on GitHub (Mar 6, 2018): ah @plietar I didn't realise the additions from @ashthespy weren't implemented in this repo. Should I remove this thread? @ashthespy Thanks for your quick reply. Looking forward for a fix, and both thanks for your hard work, I'm a heavy user both at home and at work. cheers
Author
Owner

@ashthespy commented on GitHub (Mar 6, 2018):

@cortegedusage I'd say yes, close it here, can track the issue either at the volumio plugin repo, or the fork.

<!-- gh-comment-id:370970767 --> @ashthespy commented on GitHub (Mar 6, 2018): @cortegedusage I'd say yes, close it here, can track the issue either at the volumio plugin repo, or the fork.
Author
Owner

@cortegedusage commented on GitHub (Mar 7, 2018):

closing this,
wrong repo.
Will report in volspotconnect2 repo

<!-- gh-comment-id:371055983 --> @cortegedusage commented on GitHub (Mar 7, 2018): closing this, wrong repo. Will report in volspotconnect2 repo
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#124
No description provided.