[GH-ISSUE #867] Memory allocation of 5404319552844632832 bytes failed on connection #437

Closed
opened 2026-02-27 19:30:36 +03:00 by kerem · 8 comments
Owner

Originally created by @pefoo on GitHub (Oct 20, 2021).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/867

Originally assigned to: @roderickvd on GitHub.

Hi,
as soon as i connect to my running librespot instance, I get the following output

[96]⤷ ./librespot -n A
[2021-10-20T20:35:56Z INFO  librespot] librespot 0.3.0 afbdd11 (Built on 2021-10-20, Build ID: t0DqFkRY)
[2021-10-20T20:36:12Z INFO  librespot_core::session] Connecting to AP "gew1-accesspoint-a-zkcn.ap.spotify.com:4070"
[2021-10-20T20:36:12Z INFO  librespot_core::session] Authenticated as "..." !
[2021-10-20T20:36:12Z INFO  librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0)
[2021-10-20T20:36:12Z INFO  librespot_playback::convert] Converting with ditherer: tpdf
[2021-10-20T20:36:12Z INFO  librespot_playback::audio_backend::rodio] Using Rodio sink with format S16 and cpal host: ALSA
[2021-10-20T20:36:12Z INFO  librespot_core::session] Country: "DE"
[2021-10-20T20:36:12Z INFO  librespot_playback::audio_backend::rodio] Using audio device: default
memory allocation of 5404319552844632832 bytes failed
Aborted

Using a self build version of the v0.3.0 tag

Device that runs librespot:

  • Odroid C2
  • Obviously not 5404319552844632832 bytes of memory (2 GB)
  • Amlogic ARM Cortex-A53(ARMv8) 1.5Ghz quad core CPU
  • Running Armbian (buster)

I am happy to answer questions or provide logs, if you point me to them ;)

meanwhile I will continue using v.0.1.6 which works just fine

Originally created by @pefoo on GitHub (Oct 20, 2021). Original GitHub issue: https://github.com/librespot-org/librespot/issues/867 Originally assigned to: @roderickvd on GitHub. Hi, as soon as i connect to my running librespot instance, I get the following output ``` [96]⤷ ./librespot -n A [2021-10-20T20:35:56Z INFO librespot] librespot 0.3.0 afbdd11 (Built on 2021-10-20, Build ID: t0DqFkRY) [2021-10-20T20:36:12Z INFO librespot_core::session] Connecting to AP "gew1-accesspoint-a-zkcn.ap.spotify.com:4070" [2021-10-20T20:36:12Z INFO librespot_core::session] Authenticated as "..." ! [2021-10-20T20:36:12Z INFO librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0) [2021-10-20T20:36:12Z INFO librespot_playback::convert] Converting with ditherer: tpdf [2021-10-20T20:36:12Z INFO librespot_playback::audio_backend::rodio] Using Rodio sink with format S16 and cpal host: ALSA [2021-10-20T20:36:12Z INFO librespot_core::session] Country: "DE" [2021-10-20T20:36:12Z INFO librespot_playback::audio_backend::rodio] Using audio device: default memory allocation of 5404319552844632832 bytes failed Aborted ``` Using a self build version of the v0.3.0 tag Device that runs librespot: - Odroid C2 - Obviously not 5404319552844632832 bytes of memory (2 GB) - Amlogic ARM Cortex-A53(ARMv8) 1.5Ghz quad core CPU - Running Armbian (buster) I am happy to answer questions or provide logs, if you point me to them ;) > meanwhile I will continue using v.0.1.6 which works just fine
Author
Owner

@roderickvd commented on GitHub (Oct 21, 2021):

Hey, thanks for the report. That's strange. The lowest-spec device that we target is a Raspberry Pi Zero with 512 MB RAM, and I know that worked fine for 0.2.0. Also it's requesting 5404319552 GB which makes no sense at all.

Couple of questions:

  1. Was this compiled with --release?
  2. Can you also compile without --release and provide a full stack trace with --verbose?
  3. Can you also try with 0.2.0?
  4. Which version of Rust are you using?
<!-- gh-comment-id:948322973 --> @roderickvd commented on GitHub (Oct 21, 2021): Hey, thanks for the report. That's strange. The lowest-spec device that we target is a Raspberry Pi Zero with 512 MB RAM, and I know that worked fine for `0.2.0`. Also it's requesting 5404319552 GB which makes no sense at all. Couple of questions: 1. Was this compiled with `--release`? 2. Can you *also* compile *without* `--release` and provide a full stack trace with `--verbose`? 3. Can you also try with `0.2.0`? 4. Which version of Rust are you using?
Author
Owner

@pefoo commented on GitHub (Oct 21, 2021):

Before reading the answers: I managed to solve the issue. It was (of course) my fault. More about this at the end of my post. Adding the answers for the sake of completion and later reference. (spoiler: alsa is no longer included in the default feature set, I use alsa)

  1. Was this compiles with --release?
    Yes it was
  2. Can you also compile without --release and provide a full stack trace with --verbose?
    Sure.
