[GH-ISSUE #959] index out of bounds on activating shuffle without previous interaction #467

Closed
opened 2026-02-27 19:30:47 +03:00 by kerem · 1 comment
Owner

Originally created by @eladyn on GitHub (Jan 31, 2022).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/959

This issue was originally raised in https://github.com/Spotifyd/spotifyd/issues/1049, but I noticed that this also happens with librespot 0.3.1

Steps to reproduce

Very much inspired by those in the original issue, just a bit modified:

  1. Get some API credentials and set the following environment variables: SPOTIPY_CLIENT_ID and SPOTIPY_CLIENT_SECRET and add the redirect URI http://localhost:52413 in the API client settings
  2. run librespot with librespot -n "librespot-device" --username "$spotify_user" --password "$spotify_password"
  3. run the following python script (with the above set env variables):
    import spotipy
    from spotipy.oauth2 import SpotifyOAuth
    
    scope = "user-read-playback-state,user-modify-playback-state"
    
    sp = spotipy.Spotify(auth_manager=SpotifyOAuth(scope=scope, redirect_uri="http://localhost:52413"))
    
    devices = sp.devices()["devices"] # type: ignore
    
    print("available devices:\n==================")
    
    for index, device in enumerate(devices):
        print(f"{index + 1}: {device['name']}")
    
    selection = int(input("\nSelect the device that you want activate shuffle for: "))
    
    device_id = devices[selection - 1]["id"]
    
    sp.shuffle(state=True, device_id=device_id)
    
    and choose the librespot device.
  4. librespot will crash

Logs

[2022-01-31T18:19:10Z INFO  librespot] librespot 0.3.1 c1ac4cb (Built on 2022-01-31, Build ID: GTh0jTQW, Profile: debug)
[2022-01-31T18:19:10Z INFO  librespot_core::session] Connecting to AP "ap-gew1.spotify.com:4070"
[2022-01-31T18:19:10Z INFO  librespot_core::session] Authenticated as "user" !
[2022-01-31T18:19:10Z INFO  librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0)
[2022-01-31T18:19:10Z INFO  librespot_playback::convert] Converting with ditherer: tpdf
[2022-01-31T18:19:10Z INFO  librespot_playback::audio_backend::rodio] Using Rodio sink with format S16 and cpal host: ALSA
[2022-01-31T18:19:10Z INFO  librespot_playback::audio_backend::rodio] Using audio device: default
[2022-01-31T18:19:10Z INFO  librespot_core::session] Country: "DE"
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/slice/mod.rs:564:18
stack backtrace:
   0:     0x558c4b3f74fc - std::backtrace_rs::backtrace::libunwind::trace::h09f7e4e089375279
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x558c4b3f74fc - std::backtrace_rs::backtrace::trace_unsynchronized::h1ec96f1c7087094e
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x558c4b3f74fc - std::sys_common::backtrace::_print_fmt::h317b71fc9a5cf964
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x558c4b3f74fc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he3555b48e7dfe7f0
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x558c4b41e4cc - core::fmt::write::h513b07ca38f4fb1b
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/fmt/mod.rs:1149:17
   5:     0x558c4b3f0085 - std::io::Write::write_fmt::haf8c932b52111354
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/io/mod.rs:1697:15
   6:     0x558c4b3f9260 - std::sys_common::backtrace::_print::h195c38364780a303
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x558c4b3f9260 - std::sys_common::backtrace::print::hc09dfdea923b6730
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x558c4b3f9260 - std::panicking::default_hook::{{closure}}::hb2e38ec0d91046a3
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:211:50
   9:     0x558c4b3f8e15 - std::panicking::default_hook::h60284635b0ad54a8
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:228:9
  10:     0x558c4b3f9914 - std::panicking::rust_panic_with_hook::ha677a669fb275654
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:606:17
  11:     0x558c4b3f93f0 - std::panicking::begin_panic_handler::{{closure}}::h976246fb95d93c31
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:502:13
  12:     0x558c4b3f79a4 - std::sys_common::backtrace::__rust_end_short_backtrace::h38077ee5b7b9f99a
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:139:18
  13:     0x558c4b3f9359 - rust_begin_unwind
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:498:5
  14:     0x558c4a778911 - core::panicking::panic_fmt::h35f3a62252ba0fd2
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:107:14
  15:     0x558c4a7788d2 - core::panicking::panic_bounds_check::h00fd50079cb70ed9
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:75:5
  16:     0x558c4a9881e8 - core::slice::<impl [T]>::swap::h7e4626716e7f19fb
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/slice/mod.rs:564:18
  17:     0x558c4a9756b4 - librespot_connect::spirc::SpircTask::handle_frame::hcc1c8af5ce3f09f0
                               at /home/user/librespot/connect/src/spirc.rs:673:25
  18:     0x558c4a851c5e - librespot_connect::spirc::SpircTask::run::{{closure}}::h65e1c9a96a7e2630
                               at /home/user/librespot/connect/src/spirc.rs:340:36
  19:     0x558c4a8d032b - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h1f4d2778992cabc4
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  20:     0x558c4a79ca0a - <core::pin::Pin<P> as core::future::future::Future>::poll::h3663f80c7649cb92
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/future.rs:119:9
  21:     0x558c4a79b8a2 - <&mut F as core::future::future::Future>::poll::h51fc9c9af59f6843
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/future.rs:107:9
  22:     0x558c4a885f54 - librespot::main::{{closure}}::{{closure}}::hcfe8d98ec849fc1d
                               at /home/user/librespot/src/main.rs:926:25
  23:     0x558c4a8d065b - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h2b443cc6b4038ece
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  24:     0x558c4a886853 - librespot::main::{{closure}}::{{closure}}::hb0cbc9ddf3f0a779
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/macros/select.rs:505:49
  25:     0x558c4a825348 - <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll::h5b431917f1a69c3a
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/future/poll_fn.rs:38:9
  26:     0x558c4a888e4a - librespot::main::{{closure}}::hb906d6f6e2ce218d
                               at /home/user/librespot/src/main.rs:853:9
  27:     0x558c4a8d2dab - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hf7aad724b4fe2f48
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  28:     0x558c4a79c8aa - <core::pin::Pin<P> as core::future::future::Future>::poll::h119bfda10108f65a
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/future.rs:119:9
  29:     0x558c4a840580 - tokio::runtime::basic_scheduler::Inner<P>::block_on::{{closure}}::{{closure}}::h357eeb31b482792a
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/basic_scheduler.rs:208:62
  30:     0x558c4a81a2a0 - tokio::coop::with_budget::{{closure}}::h3dfe0a10c02b7e3a
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/coop.rs:106:9
  31:     0x558c4a79d638 - std::thread::local::LocalKey<T>::try_with::h2f5f8c0782989e0c
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/thread/local.rs:399:16
  32:     0x558c4a79d2cd - std::thread::local::LocalKey<T>::with::h43d2910bf919aeeb
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/thread/local.rs:375:9
  33:     0x558c4a83ffae - tokio::coop::with_budget::h33e073d21a1b1efc
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/coop.rs:99:5
  34:     0x558c4a83ffae - tokio::coop::budget::h097e458882fc7007
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/coop.rs:76:5
  35:     0x558c4a83ffae - tokio::runtime::basic_scheduler::Inner<P>::block_on::{{closure}}::h03172a3c3aa38d3a
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/basic_scheduler.rs:208:39
  36:     0x558c4a840f01 - tokio::runtime::basic_scheduler::enter::{{closure}}::hcf35e3550bc4e86d
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/basic_scheduler.rs:302:29
  37:     0x558c4a88f7f7 - tokio::macros::scoped_tls::ScopedKey<T>::set::h558c0f22c849c30e
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/macros/scoped_tls.rs:61:9
  38:     0x558c4a840e8c - tokio::runtime::basic_scheduler::enter::hd908efe474cd8286
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/basic_scheduler.rs:302:5
  39:     0x558c4a83fc5b - tokio::runtime::basic_scheduler::Inner<P>::block_on::h926b65bcd7ebf5cd
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/basic_scheduler.rs:197:9
  40:     0x558c4a840706 - tokio::runtime::basic_scheduler::InnerGuard<P>::block_on::h546c0699b06e22f1
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/basic_scheduler.rs:448:9
  41:     0x558c4a8407fc - tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on::h92bcaf0d242f8f44
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/basic_scheduler.rs:157:24
  42:     0x558c4a77f720 - tokio::runtime::Runtime::block_on::hbff57b9650174f6c
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/mod.rs:450:46
  43:     0x558c4a84f914 - librespot::main::hbd6281657b86055e
                               at /home/user/librespot/src/main.rs:992:5
  44:     0x558c4a78240b - core::ops::function::FnOnce::call_once::h73f33591669e7062
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/ops/function.rs:227:5
  45:     0x558c4a7f4c3e - std::sys_common::backtrace::__rust_begin_short_backtrace::h686fc881a7792fb9
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:123:18
  46:     0x558c4a8b0bf1 - std::rt::lang_start::{{closure}}::h9e434c1ab1b79b38
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:145:18
  47:     0x558c4b3f718b - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h7e688d7cdfeb7e00
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/ops/function.rs:259:13
  48:     0x558c4b3f718b - std::panicking::try::do_call::h4be824d2350b44c9
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:406:40
  49:     0x558c4b3f718b - std::panicking::try::h0a6fc7affbe5088d
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:370:19
  50:     0x558c4b3f718b - std::panic::catch_unwind::h22c320f732ec805e
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panic.rs:133:14
  51:     0x558c4b3f718b - std::rt::lang_start_internal::{{closure}}::hd38309c108fe679d
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:128:48
  52:     0x558c4b3f718b - std::panicking::try::do_call::h8fcaf501f097a28e
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:406:40
  53:     0x558c4b3f718b - std::panicking::try::h20e906825f98acc1
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:370:19
  54:     0x558c4b3f718b - std::panic::catch_unwind::h8c5234dc632124ef
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panic.rs:133:14
  55:     0x558c4b3f718b - std::rt::lang_start_internal::hc4dd8cd3ec4518c2
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:128:20
  56:     0x558c4a8b0bc0 - std::rt::lang_start::hb3f571bee0914a26
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:144:17
  57:     0x558c4a84f99c - main
  58:     0x7ffa5c2e0b25 - __libc_start_main
  59:     0x558c4a7790de - _start
  60:                0x0 - <unknown>

System Information

  • OS: Arch Linux
  • audio backend: rodio
  • librespot version: 0.3.1

Judging from the backtrace, the relevant part of the code seems to be here, specifically this line.

Let me know, if you need any further information. Maybe this issue is also already addressed in you current rewrite; if this is the case, feel free to close it.

Originally created by @eladyn on GitHub (Jan 31, 2022). Original GitHub issue: https://github.com/librespot-org/librespot/issues/959 *This issue was originally raised in https://github.com/Spotifyd/spotifyd/issues/1049, but I noticed that this also happens with `librespot 0.3.1`* # Steps to reproduce Very much inspired by those in the original issue, just a bit modified: 0. Get some API credentials and set the following environment variables: `SPOTIPY_CLIENT_ID` and `SPOTIPY_CLIENT_SECRET` and add the redirect URI `http://localhost:52413` in the API client settings 1. run librespot with `librespot -n "librespot-device" --username "$spotify_user" --password "$spotify_password"` 2. run the following python script (with the above set env variables): ```python3 import spotipy from spotipy.oauth2 import SpotifyOAuth scope = "user-read-playback-state,user-modify-playback-state" sp = spotipy.Spotify(auth_manager=SpotifyOAuth(scope=scope, redirect_uri="http://localhost:52413")) devices = sp.devices()["devices"] # type: ignore print("available devices:\n==================") for index, device in enumerate(devices): print(f"{index + 1}: {device['name']}") selection = int(input("\nSelect the device that you want activate shuffle for: ")) device_id = devices[selection - 1]["id"] sp.shuffle(state=True, device_id=device_id) ``` and choose the librespot device. 3. librespot will crash # Logs ``` [2022-01-31T18:19:10Z INFO librespot] librespot 0.3.1 c1ac4cb (Built on 2022-01-31, Build ID: GTh0jTQW, Profile: debug) [2022-01-31T18:19:10Z INFO librespot_core::session] Connecting to AP "ap-gew1.spotify.com:4070" [2022-01-31T18:19:10Z INFO librespot_core::session] Authenticated as "user" ! [2022-01-31T18:19:10Z INFO librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0) [2022-01-31T18:19:10Z INFO librespot_playback::convert] Converting with ditherer: tpdf [2022-01-31T18:19:10Z INFO librespot_playback::audio_backend::rodio] Using Rodio sink with format S16 and cpal host: ALSA [2022-01-31T18:19:10Z INFO librespot_playback::audio_backend::rodio] Using audio device: default [2022-01-31T18:19:10Z INFO librespot_core::session] Country: "DE" thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/slice/mod.rs:564:18 stack backtrace: 0: 0x558c4b3f74fc - std::backtrace_rs::backtrace::libunwind::trace::h09f7e4e089375279 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x558c4b3f74fc - std::backtrace_rs::backtrace::trace_unsynchronized::h1ec96f1c7087094e at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x558c4b3f74fc - std::sys_common::backtrace::_print_fmt::h317b71fc9a5cf964 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:67:5 3: 0x558c4b3f74fc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he3555b48e7dfe7f0 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:46:22 4: 0x558c4b41e4cc - core::fmt::write::h513b07ca38f4fb1b at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/fmt/mod.rs:1149:17 5: 0x558c4b3f0085 - std::io::Write::write_fmt::haf8c932b52111354 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/io/mod.rs:1697:15 6: 0x558c4b3f9260 - std::sys_common::backtrace::_print::h195c38364780a303 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:49:5 7: 0x558c4b3f9260 - std::sys_common::backtrace::print::hc09dfdea923b6730 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:36:9 8: 0x558c4b3f9260 - std::panicking::default_hook::{{closure}}::hb2e38ec0d91046a3 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:211:50 9: 0x558c4b3f8e15 - std::panicking::default_hook::h60284635b0ad54a8 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:228:9 10: 0x558c4b3f9914 - std::panicking::rust_panic_with_hook::ha677a669fb275654 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:606:17 11: 0x558c4b3f93f0 - std::panicking::begin_panic_handler::{{closure}}::h976246fb95d93c31 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:502:13 12: 0x558c4b3f79a4 - std::sys_common::backtrace::__rust_end_short_backtrace::h38077ee5b7b9f99a at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:139:18 13: 0x558c4b3f9359 - rust_begin_unwind at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:498:5 14: 0x558c4a778911 - core::panicking::panic_fmt::h35f3a62252ba0fd2 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:107:14 15: 0x558c4a7788d2 - core::panicking::panic_bounds_check::h00fd50079cb70ed9 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:75:5 16: 0x558c4a9881e8 - core::slice::<impl [T]>::swap::h7e4626716e7f19fb at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/slice/mod.rs:564:18 17: 0x558c4a9756b4 - librespot_connect::spirc::SpircTask::handle_frame::hcc1c8af5ce3f09f0 at /home/user/librespot/connect/src/spirc.rs:673:25 18: 0x558c4a851c5e - librespot_connect::spirc::SpircTask::run::{{closure}}::h65e1c9a96a7e2630 at /home/user/librespot/connect/src/spirc.rs:340:36 19: 0x558c4a8d032b - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h1f4d2778992cabc4 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19 20: 0x558c4a79ca0a - <core::pin::Pin<P> as core::future::future::Future>::poll::h3663f80c7649cb92 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/future.rs:119:9 21: 0x558c4a79b8a2 - <&mut F as core::future::future::Future>::poll::h51fc9c9af59f6843 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/future.rs:107:9 22: 0x558c4a885f54 - librespot::main::{{closure}}::{{closure}}::hcfe8d98ec849fc1d at /home/user/librespot/src/main.rs:926:25 23: 0x558c4a8d065b - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h2b443cc6b4038ece at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19 24: 0x558c4a886853 - librespot::main::{{closure}}::{{closure}}::hb0cbc9ddf3f0a779 at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/macros/select.rs:505:49 25: 0x558c4a825348 - <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll::h5b431917f1a69c3a at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/future/poll_fn.rs:38:9 26: 0x558c4a888e4a - librespot::main::{{closure}}::hb906d6f6e2ce218d at /home/user/librespot/src/main.rs:853:9 27: 0x558c4a8d2dab - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hf7aad724b4fe2f48 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19 28: 0x558c4a79c8aa - <core::pin::Pin<P> as core::future::future::Future>::poll::h119bfda10108f65a at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/future.rs:119:9 29: 0x558c4a840580 - tokio::runtime::basic_scheduler::Inner<P>::block_on::{{closure}}::{{closure}}::h357eeb31b482792a at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/basic_scheduler.rs:208:62 30: 0x558c4a81a2a0 - tokio::coop::with_budget::{{closure}}::h3dfe0a10c02b7e3a at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/coop.rs:106:9 31: 0x558c4a79d638 - std::thread::local::LocalKey<T>::try_with::h2f5f8c0782989e0c at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/thread/local.rs:399:16 32: 0x558c4a79d2cd - std::thread::local::LocalKey<T>::with::h43d2910bf919aeeb at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/thread/local.rs:375:9 33: 0x558c4a83ffae - tokio::coop::with_budget::h33e073d21a1b1efc at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/coop.rs:99:5 34: 0x558c4a83ffae - tokio::coop::budget::h097e458882fc7007 at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/coop.rs:76:5 35: 0x558c4a83ffae - tokio::runtime::basic_scheduler::Inner<P>::block_on::{{closure}}::h03172a3c3aa38d3a at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/basic_scheduler.rs:208:39 36: 0x558c4a840f01 - tokio::runtime::basic_scheduler::enter::{{closure}}::hcf35e3550bc4e86d at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/basic_scheduler.rs:302:29 37: 0x558c4a88f7f7 - tokio::macros::scoped_tls::ScopedKey<T>::set::h558c0f22c849c30e at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/macros/scoped_tls.rs:61:9 38: 0x558c4a840e8c - tokio::runtime::basic_scheduler::enter::hd908efe474cd8286 at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/basic_scheduler.rs:302:5 39: 0x558c4a83fc5b - tokio::runtime::basic_scheduler::Inner<P>::block_on::h926b65bcd7ebf5cd at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/basic_scheduler.rs:197:9 40: 0x558c4a840706 - tokio::runtime::basic_scheduler::InnerGuard<P>::block_on::h546c0699b06e22f1 at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/basic_scheduler.rs:448:9 41: 0x558c4a8407fc - tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on::h92bcaf0d242f8f44 at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/basic_scheduler.rs:157:24 42: 0x558c4a77f720 - tokio::runtime::Runtime::block_on::hbff57b9650174f6c at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/mod.rs:450:46 43: 0x558c4a84f914 - librespot::main::hbd6281657b86055e at /home/user/librespot/src/main.rs:992:5 44: 0x558c4a78240b - core::ops::function::FnOnce::call_once::h73f33591669e7062 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/ops/function.rs:227:5 45: 0x558c4a7f4c3e - std::sys_common::backtrace::__rust_begin_short_backtrace::h686fc881a7792fb9 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:123:18 46: 0x558c4a8b0bf1 - std::rt::lang_start::{{closure}}::h9e434c1ab1b79b38 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:145:18 47: 0x558c4b3f718b - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h7e688d7cdfeb7e00 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/ops/function.rs:259:13 48: 0x558c4b3f718b - std::panicking::try::do_call::h4be824d2350b44c9 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:406:40 49: 0x558c4b3f718b - std::panicking::try::h0a6fc7affbe5088d at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:370:19 50: 0x558c4b3f718b - std::panic::catch_unwind::h22c320f732ec805e at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panic.rs:133:14 51: 0x558c4b3f718b - std::rt::lang_start_internal::{{closure}}::hd38309c108fe679d at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:128:48 52: 0x558c4b3f718b - std::panicking::try::do_call::h8fcaf501f097a28e at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:406:40 53: 0x558c4b3f718b - std::panicking::try::h20e906825f98acc1 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:370:19 54: 0x558c4b3f718b - std::panic::catch_unwind::h8c5234dc632124ef at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panic.rs:133:14 55: 0x558c4b3f718b - std::rt::lang_start_internal::hc4dd8cd3ec4518c2 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:128:20 56: 0x558c4a8b0bc0 - std::rt::lang_start::hb3f571bee0914a26 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:144:17 57: 0x558c4a84f99c - main 58: 0x7ffa5c2e0b25 - __libc_start_main 59: 0x558c4a7790de - _start 60: 0x0 - <unknown> ``` # System Information - OS: Arch Linux - audio backend: rodio - librespot version: 0.3.1 Judging from the backtrace, the relevant part of the code seems to be [here](https://github.com/librespot-org/librespot/blob/f4be9bb85d68005a29490ff19738a4beb7bbd81e/connect/src/spirc.rs#L667-L685), specifically [this line](https://github.com/librespot-org/librespot/blob/f4be9bb85d68005a29490ff19738a4beb7bbd81e/connect/src/spirc.rs#L673). Let me know, if you need any further information. Maybe this issue is also already addressed in you current rewrite; if this is the case, feel free to close it.
kerem closed this issue 2026-02-27 19:30:47 +03:00
Author
Owner

@JasonLG1979 commented on GitHub (Feb 1, 2022):

Try that.

<!-- gh-comment-id:1026346314 --> @JasonLG1979 commented on GitHub (Feb 1, 2022): Try that.
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#467
No description provided.