[GH-ISSUE #267] librespot/raspotify crashes frequently #180

Closed
opened 2026-02-27 19:29:15 +03:00 by kerem · 26 comments
Owner

Originally created by @karvec on GitHub (Nov 18, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/267

Sometimes will play a few songs, sometimes doesn't play any songs. Not sure I can provide any more useful information other than log.

Also, using a cache on an external hard drive. Previous versions did crash occasionally but not as often.

librespotlog.txt

Originally created by @karvec on GitHub (Nov 18, 2018). Original GitHub issue: https://github.com/librespot-org/librespot/issues/267 Sometimes will play a few songs, sometimes doesn't play any songs. Not sure I can provide any more useful information other than log. Also, using a cache on an external hard drive. Previous versions did crash occasionally but not as often. [librespotlog.txt](https://github.com/librespot-org/librespot/files/2593182/librespotlog.txt)
kerem closed this issue 2026-02-27 19:29:16 +03:00
Author
Owner

@ashthespy commented on GitHub (Nov 19, 2018):

Can you provide the specific track from your playlist that makes it crash?
Is it a local track by any chance?

Relevant log lines:

Nov 18 14:09:25 localhost6 librespot[3870]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: SpotifyIdError', libcore/result.
Nov 18 14:09:25 localhost6 librespot[3870]:    9:   0x5819ab - librespot_connect::spirc::SpircTask::load_track::hcfe01ac79fefaa51
Nov 18 14:09:25 localhost6 librespot[3870]:   10:   0x580d87 - librespot_connect::spirc::SpircTask::handle_next::h4ab6ddf5021c8315
<!-- gh-comment-id:439847770 --> @ashthespy commented on GitHub (Nov 19, 2018): Can you provide the specific track from your playlist that makes it crash? Is it a local track by any chance? Relevant log lines: ``` Nov 18 14:09:25 localhost6 librespot[3870]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: SpotifyIdError', libcore/result. Nov 18 14:09:25 localhost6 librespot[3870]: 9: 0x5819ab - librespot_connect::spirc::SpircTask::load_track::hcfe01ac79fefaa51 Nov 18 14:09:25 localhost6 librespot[3870]: 10: 0x580d87 - librespot_connect::spirc::SpircTask::handle_next::h4ab6ddf5021c8315 ```
Author
Owner

@karvec commented on GitHub (Nov 19, 2018):

All of the tracks are local, I have about 14 GB cached and it happens on
various playlists.

On Mon, Nov 19, 2018, 4:37 AM Ash notifications@github.com wrote:

Can you provide the specific track from your playlist that makes it crash?
Is it a local track by any chance?

Relevant log lines:

Nov 18 14:09:25 localhost6 librespot[3870]: thread 'main' panicked at 'called Result::unwrap() on an Err value: SpotifyIdError', libcore/result.
Nov 18 14:09:25 localhost6 librespot[3870]: 9: 0x5819ab - librespot_connect::spirc::SpircTask::load_track::hcfe01ac79fefaa51
Nov 18 14:09:25 localhost6 librespot[3870]: 10: 0x580d87 - librespot_connect::spirc::SpircTask::handle_next::h4ab6ddf5021c8315


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/librespot-org/librespot/issues/267#issuecomment-439847770,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AES90u_pWYQWQbwWv7zBauUdosfHU1y9ks5uwon_gaJpZM4YoHpi
.

<!-- gh-comment-id:439923713 --> @karvec commented on GitHub (Nov 19, 2018): All of the tracks are local, I have about 14 GB cached and it happens on various playlists. On Mon, Nov 19, 2018, 4:37 AM Ash <notifications@github.com> wrote: > Can you provide the specific track from your playlist that makes it crash? > Is it a local track by any chance? > > Relevant log lines: > > Nov 18 14:09:25 localhost6 librespot[3870]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: SpotifyIdError', libcore/result. > Nov 18 14:09:25 localhost6 librespot[3870]: 9: 0x5819ab - librespot_connect::spirc::SpircTask::load_track::hcfe01ac79fefaa51 > Nov 18 14:09:25 localhost6 librespot[3870]: 10: 0x580d87 - librespot_connect::spirc::SpircTask::handle_next::h4ab6ddf5021c8315 > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/librespot-org/librespot/issues/267#issuecomment-439847770>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AES90u_pWYQWQbwWv7zBauUdosfHU1y9ks5uwon_gaJpZM4YoHpi> > . >
Author
Owner

@ashthespy commented on GitHub (Nov 19, 2018):

@karvec I meant if it's non Spotify local track - but if you can provide more steps to replicate, people here can test with the same tracks to see if we can reproduce the issue.

<!-- gh-comment-id:440036189 --> @ashthespy commented on GitHub (Nov 19, 2018): @karvec I meant if it's non Spotify local track - but if you can provide more steps to replicate, people here can test with the same tracks to see if we can reproduce the issue.
Author
Owner

@karvec commented on GitHub (Nov 20, 2018):

It was Spotify locally cached tracks. They are dumped into a directory on an external drive I have that is partitioned to ext4. I have since cleared my cache (was increasing bitrate) and will pursue this further if the issue manages to reproduce itself. So far playing non-local Spotify tracks (before they hit cache) does not seem to be causing issues. I am inclined to believe it was a permissions issue as the files had different owner and rwx permissions from when I was attempting to configure another piece of software.

<!-- gh-comment-id:440097479 --> @karvec commented on GitHub (Nov 20, 2018): It was Spotify locally cached tracks. They are dumped into a directory on an external drive I have that is partitioned to ext4. I have since cleared my cache (was increasing bitrate) and will pursue this further if the issue manages to reproduce itself. So far playing non-local Spotify tracks (before they hit cache) does not seem to be causing issues. I am inclined to believe it was a permissions issue as the files had different owner and rwx permissions from when I was attempting to configure another piece of software.
Author
Owner

@karvec commented on GitHub (Nov 23, 2018):

Nov 23 12:17:32 localhost6 librespot[1240]: INFO:librespot_playback::player: Loading track "Infinite (feat. Anna Yvette)" with Spotify URI "spotify:track:27gvlSwWEjG3VHM7qRrWwA"
Nov 23 12:17:35 localhost6 librespot[1240]: INFO:librespot_playback::player: Track "Infinite (feat. Anna Yvette)" loaded
Nov 23 12:22:02 localhost6 librespot[1240]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: SpotifyIdError', libcore/result.rs:1009:5
Nov 23 12:22:02 localhost6 librespot[1240]: stack backtrace:
Nov 23 12:22:03 localhost6 librespot[1240]:    0:   0x916bf7 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h63a67ac893ab31ec
Nov 23 12:22:03 localhost6 librespot[1240]:                        at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
Nov 23 12:22:03 localhost6 librespot[1240]:    1:   0x905b3b - std::sys_common::backtrace::print::ha8f26509b9ff262c
Nov 23 12:22:03 localhost6 librespot[1240]:                        at libstd/sys_common/backtrace.rs:71
Nov 23 12:22:03 localhost6 librespot[1240]:                        at libstd/sys_common/backtrace.rs:59
Nov 23 12:22:03 localhost6 librespot[1240]:    2:   0x9033b3 - std::panicking::default_hook::{{closure}}::hd7e08be4e57c3548
Nov 23 12:22:03 localhost6 librespot[1240]:                        at libstd/panicking.rs:211
Nov 23 12:22:03 localhost6 librespot[1240]:    3:   0x903013 - std::panicking::default_hook::h216d888df769ef77
Nov 23 12:22:03 localhost6 librespot[1240]:                        at libstd/panicking.rs:227
Nov 23 12:22:03 localhost6 librespot[1240]:    4:   0x903adb - std::panicking::rust_panic_with_hook::h7d39a7695d8da98f
Nov 23 12:22:03 localhost6 librespot[1240]:                        at libstd/panicking.rs:477
Nov 23 12:22:03 localhost6 librespot[1240]:    5:   0x90369f - std::panicking::continue_panic_fmt::ha287897123d4a956
Nov 23 12:22:03 localhost6 librespot[1240]:                        at libstd/panicking.rs:391
Nov 23 12:22:03 localhost6 librespot[1240]:    6:   0x903587 - rust_begin_unwind
Nov 23 12:22:03 localhost6 librespot[1240]:                        at libstd/panicking.rs:326
Nov 23 12:22:03 localhost6 librespot[1240]:    7:   0x967a9b - core::panicking::panic_fmt::h2155aa66b67fe83c
Nov 23 12:22:03 localhost6 librespot[1240]:                        at libcore/panicking.rs:77
Nov 23 12:22:03 localhost6 librespot[1240]:    8:   0x4f709f - core::result::unwrap_failed::h861cfde67f755aa4
Nov 23 12:22:03 localhost6 librespot[1240]:    9:   0x4e59ab - librespot_connect::spirc::SpircTask::load_track::hcfe01ac79fefaa51
Nov 23 12:22:03 localhost6 librespot[1240]:   10:   0x4e4d87 - librespot_connect::spirc::SpircTask::handle_next::h4ab6ddf5021c8315
Nov 23 12:22:03 localhost6 librespot[1240]:   11:   0x4e4833 - <librespot_connect::spirc::SpircTask as futures::future::Future>::poll::h6a6ff5e1ee2fd0c1
Nov 23 12:22:03 localhost6 librespot[1240]:   12:   0x4b9133 - <librespot::Main as futures::future::Future>::poll::h3db72e6cc182213f
Nov 23 12:22:03 localhost6 librespot[1240]:   13:   0x493bbf - futures::task_impl::std::set::h7c382029013f638f
Nov 23 12:22:03 localhost6 librespot[1240]:   14:   0x4b1be3 - <futures::future::lazy::Lazy<F, R> as futures::future::Future>::poll::h339c16cdcdc8d2bf
Nov 23 12:22:03 localhost6 librespot[1240]:   15:   0x4938af - futures::task_impl::std::set::h035c704851db453e
Nov 23 12:22:03 localhost6 librespot[1240]:   16:   0x49a93b - <std::thread::local::LocalKey<T>>::with::h1726d6c9dbd47ab3
Nov 23 12:22:03 localhost6 librespot[1240]:   17:   0x4b0e1f - <tokio::executor::current_thread::Entered<'a, P>>::block_on::h11c540a03761c4aa
Nov 23 12:22:03 localhost6 librespot[1240]:   18:   0x49aef7 - <std::thread::local::LocalKey<T>>::with::h5cfa747dd1304813
Nov 23 12:22:03 localhost6 librespot[1240]:   19:   0x49aa67 - <std::thread::local::LocalKey<T>>::with::h31d282700fc02d1b
Nov 23 12:22:03 localhost6 librespot[1240]:   20:   0x49aca3 - <std::thread::local::LocalKey<T>>::with::h41159fec93afe179
Nov 23 12:22:03 localhost6 librespot[1240]:   21:   0x49bb83 - <scoped_tls::ScopedKey<T>>::set::h9677cf0748583291
Nov 23 12:22:03 localhost6 librespot[1240]:   22:   0x4ad8df - tokio_core::reactor::Core::run::hf1b7213e939ae7d9
Nov 23 12:22:03 localhost6 librespot[1240]:   23:   0x4bb207 - librespot::main::hffab8cbb1bfad5ce
Nov 23 12:22:03 localhost6 librespot[1240]:   24:   0x4ae1df - std::rt::lang_start::{{closure}}::h7734a4273cdf8ce1
Nov 23 12:22:03 localhost6 librespot[1240]:   25:   0x9034ff - std::panicking::try::do_call::he4497885895661a8
Nov 23 12:22:03 localhost6 librespot[1240]:                        at libstd/rt.rs:59

Still random crashes, usually cached tracks.

<!-- gh-comment-id:441318134 --> @karvec commented on GitHub (Nov 23, 2018): ``` Nov 23 12:17:32 localhost6 librespot[1240]: INFO:librespot_playback::player: Loading track "Infinite (feat. Anna Yvette)" with Spotify URI "spotify:track:27gvlSwWEjG3VHM7qRrWwA" Nov 23 12:17:35 localhost6 librespot[1240]: INFO:librespot_playback::player: Track "Infinite (feat. Anna Yvette)" loaded Nov 23 12:22:02 localhost6 librespot[1240]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: SpotifyIdError', libcore/result.rs:1009:5 Nov 23 12:22:02 localhost6 librespot[1240]: stack backtrace: Nov 23 12:22:03 localhost6 librespot[1240]: 0: 0x916bf7 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h63a67ac893ab31ec Nov 23 12:22:03 localhost6 librespot[1240]: at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 Nov 23 12:22:03 localhost6 librespot[1240]: 1: 0x905b3b - std::sys_common::backtrace::print::ha8f26509b9ff262c Nov 23 12:22:03 localhost6 librespot[1240]: at libstd/sys_common/backtrace.rs:71 Nov 23 12:22:03 localhost6 librespot[1240]: at libstd/sys_common/backtrace.rs:59 Nov 23 12:22:03 localhost6 librespot[1240]: 2: 0x9033b3 - std::panicking::default_hook::{{closure}}::hd7e08be4e57c3548 Nov 23 12:22:03 localhost6 librespot[1240]: at libstd/panicking.rs:211 Nov 23 12:22:03 localhost6 librespot[1240]: 3: 0x903013 - std::panicking::default_hook::h216d888df769ef77 Nov 23 12:22:03 localhost6 librespot[1240]: at libstd/panicking.rs:227 Nov 23 12:22:03 localhost6 librespot[1240]: 4: 0x903adb - std::panicking::rust_panic_with_hook::h7d39a7695d8da98f Nov 23 12:22:03 localhost6 librespot[1240]: at libstd/panicking.rs:477 Nov 23 12:22:03 localhost6 librespot[1240]: 5: 0x90369f - std::panicking::continue_panic_fmt::ha287897123d4a956 Nov 23 12:22:03 localhost6 librespot[1240]: at libstd/panicking.rs:391 Nov 23 12:22:03 localhost6 librespot[1240]: 6: 0x903587 - rust_begin_unwind Nov 23 12:22:03 localhost6 librespot[1240]: at libstd/panicking.rs:326 Nov 23 12:22:03 localhost6 librespot[1240]: 7: 0x967a9b - core::panicking::panic_fmt::h2155aa66b67fe83c Nov 23 12:22:03 localhost6 librespot[1240]: at libcore/panicking.rs:77 Nov 23 12:22:03 localhost6 librespot[1240]: 8: 0x4f709f - core::result::unwrap_failed::h861cfde67f755aa4 Nov 23 12:22:03 localhost6 librespot[1240]: 9: 0x4e59ab - librespot_connect::spirc::SpircTask::load_track::hcfe01ac79fefaa51 Nov 23 12:22:03 localhost6 librespot[1240]: 10: 0x4e4d87 - librespot_connect::spirc::SpircTask::handle_next::h4ab6ddf5021c8315 Nov 23 12:22:03 localhost6 librespot[1240]: 11: 0x4e4833 - <librespot_connect::spirc::SpircTask as futures::future::Future>::poll::h6a6ff5e1ee2fd0c1 Nov 23 12:22:03 localhost6 librespot[1240]: 12: 0x4b9133 - <librespot::Main as futures::future::Future>::poll::h3db72e6cc182213f Nov 23 12:22:03 localhost6 librespot[1240]: 13: 0x493bbf - futures::task_impl::std::set::h7c382029013f638f Nov 23 12:22:03 localhost6 librespot[1240]: 14: 0x4b1be3 - <futures::future::lazy::Lazy<F, R> as futures::future::Future>::poll::h339c16cdcdc8d2bf Nov 23 12:22:03 localhost6 librespot[1240]: 15: 0x4938af - futures::task_impl::std::set::h035c704851db453e Nov 23 12:22:03 localhost6 librespot[1240]: 16: 0x49a93b - <std::thread::local::LocalKey<T>>::with::h1726d6c9dbd47ab3 Nov 23 12:22:03 localhost6 librespot[1240]: 17: 0x4b0e1f - <tokio::executor::current_thread::Entered<'a, P>>::block_on::h11c540a03761c4aa Nov 23 12:22:03 localhost6 librespot[1240]: 18: 0x49aef7 - <std::thread::local::LocalKey<T>>::with::h5cfa747dd1304813 Nov 23 12:22:03 localhost6 librespot[1240]: 19: 0x49aa67 - <std::thread::local::LocalKey<T>>::with::h31d282700fc02d1b Nov 23 12:22:03 localhost6 librespot[1240]: 20: 0x49aca3 - <std::thread::local::LocalKey<T>>::with::h41159fec93afe179 Nov 23 12:22:03 localhost6 librespot[1240]: 21: 0x49bb83 - <scoped_tls::ScopedKey<T>>::set::h9677cf0748583291 Nov 23 12:22:03 localhost6 librespot[1240]: 22: 0x4ad8df - tokio_core::reactor::Core::run::hf1b7213e939ae7d9 Nov 23 12:22:03 localhost6 librespot[1240]: 23: 0x4bb207 - librespot::main::hffab8cbb1bfad5ce Nov 23 12:22:03 localhost6 librespot[1240]: 24: 0x4ae1df - std::rt::lang_start::{{closure}}::h7734a4273cdf8ce1 Nov 23 12:22:03 localhost6 librespot[1240]: 25: 0x9034ff - std::panicking::try::do_call::he4497885895661a8 Nov 23 12:22:03 localhost6 librespot[1240]: at libstd/rt.rs:59 ``` Still random crashes, usually cached tracks.
Author
Owner

@kingosticks commented on GitHub (Nov 23, 2018):

Usually? So if you disable the cache you still get this?

<!-- gh-comment-id:441330225 --> @kingosticks commented on GitHub (Nov 23, 2018): Usually? So if you disable the cache you still get this?
Author
Owner

@karvec commented on GitHub (Nov 27, 2018):

I don't know, how can I tell if it is a cached track. It fails before showing me track name/cached information, i.e. last log "Infinite" played fine and then it failed moving to next song. I would prefer not disabling cache due to bandwidth constraints.

<!-- gh-comment-id:441851192 --> @karvec commented on GitHub (Nov 27, 2018): I don't know, how can I tell if it is a cached track. It fails before showing me track name/cached information, i.e. last log "Infinite" played fine and then it failed moving to next song. I would prefer not disabling cache due to bandwidth constraints.
Author
Owner

@kingosticks commented on GitHub (Nov 27, 2018):

Move/delete your existing cache and then run librespot without caching enabled. Then nothing will be cached.

<!-- gh-comment-id:441855610 --> @kingosticks commented on GitHub (Nov 27, 2018): Move/delete your existing cache and then run librespot without caching enabled. Then nothing will be cached.
Author
Owner

@karvec commented on GitHub (Nov 29, 2018):

Does not seem to crash on uncached tracks. However, have not listened to music as much the last 2 days.

What does this mean for me? I will be unable to cache tracks & consume more bandwidth?

<!-- gh-comment-id:442666447 --> @karvec commented on GitHub (Nov 29, 2018): Does not seem to crash on uncached tracks. However, have not listened to music as much the last 2 days. What does this mean for me? I will be unable to cache tracks & consume more bandwidth?
Author
Owner

@kingosticks commented on GitHub (Nov 29, 2018):

I'm purely trying to narrow down the problem so that we might fix it.

<!-- gh-comment-id:442760904 --> @kingosticks commented on GitHub (Nov 29, 2018): I'm purely trying to narrow down the problem so that we might fix it.
Author
Owner

@ashthespy commented on GitHub (Nov 29, 2018):

@karvec your stack trace seems to indicate the playlist list contains a track that doesn't have a valid gid for some reason:
github.com/librespot-org/librespot@d2cadec419/connect/src/spirc.rs (L696-L697)

If you can add a few debug lines and recompile - it might help track down the issue. Could be as simple as:

        let track = {
            let gid = self.state.get_track()[index as usize].get_gid();
            debug!("gid: {:?}", gid);
            SpotifyId::from_raw(gid).unwrap()
        };
<!-- gh-comment-id:442771112 --> @ashthespy commented on GitHub (Nov 29, 2018): @karvec your stack trace seems to indicate the playlist list contains a track that doesn't have a valid `gid` for some reason: https://github.com/librespot-org/librespot/blob/d2cadec4190a44572b1d5d5daed4f0eda1c2b921/connect/src/spirc.rs#L696-L697 If you can add a few debug lines and recompile - it might help track down the issue. Could be as simple as: ```rust let track = { let gid = self.state.get_track()[index as usize].get_gid(); debug!("gid: {:?}", gid); SpotifyId::from_raw(gid).unwrap() }; ```
Author
Owner

@karvec commented on GitHub (Nov 30, 2018):

I am getting "invalid backend" after compiling and running. I am running it on a raspberry pi. Do I need different dependencies or compile instructions? I have tried using both alsa and leaving the line commented out in /etc/default/raspotify

<!-- gh-comment-id:443073323 --> @karvec commented on GitHub (Nov 30, 2018): I am getting "invalid backend" after compiling and running. I am running it on a raspberry pi. Do I need different dependencies or compile instructions? I have tried using both alsa and leaving the line commented out in /etc/default/raspotify
Author
Owner

@ashthespy commented on GitHub (Nov 30, 2018):

Haven't used raspotify - but for librespot on the pi - https://github.com/librespot-org/librespot/wiki/Cross-compiling

<!-- gh-comment-id:443191733 --> @ashthespy commented on GitHub (Nov 30, 2018): Haven't used raspotify - but for librespot on the pi - https://github.com/librespot-org/librespot/wiki/Cross-compiling
Author
Owner

@sashahilton00 commented on GitHub (Jan 4, 2019):

Assuming this has been resolved or OP moved on. Leaving for a few days, then will close.

<!-- gh-comment-id:451573924 --> @sashahilton00 commented on GitHub (Jan 4, 2019): Assuming this has been resolved or OP moved on. Leaving for a few days, then will close.
Author
Owner

@meiseGit commented on GitHub (Feb 23, 2019):

Hi, I'm having the same problem.
This is my journalctl:
Feb 23 10:12:54 raspberrypi librespot[3560]: 29: 0x76d5c677 - __libc_start_main Feb 23 10:12:54 raspberrypi librespot[3560]: 28: 0x4a2e03 - main Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/rt.rs:58 Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/panic.rs:398 Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/panicking.rs:289 Feb 23 10:12:54 raspberrypi librespot[3560]: 27: 0x8f85db - std::rt::lang_start_internal::h7b3bd8c78881c37d Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libpanic_unwind/lib.rs:102 Feb 23 10:12:54 raspberrypi librespot[3560]: 26: 0x906ed3 - __rust_maybe_catch_panic Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/panicking.rs:310 Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/rt.rs:59 Feb 23 10:12:54 raspberrypi librespot[3560]: 25: 0x8f7c37 - std::panicking::try::do_call::hf93a787b72e1d226 Feb 23 10:12:54 raspberrypi librespot[3560]: 24: 0x4a34c7 - std::rt::lang_start::{{closure}}::h917dfa7921b791c5 Feb 23 10:12:54 raspberrypi librespot[3560]: 23: 0x4a217b - librespot::main::hc31f7002e8482814 Feb 23 10:12:54 raspberrypi librespot[3560]: 22: 0x494fe3 - tokio_core::reactor::Core::run::h99194d5dbb8bd9d4 Feb 23 10:12:54 raspberrypi librespot[3560]: 21: 0x487213 - <scoped_tls::ScopedKey<T>>::set::h73d4acd45c44520c Feb 23 10:12:54 raspberrypi librespot[3560]: 20: 0x487c6b - <std::thread::local::LocalKey<T>>::with::hc5f23be319d4df2a Feb 23 10:12:54 raspberrypi librespot[3560]: 19: 0x4876d3 - <std::thread::local::LocalKey<T>>::with::h29c22fa99619602e Feb 23 10:12:54 raspberrypi librespot[3560]: 18: 0x4879eb - <std::thread::local::LocalKey<T>>::with::h609051ccff55f1aa Feb 23 10:12:54 raspberrypi librespot[3560]: 17: 0x48d3ef - <tokio::executor::current_thread::Entered<'a, P>>::block_on::h24fda3b0e84ce8d3 Feb 23 10:12:54 raspberrypi librespot[3560]: 16: 0x4875ab - <std::thread::local::LocalKey<T>>::with::h01c83e94e15802ce Feb 23 10:12:54 raspberrypi librespot[3560]: 15: 0x4a72df - futures::task_impl::std::set::hfe2c0ccaf2bdb22f Feb 23 10:12:54 raspberrypi librespot[3560]: 14: 0x499f8b - <futures::future::lazy::Lazy<F, R> as futures::future::Future>::poll::ha7405d9bf44f5c6b Feb 23 10:12:54 raspberrypi librespot[3560]: 13: 0x4a6fd3 - futures::task_impl::std::set::h6d2c5274ed4002a1 Feb 23 10:12:54 raspberrypi librespot[3560]: 12: 0x4a008f - <librespot::Main as futures::future::Future>::poll::h41a629a680b23a16 Feb 23 10:12:54 raspberrypi librespot[3560]: 11: 0x4d503f - <librespot_connect::spirc::SpircTask as futures::future::Future>::poll::habae05c016ad016f Feb 23 10:12:54 raspberrypi librespot[3560]: 10: 0x4d561b - librespot_connect::spirc::SpircTask::handle_next::h88581de249cd0191 Feb 23 10:12:54 raspberrypi librespot[3560]: 9: 0x4d63b7 - librespot_connect::spirc::SpircTask::load_track::he684bac6d018d8a5 Feb 23 10:12:54 raspberrypi librespot[3560]: 8: 0x4f1cc3 - core::result::unwrap_failed::h35855d27012b6ce1 Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libcore/panicking.rs:95 Feb 23 10:12:54 raspberrypi librespot[3560]: 7: 0x90d03f - core::panicking::panic_fmt::h4d67173bc68f6d5a Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/panicking.rs:325 Feb 23 10:12:54 raspberrypi librespot[3560]: 6: 0x8f7cbf - rust_begin_unwind Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/panicking.rs:398 Feb 23 10:12:54 raspberrypi librespot[3560]: 5: 0x8f7dd3 - std::panicking::continue_panic_fmt::h4c221b9431554bc2 Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/panicking.rs:491 Feb 23 10:12:54 raspberrypi librespot[3560]: 4: 0x8f8253 - std::panicking::rust_panic_with_hook::h28b9ce6fa7a5033b Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/panicking.rs:227 Feb 23 10:12:54 raspberrypi librespot[3560]: 3: 0x8f7727 - std::panicking::default_hook::h54bc90cfc6073aee Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/panicking.rs:211 Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/sys_common/backtrace.rs:59 Feb 23 10:12:54 raspberrypi librespot[3560]: 2: 0x8f7ae3 - std::panicking::default_hook::{{closure}}::h9d3b4aa9777cceab Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/sys_common/backtrace.rs:71 Feb 23 10:12:54 raspberrypi librespot[3560]: 1: 0x8f371b - std::sys_common::backtrace::_print::h0654a4145b8e108e Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 Feb 23 10:12:54 raspberrypi librespot[3560]: 0: 0x8f91e7 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h508e385542e74f0f Feb 23 10:12:54 raspberrypi librespot[3560]: stack backtrace: Feb 23 10:12:54 raspberrypi librespot[3560]: thread 'main' panicked at 'called Result::unwrap()on anErr value: SpotifyIdError', src/libcore/result.rs:1009:5 Feb 23 10:08:23 raspberrypi librespot[3560]: INFO:librespot_playback::player: Track "BGSTRNG" loaded Feb 23 10:08:22 raspberrypi librespot[3560]: INFO:librespot_playback::player: Loading track "BGSTRNG" with Spotify URI "spotify:track:6FEsAVPmN3VRQmDQQTwD86" Feb 23 10:08:21 raspberrypi librespot[3560]: INFO:librespot_playback::audio_backend::alsa: Using alsa sink Feb 23 10:08:21 raspberrypi librespot[3560]: INFO:librespot_core::session: Country: "DE" Feb 23 10:08:21 raspberrypi librespot[3560]: INFO:librespot_core::session: Authenticated as "XXXXXXX" ! Feb 23 10:08:21 raspberrypi librespot[3560]: INFO:librespot_core::session: Connecting to AP "gew1-accesspoint-b-2ksj.ap.spotify.com:4070" Feb 23 10:05:34 raspberrypi librespot[3560]: INFO:librespot: librespot (raspotify v0.12.0) daeeeaa (2019-02-22). Built on 2019-02-23. Build ID: Jf7YtzTX

The error happens after every song. The first song plays fine, but it is not possible to hear a second song in a row.

This is my command to start librespot (with raspotify)
/usr/bin/librespot --name raspotify (raspberrypi) --backend alsa --bitrate 320 --disable-audio-cache --enable-volume-normalisation --linear-volume --initial-volume=100

Has anybody an idea what's wrong?

<!-- gh-comment-id:466637171 --> @meiseGit commented on GitHub (Feb 23, 2019): Hi, I'm having the same problem. This is my journalctl: `Feb 23 10:12:54 raspberrypi librespot[3560]: 29: 0x76d5c677 - __libc_start_main Feb 23 10:12:54 raspberrypi librespot[3560]: 28: 0x4a2e03 - main Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/rt.rs:58 Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/panic.rs:398 Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/panicking.rs:289 Feb 23 10:12:54 raspberrypi librespot[3560]: 27: 0x8f85db - std::rt::lang_start_internal::h7b3bd8c78881c37d Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libpanic_unwind/lib.rs:102 Feb 23 10:12:54 raspberrypi librespot[3560]: 26: 0x906ed3 - __rust_maybe_catch_panic Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/panicking.rs:310 Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/rt.rs:59 Feb 23 10:12:54 raspberrypi librespot[3560]: 25: 0x8f7c37 - std::panicking::try::do_call::hf93a787b72e1d226 Feb 23 10:12:54 raspberrypi librespot[3560]: 24: 0x4a34c7 - std::rt::lang_start::{{closure}}::h917dfa7921b791c5 Feb 23 10:12:54 raspberrypi librespot[3560]: 23: 0x4a217b - librespot::main::hc31f7002e8482814 Feb 23 10:12:54 raspberrypi librespot[3560]: 22: 0x494fe3 - tokio_core::reactor::Core::run::h99194d5dbb8bd9d4 Feb 23 10:12:54 raspberrypi librespot[3560]: 21: 0x487213 - <scoped_tls::ScopedKey<T>>::set::h73d4acd45c44520c Feb 23 10:12:54 raspberrypi librespot[3560]: 20: 0x487c6b - <std::thread::local::LocalKey<T>>::with::hc5f23be319d4df2a Feb 23 10:12:54 raspberrypi librespot[3560]: 19: 0x4876d3 - <std::thread::local::LocalKey<T>>::with::h29c22fa99619602e Feb 23 10:12:54 raspberrypi librespot[3560]: 18: 0x4879eb - <std::thread::local::LocalKey<T>>::with::h609051ccff55f1aa Feb 23 10:12:54 raspberrypi librespot[3560]: 17: 0x48d3ef - <tokio::executor::current_thread::Entered<'a, P>>::block_on::h24fda3b0e84ce8d3 Feb 23 10:12:54 raspberrypi librespot[3560]: 16: 0x4875ab - <std::thread::local::LocalKey<T>>::with::h01c83e94e15802ce Feb 23 10:12:54 raspberrypi librespot[3560]: 15: 0x4a72df - futures::task_impl::std::set::hfe2c0ccaf2bdb22f Feb 23 10:12:54 raspberrypi librespot[3560]: 14: 0x499f8b - <futures::future::lazy::Lazy<F, R> as futures::future::Future>::poll::ha7405d9bf44f5c6b Feb 23 10:12:54 raspberrypi librespot[3560]: 13: 0x4a6fd3 - futures::task_impl::std::set::h6d2c5274ed4002a1 Feb 23 10:12:54 raspberrypi librespot[3560]: 12: 0x4a008f - <librespot::Main as futures::future::Future>::poll::h41a629a680b23a16 Feb 23 10:12:54 raspberrypi librespot[3560]: 11: 0x4d503f - <librespot_connect::spirc::SpircTask as futures::future::Future>::poll::habae05c016ad016f Feb 23 10:12:54 raspberrypi librespot[3560]: 10: 0x4d561b - librespot_connect::spirc::SpircTask::handle_next::h88581de249cd0191 Feb 23 10:12:54 raspberrypi librespot[3560]: 9: 0x4d63b7 - librespot_connect::spirc::SpircTask::load_track::he684bac6d018d8a5 Feb 23 10:12:54 raspberrypi librespot[3560]: 8: 0x4f1cc3 - core::result::unwrap_failed::h35855d27012b6ce1 Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libcore/panicking.rs:95 Feb 23 10:12:54 raspberrypi librespot[3560]: 7: 0x90d03f - core::panicking::panic_fmt::h4d67173bc68f6d5a Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/panicking.rs:325 Feb 23 10:12:54 raspberrypi librespot[3560]: 6: 0x8f7cbf - rust_begin_unwind Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/panicking.rs:398 Feb 23 10:12:54 raspberrypi librespot[3560]: 5: 0x8f7dd3 - std::panicking::continue_panic_fmt::h4c221b9431554bc2 Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/panicking.rs:491 Feb 23 10:12:54 raspberrypi librespot[3560]: 4: 0x8f8253 - std::panicking::rust_panic_with_hook::h28b9ce6fa7a5033b Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/panicking.rs:227 Feb 23 10:12:54 raspberrypi librespot[3560]: 3: 0x8f7727 - std::panicking::default_hook::h54bc90cfc6073aee Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/panicking.rs:211 Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/sys_common/backtrace.rs:59 Feb 23 10:12:54 raspberrypi librespot[3560]: 2: 0x8f7ae3 - std::panicking::default_hook::{{closure}}::h9d3b4aa9777cceab Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/sys_common/backtrace.rs:71 Feb 23 10:12:54 raspberrypi librespot[3560]: 1: 0x8f371b - std::sys_common::backtrace::_print::h0654a4145b8e108e Feb 23 10:12:54 raspberrypi librespot[3560]: at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 Feb 23 10:12:54 raspberrypi librespot[3560]: 0: 0x8f91e7 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h508e385542e74f0f Feb 23 10:12:54 raspberrypi librespot[3560]: stack backtrace: Feb 23 10:12:54 raspberrypi librespot[3560]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: SpotifyIdError', src/libcore/result.rs:1009:5 Feb 23 10:08:23 raspberrypi librespot[3560]: INFO:librespot_playback::player: Track "BGSTRNG" loaded Feb 23 10:08:22 raspberrypi librespot[3560]: INFO:librespot_playback::player: Loading track "BGSTRNG" with Spotify URI "spotify:track:6FEsAVPmN3VRQmDQQTwD86" Feb 23 10:08:21 raspberrypi librespot[3560]: INFO:librespot_playback::audio_backend::alsa: Using alsa sink Feb 23 10:08:21 raspberrypi librespot[3560]: INFO:librespot_core::session: Country: "DE" Feb 23 10:08:21 raspberrypi librespot[3560]: INFO:librespot_core::session: Authenticated as "XXXXXXX" ! Feb 23 10:08:21 raspberrypi librespot[3560]: INFO:librespot_core::session: Connecting to AP "gew1-accesspoint-b-2ksj.ap.spotify.com:4070" Feb 23 10:05:34 raspberrypi librespot[3560]: INFO:librespot: librespot (raspotify v0.12.0) daeeeaa (2019-02-22). Built on 2019-02-23. Build ID: Jf7YtzTX` The error happens after every song. The first song plays fine, but it is not possible to hear a second song in a row. This is my command to start librespot (with raspotify) `/usr/bin/librespot --name raspotify (raspberrypi) --backend alsa --bitrate 320 --disable-audio-cache --enable-volume-normalisation --linear-volume --initial-volume=100` Has anybody an idea what's wrong?
Author
Owner

@FlipEverything commented on GitHub (Mar 5, 2019):

I have the same problem on my Raspberry Pi. After a little bit of time it randomly crashes. I am using Spotify Connect on my pimusicbox. I compiled the latest librespot from this repo.

I am listening to a playlist radio started from the desktop/Android Spotify client.

What should I do?

INFO:librespot: librespot daeeeaa (2019-02-22). Built on 2019-03-05. Build ID: 2jqcKDVy
INFO:librespot_core::session: Connecting to AP "XXXXXX.ap.spotify.com:4070"
INFO:librespot_core::session: Authenticated as "XXXXXXX" !
INFO:librespot_playback::audio_backend::alsa: Using alsa sink
INFO:librespot_core::session: Country: "HU"
INFO:librespot_playback::player: Loading track "Firework - Acoustic" with Spotify URI "spotify:track:3rlpBpSe9ZE8KaW0X9IZ41"
INFO:librespot_playback::player: Track "Firework - Acoustic" loaded
INFO:librespot::player_event_handler: Running ["/opt/musicbox/mpc_stop.sh"] with environment variables {"OLD_TRACK_ID": "3yBgUv7hHzX1K7lpQ1XEr4", "TRACK_ID": "3rlpBpSe9ZE8KaW0X9IZ41", "PLAYER_EVENT": "change"}
INFO:librespot_playback::player: Loading track "Use Somebody - Recorded at Spotify Studios NYC" with Spotify URI "spotify:track:5My4LtZW8JQJoKFDWodqIt"
INFO:librespot_playback::player: Track "Use Somebody - Recorded at Spotify Studios NYC" loaded
INFO:librespot::player_event_handler: Running ["/opt/musicbox/mpc_stop.sh"] with environment variables {"OLD_TRACK_ID": "3rlpBpSe9ZE8KaW0X9IZ41", "TRACK_ID": "5My4LtZW8JQJoKFDWodqIt", "PLAYER_EVENT": "change"}
INFO:librespot_playback::player: Loading track "Too Late For Lullabies" with Spotify URI "spotify:track:2TxrqD5baI1GOmfu3sqpnC"
INFO:librespot_playback::player: Track "Too Late For Lullabies" loaded
INFO:librespot::player_event_handler: Running ["/opt/musicbox/mpc_stop.sh"] with environment variables {"TRACK_ID": "2TxrqD5baI1GOmfu3sqpnC", "PLAYER_EVENT": "change", "OLD_TRACK_ID": "5My4LtZW8JQJoKFDWodqIt"}
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: SpotifyIdError', src/libcore/result.rs:997:5
stack backtrace:
   0:   0x94286f - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::hdf951eb9f43ea27e
                       at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1:   0x93e363 - std::sys_common::backtrace::_print::h2b5fdbbb5020ccf8
                       at src/libstd/sys_common/backtrace.rs:70
   2:   0x9409ff - std::panicking::default_hook::{{closure}}::h18d8c59665918d69
                       at src/libstd/sys_common/backtrace.rs:58
                       at src/libstd/panicking.rs:200
   3:   0x940637 - std::panicking::default_hook::h1fd1ad969274543a
                       at src/libstd/panicking.rs:215
   4:   0x94116f - std::panicking::rust_panic_with_hook::h40a77253872948e8
                       at src/libstd/panicking.rs:478
   5:   0x940cef - std::panicking::continue_panic_fmt::hec94fc8e5daf641b
                       at src/libstd/panicking.rs:385
   6:   0x940bdb - rust_begin_unwind
                       at src/libstd/panicking.rs:312
   7:   0x959417 - core::panicking::panic_fmt::h74ee8034b317ceed
                       at src/libcore/panicking.rs:85
   8:   0x55c7af - core::result::unwrap_failed::h5ee3dc180b5698a8
   9:   0x543c0b - librespot_connect::spirc::SpircTask::load_track::hae99e809c2f41d56
  10:   0x542e6f - librespot_connect::spirc::SpircTask::handle_next::h56ed505c6c191c30
  11:   0x542893 - <librespot_connect::spirc::SpircTask as futures::future::Future>::poll::h3049a77cfc63c4ed
  12:   0x510d73 - <librespot::Main as futures::future::Future>::poll::hb4e58acdcfd5a0b8
  13:   0x514d4f - futures::task_impl::std::set::hee33c429a4903849
  14:   0x5091d7 - <futures::future::lazy::Lazy<F, R> as futures::future::Future>::poll::hd27f9184a390c269
  15:   0x514ecb - futures::task_impl::std::set::hf1d271ba31a081c9
  16:   0x4f6ee7 - <std::thread::local::LocalKey<T>>::with::h561279e6b4bb9a72
  17:   0x4fc7bb - <tokio::executor::current_thread::Entered<'a, P>>::block_on::hcd40996704a57783
  18:   0x4f6ce3 - <std::thread::local::LocalKey<T>>::with::h0794e614ab641970
  19:   0x4f7087 - <std::thread::local::LocalKey<T>>::with::he359f758d1b86d9a
  20:   0x4f69ab - <scoped_tls::ScopedKey<T>>::set::h7f3bfbabe52ff161
  21:   0x504457 - tokio_core::reactor::Core::run::h2eb354924f30d03f
  22:   0x512e77 - librespot::main::h94c9afb3d362eec2
  23:   0x509927 - std::rt::lang_start::{{closure}}::h8c7e4cbc39e7e041
  24:   0x940b53 - std::panicking::try::do_call::h287c6909aadcc5f1
                       at src/libstd/rt.rs:49
                       at src/libstd/panicking.rs:297
  25:   0x9488c7 - __rust_maybe_catch_panic
                       at src/libpanic_unwind/lib.rs:92
  26:   0x9415e7 - std::rt::lang_start_internal::h747c58e2c78f4f4f
                       at src/libstd/panicking.rs:276
                       at src/libstd/panic.rs:388
                       at src/libstd/rt.rs:48
  27:   0x513ad7 - main
  28: 0xb6cfb81b - __libc_start_main

<!-- gh-comment-id:469688057 --> @FlipEverything commented on GitHub (Mar 5, 2019): I have the same problem on my Raspberry Pi. After a little bit of time it randomly crashes. I am using Spotify Connect on my pimusicbox. I compiled the latest librespot from this repo. I am listening to a playlist radio started from the desktop/Android Spotify client. What should I do? ```sh INFO:librespot: librespot daeeeaa (2019-02-22). Built on 2019-03-05. Build ID: 2jqcKDVy INFO:librespot_core::session: Connecting to AP "XXXXXX.ap.spotify.com:4070" INFO:librespot_core::session: Authenticated as "XXXXXXX" ! INFO:librespot_playback::audio_backend::alsa: Using alsa sink INFO:librespot_core::session: Country: "HU" INFO:librespot_playback::player: Loading track "Firework - Acoustic" with Spotify URI "spotify:track:3rlpBpSe9ZE8KaW0X9IZ41" INFO:librespot_playback::player: Track "Firework - Acoustic" loaded INFO:librespot::player_event_handler: Running ["/opt/musicbox/mpc_stop.sh"] with environment variables {"OLD_TRACK_ID": "3yBgUv7hHzX1K7lpQ1XEr4", "TRACK_ID": "3rlpBpSe9ZE8KaW0X9IZ41", "PLAYER_EVENT": "change"} INFO:librespot_playback::player: Loading track "Use Somebody - Recorded at Spotify Studios NYC" with Spotify URI "spotify:track:5My4LtZW8JQJoKFDWodqIt" INFO:librespot_playback::player: Track "Use Somebody - Recorded at Spotify Studios NYC" loaded INFO:librespot::player_event_handler: Running ["/opt/musicbox/mpc_stop.sh"] with environment variables {"OLD_TRACK_ID": "3rlpBpSe9ZE8KaW0X9IZ41", "TRACK_ID": "5My4LtZW8JQJoKFDWodqIt", "PLAYER_EVENT": "change"} INFO:librespot_playback::player: Loading track "Too Late For Lullabies" with Spotify URI "spotify:track:2TxrqD5baI1GOmfu3sqpnC" INFO:librespot_playback::player: Track "Too Late For Lullabies" loaded INFO:librespot::player_event_handler: Running ["/opt/musicbox/mpc_stop.sh"] with environment variables {"TRACK_ID": "2TxrqD5baI1GOmfu3sqpnC", "PLAYER_EVENT": "change", "OLD_TRACK_ID": "5My4LtZW8JQJoKFDWodqIt"} thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: SpotifyIdError', src/libcore/result.rs:997:5 stack backtrace: 0: 0x94286f - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::hdf951eb9f43ea27e at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39 1: 0x93e363 - std::sys_common::backtrace::_print::h2b5fdbbb5020ccf8 at src/libstd/sys_common/backtrace.rs:70 2: 0x9409ff - std::panicking::default_hook::{{closure}}::h18d8c59665918d69 at src/libstd/sys_common/backtrace.rs:58 at src/libstd/panicking.rs:200 3: 0x940637 - std::panicking::default_hook::h1fd1ad969274543a at src/libstd/panicking.rs:215 4: 0x94116f - std::panicking::rust_panic_with_hook::h40a77253872948e8 at src/libstd/panicking.rs:478 5: 0x940cef - std::panicking::continue_panic_fmt::hec94fc8e5daf641b at src/libstd/panicking.rs:385 6: 0x940bdb - rust_begin_unwind at src/libstd/panicking.rs:312 7: 0x959417 - core::panicking::panic_fmt::h74ee8034b317ceed at src/libcore/panicking.rs:85 8: 0x55c7af - core::result::unwrap_failed::h5ee3dc180b5698a8 9: 0x543c0b - librespot_connect::spirc::SpircTask::load_track::hae99e809c2f41d56 10: 0x542e6f - librespot_connect::spirc::SpircTask::handle_next::h56ed505c6c191c30 11: 0x542893 - <librespot_connect::spirc::SpircTask as futures::future::Future>::poll::h3049a77cfc63c4ed 12: 0x510d73 - <librespot::Main as futures::future::Future>::poll::hb4e58acdcfd5a0b8 13: 0x514d4f - futures::task_impl::std::set::hee33c429a4903849 14: 0x5091d7 - <futures::future::lazy::Lazy<F, R> as futures::future::Future>::poll::hd27f9184a390c269 15: 0x514ecb - futures::task_impl::std::set::hf1d271ba31a081c9 16: 0x4f6ee7 - <std::thread::local::LocalKey<T>>::with::h561279e6b4bb9a72 17: 0x4fc7bb - <tokio::executor::current_thread::Entered<'a, P>>::block_on::hcd40996704a57783 18: 0x4f6ce3 - <std::thread::local::LocalKey<T>>::with::h0794e614ab641970 19: 0x4f7087 - <std::thread::local::LocalKey<T>>::with::he359f758d1b86d9a 20: 0x4f69ab - <scoped_tls::ScopedKey<T>>::set::h7f3bfbabe52ff161 21: 0x504457 - tokio_core::reactor::Core::run::h2eb354924f30d03f 22: 0x512e77 - librespot::main::h94c9afb3d362eec2 23: 0x509927 - std::rt::lang_start::{{closure}}::h8c7e4cbc39e7e041 24: 0x940b53 - std::panicking::try::do_call::h287c6909aadcc5f1 at src/libstd/rt.rs:49 at src/libstd/panicking.rs:297 25: 0x9488c7 - __rust_maybe_catch_panic at src/libpanic_unwind/lib.rs:92 26: 0x9415e7 - std::rt::lang_start_internal::h747c58e2c78f4f4f at src/libstd/panicking.rs:276 at src/libstd/panic.rs:388 at src/libstd/rt.rs:48 27: 0x513ad7 - main 28: 0xb6cfb81b - __libc_start_main ```
Author
Owner

@aykevl commented on GitHub (Mar 13, 2019):

Same error here. For me this happens in Spotifyd after it is paused for a while (a few days). I had to patch Spotifyd to not hide the error to get a backtrace.

This is the relevant section from the crash log:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err`value: SpotifyIdError', libcore/result
.rs:1009:5
stack backtrace:
[...]
   8: core::result::unwrap_failed
             at libcore/macros.rs:26
   9: <core::result::Result<T, E>>::unwrap
             at libcore/result.rs:808
  10: librespot_connect::spirc::SpircTask::load_track
             at ./.cargo/git/checkouts/librespot-06fda9f186b35c32/daeeeaa/connect/src/spirc.rs:698
  11: librespot_connect::spirc::SpircTask::handle_next
             at ./.cargo/git/checkouts/librespot-06fda9f186b35c32/daeeeaa/connect/src/spirc.rs:610
  12: librespot_connect::spirc::SpircTask::handle_end_of_track
             at ./.cargo/git/checkouts/librespot-06fda9f186b35c32/daeeeaa/connect/src/spirc.rs:673
  13: <librespot_connect::spirc::SpircTask as futures::future::Future>::poll
             at ./.cargo/git/checkouts/librespot-06fda9f186b35c32/daeeeaa/connect/src/spirc.rs:333
[...]

I'll try again with the patch from @ashthespy and report back when I get something useful.

<!-- gh-comment-id:472632200 --> @aykevl commented on GitHub (Mar 13, 2019): Same error here. For me this happens in Spotifyd after it is paused for a while (a few days). I had to patch Spotifyd to not hide the error to get a backtrace. This is the relevant section from the crash log: ``` thread 'main' panicked at 'called `Result::unwrap()` on an `Err`value: SpotifyIdError', libcore/result .rs:1009:5 stack backtrace: [...] 8: core::result::unwrap_failed at libcore/macros.rs:26 9: <core::result::Result<T, E>>::unwrap at libcore/result.rs:808 10: librespot_connect::spirc::SpircTask::load_track at ./.cargo/git/checkouts/librespot-06fda9f186b35c32/daeeeaa/connect/src/spirc.rs:698 11: librespot_connect::spirc::SpircTask::handle_next at ./.cargo/git/checkouts/librespot-06fda9f186b35c32/daeeeaa/connect/src/spirc.rs:610 12: librespot_connect::spirc::SpircTask::handle_end_of_track at ./.cargo/git/checkouts/librespot-06fda9f186b35c32/daeeeaa/connect/src/spirc.rs:673 13: <librespot_connect::spirc::SpircTask as futures::future::Future>::poll at ./.cargo/git/checkouts/librespot-06fda9f186b35c32/daeeeaa/connect/src/spirc.rs:333 [...] ``` I'll try again with the patch from @ashthespy and report back when I get something useful.
Author
Owner

@ashthespy commented on GitHub (Mar 13, 2019):

Also been seeing more of this error of late (past hour or so?)
The issue is sometimes the frame contains an empty gid. To figure out if it's track specific try patching it to:

let track = {
            // let gid = self.state.get_track()[index as usize].get_gid();
            let track_ref = self.state.get_track()[index as usize].to_owned();
            let gid = track_ref.get_gid();
            if gid.len() != 16 {
                error!("Malformed gid for {:?}", track_ref.get_uri());
            }
            SpotifyId::from_raw(gid).unwrap()
        };
<!-- gh-comment-id:472641208 --> @ashthespy commented on GitHub (Mar 13, 2019): Also been seeing more of this error of late (past hour or so?) The issue is sometimes the frame contains an empty gid. To figure out if it's track specific try patching it to: ``` rust let track = { // let gid = self.state.get_track()[index as usize].get_gid(); let track_ref = self.state.get_track()[index as usize].to_owned(); let gid = track_ref.get_gid(); if gid.len() != 16 { error!("Malformed gid for {:?}", track_ref.get_uri()); } SpotifyId::from_raw(gid).unwrap() }; ```
Author
Owner

@aykevl commented on GitHub (Mar 13, 2019):

For me it does not seem to be track specific as it only occurs after a long time of inactivity, and happens very often then. I think the real bug is not handling a connection timeout correctly. In fact, I have seen connection related errors before (before I enabled full backtrace printing) so maybe this assert I'm hitting is just a side effect of a connection timeout. Nonetheless, I have added the relevant patch to check for invalid gids just to be sure. But is there any code I can patch to figure out whether this is indeed the case? I have little experience with Rust but want to help improve the stability of librespot.

<!-- gh-comment-id:472646365 --> @aykevl commented on GitHub (Mar 13, 2019): For me it does not seem to be track specific as it only occurs after a long time of inactivity, and happens very often then. I think the real bug is not handling a connection timeout correctly. In fact, I have seen connection related errors before (before I enabled full backtrace printing) so maybe this assert I'm hitting is just a side effect of a connection timeout. Nonetheless, I have added the relevant patch to check for invalid `gid`s just to be sure. But is there any code I can patch to figure out whether this is indeed the case? I have little experience with Rust but want to help improve the stability of librespot.
Author
Owner

@kingosticks commented on GitHub (Mar 14, 2019):

There's possibly more than one issue here. @aykevl 's sounds different to the other two if it requires inactivity to trigger.

But all these stack traces are very similar and all coming through handle_next(). I am a little confused how they are getting there straight from poll.... Is that due to rust inlining the caller or something? Is that a consequence of being relese builds rather than debug builds? EDIT: Yes, I checked this and that seems to be a difference.

Chances are they are being called from handle_end_of_track() but it'd be nice to know. Either way, I think we'll need more context to debug this. I'd change that extra debug logging to dump the entire state and see exactly why the gid (and maybe the whole track entry) is invalid. It would also be helpful if people could run the debug binary.

<!-- gh-comment-id:472782681 --> @kingosticks commented on GitHub (Mar 14, 2019): There's possibly more than one issue here. @aykevl 's sounds different to the other two if it requires inactivity to trigger. But all these stack traces are very similar and all coming through `handle_next()`. I am a little confused how they are getting there straight from `poll`.... Is that due to rust inlining the caller or something? Is that a consequence of being relese builds rather than debug builds? *EDIT: Yes, I checked this and that seems to be a difference.* Chances are they are being called from `handle_end_of_track()` but it'd be nice to know. Either way, I think we'll need more context to debug this. I'd change that extra debug logging to dump the entire state and see exactly why the gid (and maybe the whole track entry) is invalid. It would also be helpful if people could run the debug binary.
Author
Owner

@aykevl commented on GitHub (Mar 14, 2019):

I am running an unoptimized build so it's not the optimizer that gets in the way.
Here is the full backtrace, if that helps: https://gist.github.com/aykevl/73bf2998b5c28d2e33654155a4d39b3d
Oh and if that's important: I am running spotifyd on a Raspberry Pi 3 with the PulseAudio backend.
I can open a new bug report if needed if it's a different bug after all.

@kingosticks can you perhaps tell me what to insert to debug this further? I'm a Go/Python/C programmer, not a Rust programmer.
Adding debug!("self: {:?}", self); to load_track resulted in the compiler suggesting to add #[derive(Debug)] to SpircTrack. But when I do that, many more errors are produced and I'm not sure whether it's possible to properly fix it. Maybe I can print some specific fields?
Unfortunately, every debug attempt takes a few days of not listening Spotify over my speakers so it's a rather slow process.

<!-- gh-comment-id:472808258 --> @aykevl commented on GitHub (Mar 14, 2019): I am running an unoptimized build so it's not the optimizer that gets in the way. Here is the full backtrace, if that helps: https://gist.github.com/aykevl/73bf2998b5c28d2e33654155a4d39b3d Oh and if that's important: I am running spotifyd on a Raspberry Pi 3 with the PulseAudio backend. I can open a new bug report if needed if it's a different bug after all. @kingosticks can you perhaps tell me what to insert to debug this further? I'm a Go/Python/C programmer, not a Rust programmer. Adding `debug!("self: {:?}", self);` to `load_track` resulted in the compiler suggesting to add `#[derive(Debug)]` to `SpircTrack`. But when I do that, many more errors are produced and I'm not sure whether it's possible to properly fix it. Maybe I can print some specific fields? Unfortunately, every debug attempt takes a few days of not listening Spotify over my speakers so it's a rather slow process.
Author
Owner

@kingosticks commented on GitHub (Mar 14, 2019):

Hard to tell if it's the same as the other reports. Another difference is they are using ALSA. If you could try to describe in more detail the steps you are doing to reproduce it would help.

debug!("self: {:?}", self.state);
<!-- gh-comment-id:472823146 --> @kingosticks commented on GitHub (Mar 14, 2019): Hard to tell if it's the same as the other reports. Another difference is they are using ALSA. If you could try to describe in more detail the steps you are doing to reproduce it would help. ``` debug!("self: {:?}", self.state); ```
Author
Owner

@aykevl commented on GitHub (Mar 14, 2019):

I've added it locally, let's see what happens at the next crash.

My "steps to reproduce" would be:

  1. Play some music.
  2. Pause at some point.
  3. Come back a few days later.

At that point, it either has crashed or it just hangs with no indication that it has crashed. Hitting Ctrl-C shows a vague error. Hitting Ctrl-C again aborts the process. However, last time it crashed directly with a backtrace after I removed the spotifyd panic handler.

<!-- gh-comment-id:472883232 --> @aykevl commented on GitHub (Mar 14, 2019): I've added it locally, let's see what happens at the next crash. My "steps to reproduce" would be: 1. Play some music. 2. Pause at some point. 3. Come back a few days later. At that point, it either has crashed or it just hangs with no indication that it has crashed. Hitting Ctrl-C shows a vague error. Hitting Ctrl-C again aborts the process. However, last time it crashed directly with a backtrace after I removed the spotifyd panic handler.
Author
Owner

@kingosticks commented on GitHub (Mar 14, 2019):

I just hit the crash after leaving a radio station playing (I never normally use those). It shows the issue is the last "track" - which it's trying to switch to - isn't actually a track at all and hence doesn't have a gid.

context_uri: "spotify:station:genre:pop" 
position_ms: 0 
status: kPlayStatusPlay 
position_measured_at: 1552569705071 
shuffle: false 
repeat: false 
playing_track_index: 37 
    track {gid: " \344\203y\027\356I\336\203v1y\321wE\202"} 
    track {gid: "\272\200O\314JXI^\201BNA\007\004;\341"} 
    track {gid: "\342`\241&\265\036F\224\231\206\334\034E\324FR"} 
    track {gid: "\201\264\245\225\360+E'\265\340\000E\330F\tH"} 
    track {gid: "\311\007\255\376 \002H\321\204_s?\350\273\363\224"} 
    track {gid: "H%7\226\305\236D\324\272l\224\362!M\316\324"} 
    track {gid: "\252\275\276\354\021\303O\013\204\0071L\250\\\217\221"} 
    track {gid: "\356\375\217\260o\001F\017\275\361\262\351\340\033\305\374"} 
    track {gid: "T\351\212&2\227A\363\206\243\2618n\177\332\354"} 
    track {gid: "u\036\021\271\200\260M\301\224#\372>R\312\037i"} 
    track {gid: "\002r\333\375\212\351K\213\244\260\323\331\365\226[\260"} 
    track {gid: "'\247\3478uPB\250\247\334K+U\361\234)"} 
    track {gid: "\342\254\023\363\262\364L8\236\251\360RNs\216\317"} 
    track {gid: "\001E'.\2738N!\226\222\274\231\205\353\362C"} 
    track {gid: "2\017\246\347\327wF\320\202\t\362v\270\023\013q"} 
    track {gid: "\000]\262\225J\323L\251\226\207\376\200\362v\307m"} 
    track {gid: "\337JC\346\001\032J\345\232|m \267\235\301o"} 
    track {gid: "\223\223\026\230;vF\000\207W\366y\361\037I&"} 
    track {gid: "J&hq\350\264J4\243\216\374\343ODw\326"} 
    track {gid: "$\251\321\177\221bN\220\240\272\307_\300\363\360\337"} 
    track {gid: "*\377\305\227VE@\252\234\307\271Q\220\2670\266"} 
    track {gid: "\343m\221tS@Ed\262Z\340\017h\324\267#"} 
    track {gid: "\301\263\300&\251\326N\255\223\210d\003xf\030\255"} 
    track {gid: "\344\203Ln\030\375M\222\226\270\006\037Q\360\267\225"} 
    track {gid: "B\212\251\234*\234G\342\210\362\031\2713oc\323"} 
    track {gid: "\303:Z\321\250\201@\353\265\245\374\006\252s%w"} 
    track {gid: "\004KB\361\331\314E\374\272\232\3401\276FTu"} 
    track {gid: "\354\270\330\271O\037CU\231a\215xS\343S "} 
    track {gid: "=N\242+\370bNM\215R\0227oh\254%"} 
    track {gid: "\321#\004\233)\373GO\263\010.D\360\277G\030"} 
    track {gid: "\344\022\207\226\013\256Mc\234jO\332WLK["} 
    track {gid: "!\273\357\206\200\240E\025\256\313\223\007v;\305\340"} 
    track {gid: "\261\220\306\017Q\245D\211\214\367E\347\262E\315\242"} 
    track {gid: "$Da:\005@E\374\200\331).\370JZ\215"} 
    track {gid: "\261\316Q\0217\233GH\233\004\311\322H;\355\006"} 
    track {gid: "\242R(\374\243\365M\r\265\3100\214\321@\373e"} 
    track {gid: "\253H\326\035\361\273C\030\253\323\ni\221j\003\037"} 
    track {uri: "spotify:meta:page:1"}', 
<!-- gh-comment-id:472891163 --> @kingosticks commented on GitHub (Mar 14, 2019): I just hit the crash after leaving a radio station playing (I never normally use those). It shows the issue is the last "track" - which it's trying to switch to - isn't actually a track at all and hence doesn't have a `gid`. ``` context_uri: "spotify:station:genre:pop" position_ms: 0 status: kPlayStatusPlay position_measured_at: 1552569705071 shuffle: false repeat: false playing_track_index: 37 track {gid: " \344\203y\027\356I\336\203v1y\321wE\202"} track {gid: "\272\200O\314JXI^\201BNA\007\004;\341"} track {gid: "\342`\241&\265\036F\224\231\206\334\034E\324FR"} track {gid: "\201\264\245\225\360+E'\265\340\000E\330F\tH"} track {gid: "\311\007\255\376 \002H\321\204_s?\350\273\363\224"} track {gid: "H%7\226\305\236D\324\272l\224\362!M\316\324"} track {gid: "\252\275\276\354\021\303O\013\204\0071L\250\\\217\221"} track {gid: "\356\375\217\260o\001F\017\275\361\262\351\340\033\305\374"} track {gid: "T\351\212&2\227A\363\206\243\2618n\177\332\354"} track {gid: "u\036\021\271\200\260M\301\224#\372>R\312\037i"} track {gid: "\002r\333\375\212\351K\213\244\260\323\331\365\226[\260"} track {gid: "'\247\3478uPB\250\247\334K+U\361\234)"} track {gid: "\342\254\023\363\262\364L8\236\251\360RNs\216\317"} track {gid: "\001E'.\2738N!\226\222\274\231\205\353\362C"} track {gid: "2\017\246\347\327wF\320\202\t\362v\270\023\013q"} track {gid: "\000]\262\225J\323L\251\226\207\376\200\362v\307m"} track {gid: "\337JC\346\001\032J\345\232|m \267\235\301o"} track {gid: "\223\223\026\230;vF\000\207W\366y\361\037I&"} track {gid: "J&hq\350\264J4\243\216\374\343ODw\326"} track {gid: "$\251\321\177\221bN\220\240\272\307_\300\363\360\337"} track {gid: "*\377\305\227VE@\252\234\307\271Q\220\2670\266"} track {gid: "\343m\221tS@Ed\262Z\340\017h\324\267#"} track {gid: "\301\263\300&\251\326N\255\223\210d\003xf\030\255"} track {gid: "\344\203Ln\030\375M\222\226\270\006\037Q\360\267\225"} track {gid: "B\212\251\234*\234G\342\210\362\031\2713oc\323"} track {gid: "\303:Z\321\250\201@\353\265\245\374\006\252s%w"} track {gid: "\004KB\361\331\314E\374\272\232\3401\276FTu"} track {gid: "\354\270\330\271O\037CU\231a\215xS\343S "} track {gid: "=N\242+\370bNM\215R\0227oh\254%"} track {gid: "\321#\004\233)\373GO\263\010.D\360\277G\030"} track {gid: "\344\022\207\226\013\256Mc\234jO\332WLK["} track {gid: "!\273\357\206\200\240E\025\256\313\223\007v;\305\340"} track {gid: "\261\220\306\017Q\245D\211\214\367E\347\262E\315\242"} track {gid: "$Da:\005@E\374\200\331).\370JZ\215"} track {gid: "\261\316Q\0217\233GH\233\004\311\322H;\355\006"} track {gid: "\242R(\374\243\365M\r\265\3100\214\321@\373e"} track {gid: "\253H\326\035\361\273C\030\253\323\ni\221j\003\037"} track {uri: "spotify:meta:page:1"}', ```
Author
Owner

@ashthespy commented on GitHub (Mar 14, 2019):

I have been encountering this quite frequently albeit not with a build from master, but a tweaked version with support for context stuff.
What I have found is somewhere along the road in the sent frame's state, there is track that isn't a track - track {uri: "spotify:meta:page:1"}
Just skipping this this track (or looping back to 0) works for me.
EDIT: Ah, you beat me to it! ;-)

<!-- gh-comment-id:472903211 --> @ashthespy commented on GitHub (Mar 14, 2019): I have been encountering this quite frequently albeit not with a build from master, but a tweaked version with support for context stuff. What I have found is somewhere along the road in the sent frame's state, there is track that isn't a track - `track {uri: "spotify:meta:page:1"}` Just skipping this this track (or looping back to 0) works for me. EDIT: Ah, you beat me to it! ;-)
Author
Owner

@sashahilton00 commented on GitHub (Mar 20, 2019):

This should be resolved with the merging of #305, thus closing. If the issue persists, one of the members can reopen this, or create a new issue.

<!-- gh-comment-id:474782647 --> @sashahilton00 commented on GitHub (Mar 20, 2019): This should be resolved with the merging of #305, thus closing. If the issue persists, one of the members can reopen this, or create a new issue.
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#180
No description provided.