[126]⤷ ./librespot -n A --verbose                                                                                                                                                                                                                             
[2021-10-21T16:05:40Z INFO  librespot] librespot 0.3.0 afbdd11 (Built on 2021-10-21, Build ID: e07kdQUq)                                                                                                                                                      
[2021-10-21T16:05:40Z DEBUG librespot_playback::mixer::mappings] Volume control is now Log(60.0)                                                                                                                                                              
[2021-10-21T16:05:40Z DEBUG librespot_discovery::server] Zeroconf server listening on 0.0.0.0:35339                                                                                                                                                           
[2021-10-21T16:05:46Z DEBUG librespot_discovery::server] POST "/" {}                                                                                                                                                                                          
[2021-10-21T16:05:46Z INFO  librespot_core::session] Connecting to AP "gew1-accesspoint-a-1wqg.ap.spotify.com:4070"                                                                                                                                           
[2021-10-21T16:05:46Z INFO  librespot_core::session] Authenticated as "zx1ad2x8f5dw4nrmz4stdyvs1" !                                                                                                                                                           
[2021-10-21T16:05:46Z DEBUG librespot_core::session] new Session[0]                                                                                                                                                                                           
[2021-10-21T16:05:46Z INFO  librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0)                                                                                                                                           
[2021-10-21T16:05:46Z DEBUG librespot_connect::spirc] new Spirc[0]                                                                                                                                                                                            
[2021-10-21T16:05:46Z DEBUG librespot_connect::spirc] canonical_username: zx1ad2x8f5dw4nrmz4stdyvs1                                                                                                                                                           
[2021-10-21T16:05:46Z DEBUG librespot_playback::player] new Player[0]                                                                                                                                                                                         
[2021-10-21T16:05:46Z DEBUG librespot_core::mercury] new MercuryManager                                                                                                                                                                                       
[2021-10-21T16:05:46Z INFO  librespot_playback::convert] Converting with ditherer: tpdf                                                                                                                                                                       
[2021-10-21T16:05:46Z INFO  librespot_playback::audio_backend::rodio] Using Rodio sink with format S16 and cpal host: ALSA                                                                                                                                    
[2021-10-21T16:05:46Z INFO  librespot_playback::audio_backend::rodio] Using audio device: default                                                                                                                                                             
[2021-10-21T16:05:46Z DEBUG librespot_playback::mixer::mappings] Input volume 58958 mapped to: 49.99%                                                                                                                                                         
[2021-10-21T16:05:46Z DEBUG librespot_core::session] Session[0] strong=3 weak=2                                                                                                                                                                               
[2021-10-21T16:05:46Z INFO  librespot_core::session] Country: "DE"                                                                                                                                                                                            
thread 'cpal_alsa_out' panicked at 'attempt to multiply with overflow', /home/peepe/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.4/src/host/alsa/mod.rs[2021-10-21T16:05:47Z DEBUG librespot_playback::audio_backend::rodio] Rodio sink was creat
ed                                                                                                                                                                                                                                                            
:756:23                                                                                                                                                                                                                                                       
stack backtrace:                                                                                                                                                                                                                                              
[2021-10-21T16:05:47Z DEBUG librespot_playback::player] command=AddEventSender                                                                                                                                                                                
[2021-10-21T16:05:47Z DEBUG librespot_playback::player] command=VolumeSet(58958)                                                                                                                                                                              
[2021-10-21T16:05:47Z DEBUG librespot_core::mercury] subscribed uri=hm://remote/user/zx1ad2x8f5dw4nrmz4stdyvs1/ count=0                                                                                                                                       
[2021-10-21T16:05:47Z DEBUG librespot_connect::spirc] kMessageTypeNotify "xalafu" e15481f3ee8a6230f807af0bad33d57628a9ba6b 597291647 1634832347014 kPlayStatusStop                                                                                            
   0:     0xaaaac260e370 - std::backtrace_rs::backtrace::libunwind::trace::h6658a4c1f5ffb132                                                                                                                                                                  
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5                                                                                                             
   1:     0xaaaac260e370 - std::backtrace_rs::backtrace::trace_unsynchronized::he913a6bec8951b5b                                                                                                                                                              
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5                                                                                                                   
   2:     0xaaaac260e370 - std::sys_common::backtrace::_print_fmt::hd2d446f2bc5838d9                                                                                                                                                                          
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys_common/backtrace.rs:67:5                                                                                                                                
   3:     0xaaaac260e370 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h30a802452e901099                                                                                                                               
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys_common/backtrace.rs:46:22                                                                                                                               
   4:     0xaaaac262f8c0 - core::fmt::write::h1e7076081f5d227a                                                                                                                                                                                                
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/fmt/mod.rs:1115:17                                                                                                                                         
   5:     0xaaaac2608038 - std::io::Write::write_fmt::h71de4c7daee12ec0                                                                                                                                                                                       
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/io/mod.rs:1665:15                                                                                                                                           
   6:     0xaaaac26104e0 - std::sys_common::backtrace::_print::hc9944edaeee3102c                                                                                                                                                                              
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys_common/backtrace.rs:49:5                                                                                                                                
   7:     0xaaaac26104e0 - std::sys_common::backtrace::print::h7d1a986cfcd5d1cb                                                                                                                                                                               
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys_common/backtrace.rs:36:9                                                                                                                                
   8:     0xaaaac26104e0 - std::panicking::default_hook::{{closure}}::h877f193199a5907f                                                                                                                                                                       
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:208:50                                                                                                                                         
   9:     0xaaaac260fff8 - std::panicking::default_hook::h674b75c459d2f12e                                                                                                                                                                                    
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:225:9                                                                                                                                          
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:622:17                                                                                                                                         
  11:     0xaaaac2610644 - std::panicking::begin_panic_handler::{{closure}}::h2b260a024c6a4940                                                                                                                                                                
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:517:13                                                                                                                                         
  12:     0xaaaac260e80c - std::sys_common::backtrace::__rust_end_short_backtrace::h4a3581ecc15ae37e                                                                                                                                                          
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys_common/backtrace.rs:141:18                                                                                                                              
  13:     0xaaaac26105d8 - rust_begin_unwind                                                                                                                                                                                                                  
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:515:5                                                                                                                                          
  14:     0xaaaac1c28e2c - core::panicking::panic_fmt::hac686eeb0c0eea18                                                                                                                                                                                      
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/panicking.rs:92:14                                                                                                                                         
  15:     0xaaaac1c28db0 - core::panicking::panic::hcd8c614e1182c1dd                                                                                                                                                                                          
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/panicking.rs:50:5                                                                                                                                          
  16:     0xaaaac1f808d4 - cpal::host::alsa::poll_descriptors_and_prepare_buffer::h8d7d036013f6f9bf                                                                                                                                                           
                               at /home/peepe/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.4/src/host/alsa/mod.rs:756:23                                                                                                                         
  17:     0xaaaac1f7fdcc - cpal::host::alsa::output_stream_worker::h6c0d1a5e72da7c87                                                                                                                                                                          
                               at /home/peepe/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.4/src/host/alsa/mod.rs:615:13                                                                                                                         
  18:     0xaaaac1eed1b4 - cpal::host::alsa::Stream::new_output::{{closure}}::h190a60664a3306df                                                                                                                                                               
                               at /home/peepe/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.4/src/host/alsa/mod.rs:938:17                                                                                                                         
  19:     0xaaaac1eee074 - std::sys_common::backtrace::__rust_begin_short_backtrace::h2a33c77e66901ecd                                                                                                                                                        
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys_common/backtrace.rs:125:18                                                                                                                              
  20:     0xaaaac1f024b0 - std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}::hbe87faaea9f9f298                                                                                                                                                 
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/thread/mod.rs:476:17                                                                                                                                        
  21:     0xaaaac1ee6a28 - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h3e1b46e748a862df                                                                                                                                 
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panic.rs:347:9                                                                                                                                              
  22:     0xaaaac1eeeaac - std::panicking::try::do_call::h84c32b296f58c66a                                                                                                                                                                                    
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:401:40                                                                                                                                         
  23:     0xaaaac1eefc8c - __rust_try                                                                                                                                                                                                                         
  24:     0xaaaac1eee97c - std::panicking::try::haf344d3f8a87ef5a                                                                                                                                                                                             
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:365:19                                                                                                                                         
  25:     0xaaaac1ee706c - std::panic::catch_unwind::h81f98e81498d6caf                                                                                                                                                                                        
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panic.rs:434:14                                                                                                                                             
  26:     0xaaaac1f01e38 - std::thread::Builder::spawn_unchecked::{{closure}}::h060858ec88b645db                                                                                                                                                              
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/thread/mod.rs:475:30                                                                                                                                        
  27:     0xaaaac1ef07d0 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hb62251ed4de7f905                                                                                                                                                           
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/ops/function.rs:227:5                                                                                                                                      
  28:     0xaaaac2615df8 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::had83a1218fa626c7                                                                                                                                        
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/boxed.rs:1572:9                                                                                                                                           
  29:     0xaaaac2615df8 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd073a49df0d8e152                                                                                                                                        
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/boxed.rs:1572:9                                                                                                                                           
  30:     0xaaaac2615df8 - std::sys::unix::thread::Thread::new::thread_start::h55444bfce77241af                                                                                                                                                               
                               at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys/unix/thread.rs:74:17
  31:     0xffff8ddee7e4 - start_thread
  32:     0xffff8dc73adc - <unknown>
  33:                0x0 - <unknown>
[2021-10-21T16:05:47Z DEBUG librespot_connect::spirc] kMessageTypeLoad "xalafu" e15481f3ee8a6230f807af0bad33d57628a9ba6b 597291781 1634832347014 kPlayStatusPause
[2021-10-21T16:05:47Z DEBUG librespot_connect::spirc] State: context_uri: "spotify:playlist:5bTfzs5acFl3Z4UY2dvmHO" index: 0 position_ms: 25 status: kPlayStatusPause position_measured_at: 1634832347439 context_description: "" shuffle: true repeat: false 
playing_from_fallback: true row: 0 playing_track_index: 0 track {gid: "K\030j\225b\\H\202\233\363\0256\316\367I\322"} track {gid: "g\235\342\315Q\'F\227\204\360\346*\305\370y\022"} track {gid: "\355\n\331\363R\324J\341\226\323\322\276\234\237%{"} track {
gid: "(\332@\\:BH\243\241X\233\221\327W\321\221"} track {gid: "\371r]\243\017\242D\201\274\346\001\005\003Y4\346"} track {gid: "\023y\002G\031\303K\326\206\261j\003Y5\024H"} track {gid: " \020\332n-+H\330\232]\345w\027[ik"} track {gid: "\231\207\"c\200\3
56@m\236\317\223AfnY\256"} track {gid: "\360\324B$\226\317Ei\271\250\r\233\215\217\237\350"} track {gid: "P\004\222\3272\'C\252\216\330[\222\032\255^0"} track {gid: "\202\305\221\260h\321E\252\257\005\343k\000\373\275\254"} track {gid: "T\035:\210\275\02
3N\"\220\255\023lzJ\200\031"} track {gid: "$U\206X\262@O\016\270\246\016-O\263r\355"} track {gid: "9\203s\361/\276E\225\2601\342\254u[\\\352"} track {gid: "\230-\324rTKK\366\275\t\302I\212\347\226\010"} track {gid: "*\277\347\215\263QO1\267\220>3\355\373
\327\222"} track {gid: "d\255\226\300ZWL\370\214P3m\376Xz\255"} track {gid: "\353(\304~\310rF\265\2377!\204,\267\005\376"} track {gid: "fd\322_\201\301J\372\203}w\320[\204\021\227"} track {gid: "\267\354\035\207o\215J\204\252F\341[|\335=\000"} track {gid
: "\200\037\316\333v\202L}\222\326b\2450x\260\240"} track {gid: "\214\001BhrRG\331\233#\2717qO\024\346"} track {gid: "\3703\266\354mXJ\341\230\300B\334$\264\320\346"} track {gid: "\225\354Q\335\236\200K\271\256\"\321_\241\303\251o"} track {gid: "\347S\33
5\275\'\343M\231\240\001\322\223\003\005\007\000"} track {gid: ":\376\311\374\374QF\'\270\303^\353\366j\222\005"} track {gid: "\357.wX.#C\255\272\264o\252%\351\377\224"} track {gid: "\230\317\022d\223*D\264\223\305\302\310\252\346&t"} track {gid: ".b\344
\361\336.F~\233\315kx\305\334w\344"} track {gid: "\215@YM\370\261I\177\201%\214\316\0039/\213"} track {gid: "\373nM\221\377\353B(\252\210n`\232\004\243\243"} track {gid: "\032&6\231@4J\261\203@\236\304K\232\337\330"} track {gid: "\005\353\275\0323\010Md\
237\326\3525\237p\347\362"} track {gid: "\260\307\352\317\016\257J\010\251\227-\235O\226\3626"} track {gid: "\323\0210W\352\275I\031\244\370O\242[\375c\226"} track {gid: "K\203P\204\344\255Ai\203}\231L_\276x\250"} track {gid: "\310\236\250\263|\373HK\251
G\274r\0076\244\014"} track {gid: "b\257\266b\263\316AE\223\002\235X\351\310\323\364"} track {gid: "\202\246\272\227\356nB#\201z\376;\325\230\243\020"} track {gid: "\274\307\312H\031\342O\340\203z\025\3032\350\227\355"} track {gid: "@\020\2747u1H?\221\34
7Bk\263H\351\000"} track {gid: "\002\'d\314\002\352O\256\214\373`]6y_\363"} track {gid: "\024PON~6I\376\252d{\312\216\241Y$"} track {gid: "=\214\004@[\275F~\254i\371\315\026\325+\357"} track {gid: "\023\274\001\243\324\021GB\231z\374\272H^\211R"} track {
gid: "\002\234r\366\261UL<\251\244\203\310\337\026D~"} track {gid: "s\033\001\001\320\267Jh\222}\324\364\375YX\354"} track {gid: "\302!\351u\227\375C\245\213S(\273%\203\236\336"} track {gid: "\034\253\037\254\245nH5\251\312\350K\001\026\333}"} track {gid
: "\343-\243]-\225H\262\251\341\032w\365\365\345]"} track {gid: "/?\263\n\235SA\234\207j\321\006\037J1r"} track {gid: "\036\211Z\375\360wBg\267h[\324\277\014b\305"} track {gid: "\250\315S\277\302KA\027\251\341\377\023\265\t\303\225"} track {gid: "\001VW\
323\335\035L\216\225\221\02349\212\002\271"} track {gid: "\005Q\275\223\260\252B\341\251\262\242\231\245\357U\260"} track {gid: "-\250c\214v\371Eo\224\006\303\205\236x@\262"} track {gid: "?pv\016\032\376N=\216\2101\204\264\036\355r"} track {gid: "\3505\3
67\204%\262D\000\274\351\361&\347Z0v"} track {gid: "\227U\211v\257rL\326\230@\234iuQ\037\214"} track {gid: "Ms \332\337\324F\376\2739w\356n\312\244\030"} track {gid: "\311q6\341\035\024M\014\264$\313g\212\006:5"} track {gid: "E\027\312>\177\"Bi\262\335\3
51\253Aa\t\203"} track {gid: "\031g\372Vw\236H\031\240\351\371\301\301\320\240\352"} track {gid: "\345kY\177\'\355E\343\216\241\'\235\276Yj\275"} track {gid: "\322\302\025K\372\327L\303\274i~\272B\376n\320"} track {gid: "T\006\312S}\034Op\245\332D\344\t\
276\253\\"} track {gid: "\344\3073e\315,Ga\210\354\254d\205@\000p"} track {gid: "4\177\363t\364qO\t\2324\317QT\342\264\364"} track {gid: "\234\340\254\345\217\243M\254\251m\t\355\321\360y}"} track {gid: "\370,M6\376\256Mz\253J\234\367\355\'8\n"} track {g
id: "AC?*\255\330M\013\216G!\233\2764\246?"} track {gid: "\357dzj]\264C\357\237@x\216\341\000#\013"} track {gid: "\332\212\330c%\346D=\204\027\310\340-r\027t"} track {gid: "\317f9\245=\223J\326\267\026\001\007\335\tA\033"} track {gid: "\267\374=\327A\251
L\326\244T\324f\315[\371Y"} track {gid: "\305?\363\343j\226G\333\265\216\036FL\253\t\251"} track {gid: "\222ty\260r\007C\364\207\th[<\020L\355"} track {gid: "{\361L\007+ZL\024\276\345\233\340WP\372\202"} track {gid: "\006\'T\346\255\274K\235\221\277\225\
232$Y(\224"} track {gid: "\300\322>\3471\275D\330\263\370Y2\303\313d\000"} track {gid: "2\016\273\027\241\375I\247\252\030\003\362\336\242\264j"}
[2021-10-21T16:05:47Z DEBUG librespot_connect::spirc] Frame has 81 tracks
[2021-10-21T16:05:47Z DEBUG librespot_playback::player] command=SetAutoNormaliseAsAlbum(false)
[2021-10-21T16:05:47Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause]
[2021-10-21T16:05:47Z DEBUG librespot_playback::player] command=Load(SpotifyId { id: 99818876579328822590918708915774900690, audio_type: Track }, false, 25)
[2021-10-21T16:05:47Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause]
[2021-10-21T16:05:47Z INFO  librespot_playback::player] Loading <20 Jahre - Danke> with Spotify URI <spotify:track:2hHA8n93JB11YeXhxiF2ym>
[2021-10-21T16:05:47Z DEBUG librespot_audio::fetch] Downloading file b1899bd715c9318bb5ea56102175d6eefd584404
[2021-10-21T16:05:47Z DEBUG librespot_core::channel] new ChannelManager
[2021-10-21T16:05:47Z DEBUG librespot_core::audio_key] new AudioKeyManager
[2021-10-21T16:05:48Z INFO  librespot_playback::player] <20 Jahre - Danke> (232560 ms) loaded
[2021-10-21T16:05:48Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause]
[2021-10-21T16:05:48Z TRACE librespot_connect::spirc] ==> kPlayStatusPause
[2021-10-21T16:05:55Z DEBUG librespot_audio::fetch] File b1899bd715c9318bb5ea56102175d6eefd584404 complete, saving to cache
[2021-10-21T16:06:03Z DEBUG librespot_connect::spirc] kMessageTypePlay "xalafu" e15481f3ee8a6230f807af0bad33d57628a9ba6b 597307702 1634832348591 kPlayStatusPause
[2021-10-21T16:06:03Z DEBUG librespot_playback::mixer::mappings] Input volume 58958 mapped to: 49.99%
[2021-10-21T16:06:03Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay]
[2021-10-21T16:06:03Z DEBUG librespot_playback::player] command=VolumeSet(58958)
[2021-10-21T16:06:03Z DEBUG librespot_playback::player] command=Play
[2021-10-21T16:06:03Z TRACE librespot_playback::player] == Starting sink ==
[2021-10-21T16:06:03Z TRACE librespot_connect::spirc] ==> kPlayStatusPlay
[2021-10-21T16:06:03Z TRACE librespot_connect::spirc] ==> kPlayStatusPlay
[2021-10-21T16:06:09Z DEBUG librespot_connect::spirc] kMessageTypeNext "xalafu" e15481f3ee8a6230f807af0bad33d57628a9ba6b 597313913 1634832363161 kPlayStatusStop
[2021-10-21T16:06:09Z DEBUG librespot_connect::spirc] At track 1 of 81 <"spotify:playlist:5bTfzs5acFl3Z4UY2dvmHO"> update [false]
[2021-10-21T16:06:09Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay]
[2021-10-21T16:07:04Z DEBUG librespot_connect::spirc] kMessageTypeNotify "xalafu" e15481f3ee8a6230f807af0bad33d57628a9ba6b 597369103 1634832424470 kPlayStatusStop
[2021-10-21T16:07:05Z DEBUG librespot_connect::spirc] kMessageTypeNotify "xalafu" e15481f3ee8a6230f807af0bad33d57628a9ba6b 597370332 1634832425699 kPlayStatusPlay
[2021-10-21T16:07:06Z DEBUG librespot_connect::spirc] kMessageTypeNotify "xalafu" e15481f3ee8a6230f807af0bad33d57628a9ba6b 597371146 1634832426513 kPlayStatusPlay
^C[2021-10-21T16:07:08Z INFO  librespot] Gracefully shutting down
[2021-10-21T16:07:08Z DEBUG librespot_connect::spirc] drop Spirc[0]
[2021-10-21T16:07:08Z DEBUG librespot_playback::player] Shutting down player thread ...

  1. Can you also try with 0.2.0?
    I did. Some days after the tag was created. Same result. Since it was that new I decided to wait. I can try again if you really want me to.
  2. Which version of Rust are you using?
[111]⤷ rustc --version
rustc 1.55.0 (c8dfcfe04 2021-09-06)

Problem solution

Reading this output made me wonder why the Rodio sink was used. Reading the latest docs clearly state, that I have to compile it with --features alsa-backend and run with --backend alsa. Doing so solved my problem.

I apologize for the false report. Should have checked the docs between versions.

Keep up the great work and thank you.

<!-- gh-comment-id:948778200 --> @pefoo commented on GitHub (Oct 21, 2021): Before reading the answers: I managed to solve the issue. It was (of course) my fault. More about this at the end of my post. Adding the answers for the sake of completion and later reference. (spoiler: alsa is no longer included in the default feature set, I use alsa) 1. Was this compiles with ``--release``? Yes it was 2. Can you also compile without ``--release`` and provide a full stack trace with ``--verbose?`` Sure. ```bash [126]⤷ ./librespot -n A --verbose [2021-10-21T16:05:40Z INFO librespot] librespot 0.3.0 afbdd11 (Built on 2021-10-21, Build ID: e07kdQUq) [2021-10-21T16:05:40Z DEBUG librespot_playback::mixer::mappings] Volume control is now Log(60.0) [2021-10-21T16:05:40Z DEBUG librespot_discovery::server] Zeroconf server listening on 0.0.0.0:35339 [2021-10-21T16:05:46Z DEBUG librespot_discovery::server] POST "/" {} [2021-10-21T16:05:46Z INFO librespot_core::session] Connecting to AP "gew1-accesspoint-a-1wqg.ap.spotify.com:4070" [2021-10-21T16:05:46Z INFO librespot_core::session] Authenticated as "zx1ad2x8f5dw4nrmz4stdyvs1" ! [2021-10-21T16:05:46Z DEBUG librespot_core::session] new Session[0] [2021-10-21T16:05:46Z INFO librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0) [2021-10-21T16:05:46Z DEBUG librespot_connect::spirc] new Spirc[0] [2021-10-21T16:05:46Z DEBUG librespot_connect::spirc] canonical_username: zx1ad2x8f5dw4nrmz4stdyvs1 [2021-10-21T16:05:46Z DEBUG librespot_playback::player] new Player[0] [2021-10-21T16:05:46Z DEBUG librespot_core::mercury] new MercuryManager [2021-10-21T16:05:46Z INFO librespot_playback::convert] Converting with ditherer: tpdf [2021-10-21T16:05:46Z INFO librespot_playback::audio_backend::rodio] Using Rodio sink with format S16 and cpal host: ALSA [2021-10-21T16:05:46Z INFO librespot_playback::audio_backend::rodio] Using audio device: default [2021-10-21T16:05:46Z DEBUG librespot_playback::mixer::mappings] Input volume 58958 mapped to: 49.99% [2021-10-21T16:05:46Z DEBUG librespot_core::session] Session[0] strong=3 weak=2 [2021-10-21T16:05:46Z INFO librespot_core::session] Country: "DE" thread 'cpal_alsa_out' panicked at 'attempt to multiply with overflow', /home/peepe/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.4/src/host/alsa/mod.rs[2021-10-21T16:05:47Z DEBUG librespot_playback::audio_backend::rodio] Rodio sink was creat ed :756:23 stack backtrace: [2021-10-21T16:05:47Z DEBUG librespot_playback::player] command=AddEventSender [2021-10-21T16:05:47Z DEBUG librespot_playback::player] command=VolumeSet(58958) [2021-10-21T16:05:47Z DEBUG librespot_core::mercury] subscribed uri=hm://remote/user/zx1ad2x8f5dw4nrmz4stdyvs1/ count=0 [2021-10-21T16:05:47Z DEBUG librespot_connect::spirc] kMessageTypeNotify "xalafu" e15481f3ee8a6230f807af0bad33d57628a9ba6b 597291647 1634832347014 kPlayStatusStop 0: 0xaaaac260e370 - std::backtrace_rs::backtrace::libunwind::trace::h6658a4c1f5ffb132 at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5 1: 0xaaaac260e370 - std::backtrace_rs::backtrace::trace_unsynchronized::he913a6bec8951b5b at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0xaaaac260e370 - std::sys_common::backtrace::_print_fmt::hd2d446f2bc5838d9 at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys_common/backtrace.rs:67:5 3: 0xaaaac260e370 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h30a802452e901099 at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys_common/backtrace.rs:46:22 4: 0xaaaac262f8c0 - core::fmt::write::h1e7076081f5d227a at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/fmt/mod.rs:1115:17 5: 0xaaaac2608038 - std::io::Write::write_fmt::h71de4c7daee12ec0 at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/io/mod.rs:1665:15 6: 0xaaaac26104e0 - std::sys_common::backtrace::_print::hc9944edaeee3102c at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys_common/backtrace.rs:49:5 7: 0xaaaac26104e0 - std::sys_common::backtrace::print::h7d1a986cfcd5d1cb at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys_common/backtrace.rs:36:9 8: 0xaaaac26104e0 - std::panicking::default_hook::{{closure}}::h877f193199a5907f at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:208:50 9: 0xaaaac260fff8 - std::panicking::default_hook::h674b75c459d2f12e at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:225:9 at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:622:17 11: 0xaaaac2610644 - std::panicking::begin_panic_handler::{{closure}}::h2b260a024c6a4940 at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:517:13 12: 0xaaaac260e80c - std::sys_common::backtrace::__rust_end_short_backtrace::h4a3581ecc15ae37e at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys_common/backtrace.rs:141:18 13: 0xaaaac26105d8 - rust_begin_unwind at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:515:5 14: 0xaaaac1c28e2c - core::panicking::panic_fmt::hac686eeb0c0eea18 at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/panicking.rs:92:14 15: 0xaaaac1c28db0 - core::panicking::panic::hcd8c614e1182c1dd at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/panicking.rs:50:5 16: 0xaaaac1f808d4 - cpal::host::alsa::poll_descriptors_and_prepare_buffer::h8d7d036013f6f9bf at /home/peepe/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.4/src/host/alsa/mod.rs:756:23 17: 0xaaaac1f7fdcc - cpal::host::alsa::output_stream_worker::h6c0d1a5e72da7c87 at /home/peepe/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.4/src/host/alsa/mod.rs:615:13 18: 0xaaaac1eed1b4 - cpal::host::alsa::Stream::new_output::{{closure}}::h190a60664a3306df at /home/peepe/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.4/src/host/alsa/mod.rs:938:17 19: 0xaaaac1eee074 - std::sys_common::backtrace::__rust_begin_short_backtrace::h2a33c77e66901ecd at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys_common/backtrace.rs:125:18 20: 0xaaaac1f024b0 - std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}::hbe87faaea9f9f298 at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/thread/mod.rs:476:17 21: 0xaaaac1ee6a28 - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h3e1b46e748a862df at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panic.rs:347:9 22: 0xaaaac1eeeaac - std::panicking::try::do_call::h84c32b296f58c66a at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:401:40 23: 0xaaaac1eefc8c - __rust_try 24: 0xaaaac1eee97c - std::panicking::try::haf344d3f8a87ef5a at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:365:19 25: 0xaaaac1ee706c - std::panic::catch_unwind::h81f98e81498d6caf at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panic.rs:434:14 26: 0xaaaac1f01e38 - std::thread::Builder::spawn_unchecked::{{closure}}::h060858ec88b645db at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/thread/mod.rs:475:30 27: 0xaaaac1ef07d0 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hb62251ed4de7f905 at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/ops/function.rs:227:5 28: 0xaaaac2615df8 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::had83a1218fa626c7 at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/boxed.rs:1572:9 29: 0xaaaac2615df8 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd073a49df0d8e152 at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/boxed.rs:1572:9 30: 0xaaaac2615df8 - std::sys::unix::thread::Thread::new::thread_start::h55444bfce77241af at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys/unix/thread.rs:74:17 31: 0xffff8ddee7e4 - start_thread 32: 0xffff8dc73adc - <unknown> 33: 0x0 - <unknown> [2021-10-21T16:05:47Z DEBUG librespot_connect::spirc] kMessageTypeLoad "xalafu" e15481f3ee8a6230f807af0bad33d57628a9ba6b 597291781 1634832347014 kPlayStatusPause [2021-10-21T16:05:47Z DEBUG librespot_connect::spirc] State: context_uri: "spotify:playlist:5bTfzs5acFl3Z4UY2dvmHO" index: 0 position_ms: 25 status: kPlayStatusPause position_measured_at: 1634832347439 context_description: "" shuffle: true repeat: false playing_from_fallback: true row: 0 playing_track_index: 0 track {gid: "K\030j\225b\\H\202\233\363\0256\316\367I\322"} track {gid: "g\235\342\315Q\'F\227\204\360\346*\305\370y\022"} track {gid: "\355\n\331\363R\324J\341\226\323\322\276\234\237%{"} track { gid: "(\332@\\:BH\243\241X\233\221\327W\321\221"} track {gid: "\371r]\243\017\242D\201\274\346\001\005\003Y4\346"} track {gid: "\023y\002G\031\303K\326\206\261j\003Y5\024H"} track {gid: " \020\332n-+H\330\232]\345w\027[ik"} track {gid: "\231\207\"c\200\3 56@m\236\317\223AfnY\256"} track {gid: "\360\324B$\226\317Ei\271\250\r\233\215\217\237\350"} track {gid: "P\004\222\3272\'C\252\216\330[\222\032\255^0"} track {gid: "\202\305\221\260h\321E\252\257\005\343k\000\373\275\254"} track {gid: "T\035:\210\275\02 3N\"\220\255\023lzJ\200\031"} track {gid: "$U\206X\262@O\016\270\246\016-O\263r\355"} track {gid: "9\203s\361/\276E\225\2601\342\254u[\\\352"} track {gid: "\230-\324rTKK\366\275\t\302I\212\347\226\010"} track {gid: "*\277\347\215\263QO1\267\220>3\355\373 \327\222"} track {gid: "d\255\226\300ZWL\370\214P3m\376Xz\255"} track {gid: "\353(\304~\310rF\265\2377!\204,\267\005\376"} track {gid: "fd\322_\201\301J\372\203}w\320[\204\021\227"} track {gid: "\267\354\035\207o\215J\204\252F\341[|\335=\000"} track {gid : "\200\037\316\333v\202L}\222\326b\2450x\260\240"} track {gid: "\214\001BhrRG\331\233#\2717qO\024\346"} track {gid: "\3703\266\354mXJ\341\230\300B\334$\264\320\346"} track {gid: "\225\354Q\335\236\200K\271\256\"\321_\241\303\251o"} track {gid: "\347S\33 5\275\'\343M\231\240\001\322\223\003\005\007\000"} track {gid: ":\376\311\374\374QF\'\270\303^\353\366j\222\005"} track {gid: "\357.wX.#C\255\272\264o\252%\351\377\224"} track {gid: "\230\317\022d\223*D\264\223\305\302\310\252\346&t"} track {gid: ".b\344 \361\336.F~\233\315kx\305\334w\344"} track {gid: "\215@YM\370\261I\177\201%\214\316\0039/\213"} track {gid: "\373nM\221\377\353B(\252\210n`\232\004\243\243"} track {gid: "\032&6\231@4J\261\203@\236\304K\232\337\330"} track {gid: "\005\353\275\0323\010Md\ 237\326\3525\237p\347\362"} track {gid: "\260\307\352\317\016\257J\010\251\227-\235O\226\3626"} track {gid: "\323\0210W\352\275I\031\244\370O\242[\375c\226"} track {gid: "K\203P\204\344\255Ai\203}\231L_\276x\250"} track {gid: "\310\236\250\263|\373HK\251 G\274r\0076\244\014"} track {gid: "b\257\266b\263\316AE\223\002\235X\351\310\323\364"} track {gid: "\202\246\272\227\356nB#\201z\376;\325\230\243\020"} track {gid: "\274\307\312H\031\342O\340\203z\025\3032\350\227\355"} track {gid: "@\020\2747u1H?\221\34 7Bk\263H\351\000"} track {gid: "\002\'d\314\002\352O\256\214\373`]6y_\363"} track {gid: "\024PON~6I\376\252d{\312\216\241Y$"} track {gid: "=\214\004@[\275F~\254i\371\315\026\325+\357"} track {gid: "\023\274\001\243\324\021GB\231z\374\272H^\211R"} track { gid: "\002\234r\366\261UL<\251\244\203\310\337\026D~"} track {gid: "s\033\001\001\320\267Jh\222}\324\364\375YX\354"} track {gid: "\302!\351u\227\375C\245\213S(\273%\203\236\336"} track {gid: "\034\253\037\254\245nH5\251\312\350K\001\026\333}"} track {gid : "\343-\243]-\225H\262\251\341\032w\365\365\345]"} track {gid: "/?\263\n\235SA\234\207j\321\006\037J1r"} track {gid: "\036\211Z\375\360wBg\267h[\324\277\014b\305"} track {gid: "\250\315S\277\302KA\027\251\341\377\023\265\t\303\225"} track {gid: "\001VW\ 323\335\035L\216\225\221\02349\212\002\271"} track {gid: "\005Q\275\223\260\252B\341\251\262\242\231\245\357U\260"} track {gid: "-\250c\214v\371Eo\224\006\303\205\236x@\262"} track {gid: "?pv\016\032\376N=\216\2101\204\264\036\355r"} track {gid: "\3505\3 67\204%\262D\000\274\351\361&\347Z0v"} track {gid: "\227U\211v\257rL\326\230@\234iuQ\037\214"} track {gid: "Ms \332\337\324F\376\2739w\356n\312\244\030"} track {gid: "\311q6\341\035\024M\014\264$\313g\212\006:5"} track {gid: "E\027\312>\177\"Bi\262\335\3 51\253Aa\t\203"} track {gid: "\031g\372Vw\236H\031\240\351\371\301\301\320\240\352"} track {gid: "\345kY\177\'\355E\343\216\241\'\235\276Yj\275"} track {gid: "\322\302\025K\372\327L\303\274i~\272B\376n\320"} track {gid: "T\006\312S}\034Op\245\332D\344\t\ 276\253\\"} track {gid: "\344\3073e\315,Ga\210\354\254d\205@\000p"} track {gid: "4\177\363t\364qO\t\2324\317QT\342\264\364"} track {gid: "\234\340\254\345\217\243M\254\251m\t\355\321\360y}"} track {gid: "\370,M6\376\256Mz\253J\234\367\355\'8\n"} track {g id: "AC?*\255\330M\013\216G!\233\2764\246?"} track {gid: "\357dzj]\264C\357\237@x\216\341\000#\013"} track {gid: "\332\212\330c%\346D=\204\027\310\340-r\027t"} track {gid: "\317f9\245=\223J\326\267\026\001\007\335\tA\033"} track {gid: "\267\374=\327A\251 L\326\244T\324f\315[\371Y"} track {gid: "\305?\363\343j\226G\333\265\216\036FL\253\t\251"} track {gid: "\222ty\260r\007C\364\207\th[<\020L\355"} track {gid: "{\361L\007+ZL\024\276\345\233\340WP\372\202"} track {gid: "\006\'T\346\255\274K\235\221\277\225\ 232$Y(\224"} track {gid: "\300\322>\3471\275D\330\263\370Y2\303\313d\000"} track {gid: "2\016\273\027\241\375I\247\252\030\003\362\336\242\264j"} [2021-10-21T16:05:47Z DEBUG librespot_connect::spirc] Frame has 81 tracks [2021-10-21T16:05:47Z DEBUG librespot_playback::player] command=SetAutoNormaliseAsAlbum(false) [2021-10-21T16:05:47Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause] [2021-10-21T16:05:47Z DEBUG librespot_playback::player] command=Load(SpotifyId { id: 99818876579328822590918708915774900690, audio_type: Track }, false, 25) [2021-10-21T16:05:47Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause] [2021-10-21T16:05:47Z INFO librespot_playback::player] Loading <20 Jahre - Danke> with Spotify URI <spotify:track:2hHA8n93JB11YeXhxiF2ym> [2021-10-21T16:05:47Z DEBUG librespot_audio::fetch] Downloading file b1899bd715c9318bb5ea56102175d6eefd584404 [2021-10-21T16:05:47Z DEBUG librespot_core::channel] new ChannelManager [2021-10-21T16:05:47Z DEBUG librespot_core::audio_key] new AudioKeyManager [2021-10-21T16:05:48Z INFO librespot_playback::player] <20 Jahre - Danke> (232560 ms) loaded [2021-10-21T16:05:48Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause] [2021-10-21T16:05:48Z TRACE librespot_connect::spirc] ==> kPlayStatusPause [2021-10-21T16:05:55Z DEBUG librespot_audio::fetch] File b1899bd715c9318bb5ea56102175d6eefd584404 complete, saving to cache [2021-10-21T16:06:03Z DEBUG librespot_connect::spirc] kMessageTypePlay "xalafu" e15481f3ee8a6230f807af0bad33d57628a9ba6b 597307702 1634832348591 kPlayStatusPause [2021-10-21T16:06:03Z DEBUG librespot_playback::mixer::mappings] Input volume 58958 mapped to: 49.99% [2021-10-21T16:06:03Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay] [2021-10-21T16:06:03Z DEBUG librespot_playback::player] command=VolumeSet(58958) [2021-10-21T16:06:03Z DEBUG librespot_playback::player] command=Play [2021-10-21T16:06:03Z TRACE librespot_playback::player] == Starting sink == [2021-10-21T16:06:03Z TRACE librespot_connect::spirc] ==> kPlayStatusPlay [2021-10-21T16:06:03Z TRACE librespot_connect::spirc] ==> kPlayStatusPlay [2021-10-21T16:06:09Z DEBUG librespot_connect::spirc] kMessageTypeNext "xalafu" e15481f3ee8a6230f807af0bad33d57628a9ba6b 597313913 1634832363161 kPlayStatusStop [2021-10-21T16:06:09Z DEBUG librespot_connect::spirc] At track 1 of 81 <"spotify:playlist:5bTfzs5acFl3Z4UY2dvmHO"> update [false] [2021-10-21T16:06:09Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay] [2021-10-21T16:07:04Z DEBUG librespot_connect::spirc] kMessageTypeNotify "xalafu" e15481f3ee8a6230f807af0bad33d57628a9ba6b 597369103 1634832424470 kPlayStatusStop [2021-10-21T16:07:05Z DEBUG librespot_connect::spirc] kMessageTypeNotify "xalafu" e15481f3ee8a6230f807af0bad33d57628a9ba6b 597370332 1634832425699 kPlayStatusPlay [2021-10-21T16:07:06Z DEBUG librespot_connect::spirc] kMessageTypeNotify "xalafu" e15481f3ee8a6230f807af0bad33d57628a9ba6b 597371146 1634832426513 kPlayStatusPlay ^C[2021-10-21T16:07:08Z INFO librespot] Gracefully shutting down [2021-10-21T16:07:08Z DEBUG librespot_connect::spirc] drop Spirc[0] [2021-10-21T16:07:08Z DEBUG librespot_playback::player] Shutting down player thread ... ``` 3. Can you also try with ``0.2.0``? I did. Some days after the tag was created. Same result. Since it was that new I decided to wait. I can try **again** if you really want me to. 4. Which version of Rust are you using? ```bash [111]⤷ rustc --version rustc 1.55.0 (c8dfcfe04 2021-09-06) ``` # Problem solution Reading this output made me wonder why the Rodio sink was used. Reading the latest docs clearly state, that I have to compile it with ``--features alsa-backend`` and run with ``--backend alsa``. Doing so solved my problem. I apologize for the false report. Should have checked the docs between versions. Keep up the great work and thank you.
Author
Owner

@roderickvd commented on GitHub (Oct 21, 2021):

Great that it's working for you. If I understand correctly however, it fails when using Rodio? It shouldn't, but I can't reproduce it on my RPi 3B+.

<!-- gh-comment-id:948793928 --> @roderickvd commented on GitHub (Oct 21, 2021): Great that it's working for you. If I understand correctly however, it fails when using Rodio? It shouldn't, but I can't reproduce it on my RPi 3B+.
Author
Owner

@pefoo commented on GitHub (Oct 21, 2021):

Yes that is right. It fails when it is using rodio and is compiled without the alsa feature.

If you are interested, my install / build setup is as follows (taken from my wiki, thats why in the 'execute this to get your setup done' notation) :

aplay -l

#Sample output:
**** List of PLAYBACK Hardware Devices ****
card 0: ODROIDHDMI [ODROID-HDMI], device 0: I2S dit-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
# This is the device I am actually using
card 1: UAC3553B [UAC3553B], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

sudo tee -a /etc/asound.conf > /dev/null <<EOT
defaults.pcm.card 1
defaults.ctl.card 1
EOT

sudo apt-get install build-essential libasound2-dev curl pkg-config
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env

# clone and build as mentioned earlier
<!-- gh-comment-id:948814515 --> @pefoo commented on GitHub (Oct 21, 2021): Yes that is right. It fails when it is using rodio and is compiled without the alsa feature. If you are interested, my install / build setup is as follows (taken from my wiki, thats why in the 'execute this to get your setup done' notation) : ```bash aplay -l #Sample output: **** List of PLAYBACK Hardware Devices **** card 0: ODROIDHDMI [ODROID-HDMI], device 0: I2S dit-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 # This is the device I am actually using card 1: UAC3553B [UAC3553B], device 0: USB Audio [USB Audio] Subdevices: 0/1 Subdevice #0: subdevice #0 sudo tee -a /etc/asound.conf > /dev/null <<EOT defaults.pcm.card 1 defaults.ctl.card 1 EOT sudo apt-get install build-essential libasound2-dev curl pkg-config curl https://sh.rustup.rs -sSf | sh source $HOME/.cargo/env # clone and build as mentioned earlier ```
Author
Owner

@roderickvd commented on GitHub (Oct 21, 2021):

Looks like an issue in cpal and related to https://github.com/RustAudio/cpal/issues/591.

<!-- gh-comment-id:949013124 --> @roderickvd commented on GitHub (Oct 21, 2021): Looks like an issue in `cpal` and related to https://github.com/RustAudio/cpal/issues/591.
Author
Owner

@AndreKR commented on GitHub (Mar 27, 2022):

I came here because I was running into the same issue on a Pi 4.

I don't understand the issue though... Rodio is the default but it is deprecated and we're supposed to compile and run with the ALSA backend now or what? Where does it say that?

<!-- gh-comment-id:1080044983 --> @AndreKR commented on GitHub (Mar 27, 2022): I came here because I was running into the same issue on a Pi 4. I don't understand the issue though... Rodio is the default but it is deprecated and we're supposed to compile and run with the ALSA backend now or what? Where does it say that?
Author
Owner

@roderickvd commented on GitHub (Apr 7, 2022):

No one said Rodio is deprecated.

Rodio is the default backend because in 99% of the cases it provides an out-of-the-box experience. Where it doesn't and/or you want the best possible performance, Alsa is the most bare metal backend on Linux that we support.

<!-- gh-comment-id:1092128029 --> @roderickvd commented on GitHub (Apr 7, 2022): No one said Rodio is deprecated. Rodio is the default backend because in 99% of the cases it provides an out-of-the-box experience. Where it doesn't and/or you want the best possible performance, Alsa is the most bare metal backend on Linux that we support.
Author
Owner

@AndreKR commented on GitHub (Apr 7, 2022):

I managed to solve the issue. It was (of course) my fault.
Reading the latest docs clearly state, that I have to compile it with --features alsa-backend and run with --backend alsa. Doing so solved my problem.

I didn't see those docs that say I have to compile and run it with ALSA, but in fact I got the same error and in fact compiling and running it with ALSA solved it for me as well.

<!-- gh-comment-id:1092226882 --> @AndreKR commented on GitHub (Apr 7, 2022): > I managed to solve the issue. It was (of course) my fault. > Reading the latest docs clearly state, that I have to compile it with --features alsa-backend and run with --backend alsa. Doing so solved my problem. I didn't see those docs that say I have to compile and run it with ALSA, but in fact I got the same error and in fact compiling and running it with ALSA solved it for me as well.
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#437
No description provided.