[GH-ISSUE #359] raspbian buster: Stream drop error: PortAudio not initialized #236

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

Originally created by @patrickjane on GitHub (Aug 3, 2019).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/359

I have a working installation of librespot on my raspberry pi 3 running raspbian stretch. However I now got myself a raspberry pi 4 which is running raspbian buster.

I've successfully compiled librespot from source, however once I try playing a song it crashes:

spotify@raspberrypi:~/librespot.fixed2/target/release $ ./librespot -b 320 -n PiTify --initial-volume 70 --onevent /home/spotify/libreout
INFO:librespot: librespot 6a60059 (2019-03-13). Built on 2019-03-13. Build ID: Qg84Srb4
WARN:<unknown>: error sending packet Os { code: 99, kind: AddrNotAvailable, message: "Cannot assign requested address" }
INFO:librespot_core::session: Connecting to AP "gew1-accesspoint-a-ngcr.ap.spotify.com:4070"
INFO:librespot_core::session: Authenticated as "xxx" !
INFO:librespot_core::session: Country: "DE"
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5036:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5036:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib conf.c:5014:(snd_config_expand) Unknown parameters {AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2  CARD 0}
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM iec958:{AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2  CARD 0}
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
INFO:librespot_playback::player: Loading track "Moonstruck" with Spotify URI "spotify:track:67zeJe3fOwC04TFlHU4TNG"
INFO:librespot_playback::player: Track "Moonstruck" loaded
INFO:librespot::player_event_handler: Running ["/home/spotify/libreout"] with environment variables {"TRACK_ID": "67zeJe3fOwC04TFlHU4TNG", "PLAYER_EVENT": "start"}
thread 'main' panicked at 'program failed to start: Os { code: 8, kind: Other, message: "Exec format error" }', src/libcore/result.rs:1009:5
stack backtrace:
   0:   0x987aff - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h508e385542e74f0f
                       at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:   0x98216f - std::sys_common::backtrace::_print::h0654a4145b8e108e
                       at src/libstd/sys_common/backtrace.rs:71
   2:   0x986413 - std::panicking::default_hook::{{closure}}::h9d3b4aa9777cceab
                       at src/libstd/sys_common/backtrace.rs:59
                       at src/libstd/panicking.rs:211
   3:   0x986087 - std::panicking::default_hook::h54bc90cfc6073aee
                       at src/libstd/panicking.rs:227
   4:   0x986b83 - std::panicking::rust_panic_with_hook::h28b9ce6fa7a5033b
                       at src/libstd/panicking.rs:491
   5:   0x986703 - std::panicking::continue_panic_fmt::h4c221b9431554bc2
                       at src/libstd/panicking.rs:398
   6:   0x9865ef - rust_begin_unwind
                       at src/libstd/panicking.rs:325
   7:   0x999343 - core::panicking::panic_fmt::h4d67173bc68f6d5a
                       at src/libcore/panicking.rs:95
   8:   0x4d32e7 - core::result::unwrap_failed::haa011caead8937ad
   9:   0x4b9de7 - <librespot::Main as futures::future::Future>::poll::hc48ad312c05b050f
  10:   0x4c1727 - futures::task_impl::std::set::h9b5cc2ecbfcc69fb
  11:   0x4de80b - <futures::future::lazy::Lazy<F, R> as futures::future::Future>::poll::hda510c1028215ffa
  12:   0x4c15ab - futures::task_impl::std::set::h4ba8a7425cb2d22d
  13:   0x4c3e9b - <std::thread::local::LocalKey<T>>::with::h6a424d199bd253db
  14:   0x4d371f - <tokio_current_thread::Entered<'a, P>>::block_on::h6ff29c57c6a41cc2
  15:   0x4c43fb - <std::thread::local::LocalKey<T>>::with::hfd76a44bfe5e12e2
  16:   0x4c3fbb - <std::thread::local::LocalKey<T>>::with::h79476c715037ba06
  17:   0x4c419b - <std::thread::local::LocalKey<T>>::with::ha6330de9e8999fee
  18:   0x4c509f - <scoped_tls::ScopedKey<T>>::set::h78bc50143f904b91
  19:   0x4da58b - tokio_core::reactor::Core::run::ha6182105b6da08df
  20:   0x4bbc9b - librespot::main::h3515f3d669494a92
  21:   0x4bccab - std::rt::lang_start::{{closure}}::h3ebaf3999dfb2136
  22:   0x986567 - std::panicking::try::do_call::hf93a787b72e1d226
                       at src/libstd/rt.rs:59
                       at src/libstd/panicking.rs:310
  23:   0x9932fb - __rust_maybe_catch_panic
                       at src/libpanic_unwind/lib.rs:102
  24:   0x986ef7 - std::rt::lang_start_internal::h7b3bd8c78881c37d
                       at src/libstd/panicking.rs:289
                       at src/libstd/panic.rs:398
                       at src/libstd/rt.rs:58
  25:   0x4bc91b - main
  26: 0xb6d5d717 - __libc_start_main
Stream drop error: PortAudio not initialized
Segmentation fault

I've even tried copying over the binary from my raspberry pi 3, but its going to result in the same error.

What do I have to do?

Originally created by @patrickjane on GitHub (Aug 3, 2019). Original GitHub issue: https://github.com/librespot-org/librespot/issues/359 I have a working installation of librespot on my raspberry pi 3 running raspbian stretch. However I now got myself a raspberry pi 4 which is running raspbian buster. I've successfully compiled librespot from source, however once I try playing a song it crashes: ``` spotify@raspberrypi:~/librespot.fixed2/target/release $ ./librespot -b 320 -n PiTify --initial-volume 70 --onevent /home/spotify/libreout INFO:librespot: librespot 6a60059 (2019-03-13). Built on 2019-03-13. Build ID: Qg84Srb4 WARN:<unknown>: error sending packet Os { code: 99, kind: AddrNotAvailable, message: "Cannot assign requested address" } INFO:librespot_core::session: Connecting to AP "gew1-accesspoint-a-ngcr.ap.spotify.com:4070" INFO:librespot_core::session: Authenticated as "xxx" ! INFO:librespot_core::session: Country: "DE" ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21 ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21 ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40 ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41 ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50 ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51 ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71 ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device' ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5036:(snd_config_expand) Args evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device' ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5036:(snd_config_expand) Args evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback ALSA lib conf.c:5014:(snd_config_expand) Unknown parameters {AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2 CARD 0} ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM iec958:{AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2 CARD 0} ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card INFO:librespot_playback::player: Loading track "Moonstruck" with Spotify URI "spotify:track:67zeJe3fOwC04TFlHU4TNG" INFO:librespot_playback::player: Track "Moonstruck" loaded INFO:librespot::player_event_handler: Running ["/home/spotify/libreout"] with environment variables {"TRACK_ID": "67zeJe3fOwC04TFlHU4TNG", "PLAYER_EVENT": "start"} thread 'main' panicked at 'program failed to start: Os { code: 8, kind: Other, message: "Exec format error" }', src/libcore/result.rs:1009:5 stack backtrace: 0: 0x987aff - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h508e385542e74f0f at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: 0x98216f - std::sys_common::backtrace::_print::h0654a4145b8e108e at src/libstd/sys_common/backtrace.rs:71 2: 0x986413 - std::panicking::default_hook::{{closure}}::h9d3b4aa9777cceab at src/libstd/sys_common/backtrace.rs:59 at src/libstd/panicking.rs:211 3: 0x986087 - std::panicking::default_hook::h54bc90cfc6073aee at src/libstd/panicking.rs:227 4: 0x986b83 - std::panicking::rust_panic_with_hook::h28b9ce6fa7a5033b at src/libstd/panicking.rs:491 5: 0x986703 - std::panicking::continue_panic_fmt::h4c221b9431554bc2 at src/libstd/panicking.rs:398 6: 0x9865ef - rust_begin_unwind at src/libstd/panicking.rs:325 7: 0x999343 - core::panicking::panic_fmt::h4d67173bc68f6d5a at src/libcore/panicking.rs:95 8: 0x4d32e7 - core::result::unwrap_failed::haa011caead8937ad 9: 0x4b9de7 - <librespot::Main as futures::future::Future>::poll::hc48ad312c05b050f 10: 0x4c1727 - futures::task_impl::std::set::h9b5cc2ecbfcc69fb 11: 0x4de80b - <futures::future::lazy::Lazy<F, R> as futures::future::Future>::poll::hda510c1028215ffa 12: 0x4c15ab - futures::task_impl::std::set::h4ba8a7425cb2d22d 13: 0x4c3e9b - <std::thread::local::LocalKey<T>>::with::h6a424d199bd253db 14: 0x4d371f - <tokio_current_thread::Entered<'a, P>>::block_on::h6ff29c57c6a41cc2 15: 0x4c43fb - <std::thread::local::LocalKey<T>>::with::hfd76a44bfe5e12e2 16: 0x4c3fbb - <std::thread::local::LocalKey<T>>::with::h79476c715037ba06 17: 0x4c419b - <std::thread::local::LocalKey<T>>::with::ha6330de9e8999fee 18: 0x4c509f - <scoped_tls::ScopedKey<T>>::set::h78bc50143f904b91 19: 0x4da58b - tokio_core::reactor::Core::run::ha6182105b6da08df 20: 0x4bbc9b - librespot::main::h3515f3d669494a92 21: 0x4bccab - std::rt::lang_start::{{closure}}::h3ebaf3999dfb2136 22: 0x986567 - std::panicking::try::do_call::hf93a787b72e1d226 at src/libstd/rt.rs:59 at src/libstd/panicking.rs:310 23: 0x9932fb - __rust_maybe_catch_panic at src/libpanic_unwind/lib.rs:102 24: 0x986ef7 - std::rt::lang_start_internal::h7b3bd8c78881c37d at src/libstd/panicking.rs:289 at src/libstd/panic.rs:398 at src/libstd/rt.rs:58 25: 0x4bc91b - main 26: 0xb6d5d717 - __libc_start_main Stream drop error: PortAudio not initialized Segmentation fault ``` I've even tried copying over the binary from my raspberry pi 3, but its going to result in the same error. What do I have to do?
kerem closed this issue 2026-02-27 19:29:34 +03:00
Author
Owner

@Juanmcuello commented on GitHub (Aug 3, 2019):

It seems to me you don't have the right permissions to access alsa programs. Try running amixer and see what happens. If it doesn't work with a normal user but it works as root, it could probably be that. You can try running librespot as root to confirm that.

If that's the problem, you will have to give your user the right permissions or run librestpot as root (maybe through a systemd unit).

<!-- gh-comment-id:517933223 --> @Juanmcuello commented on GitHub (Aug 3, 2019): It seems to me you don't have the right permissions to access alsa programs. Try running `amixer` and see what happens. If it doesn't work with a normal user but it works as `root`, it could probably be that. You can try running librespot as `root` to confirm that. If that's the problem, you will have to give your user the right permissions or run librestpot as `root` (maybe through a `systemd` unit).
Author
Owner

@patrickjane commented on GitHub (Aug 3, 2019):

I was running librespot manually as user spotify. The user seems to have permission:

pi@raspberrypi:~ $ id spotify
uid=997(spotify) gid=993(spotify) groups=993(spotify),20(dialout),29(audio),999(spi),998(i2c),997(gpio)
pi@raspberrypi:~ $ sudo su - spotify
spotify@raspberrypi:~ $ amixer
Simple mixer control 'DSPVolume',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 255 [100%]
  Front Right: 255 [100%]
spotify@raspberrypi:~ $
<!-- gh-comment-id:517940923 --> @patrickjane commented on GitHub (Aug 3, 2019): I was running `librespot` manually as user `spotify`. The user seems to have permission: ``` pi@raspberrypi:~ $ id spotify uid=997(spotify) gid=993(spotify) groups=993(spotify),20(dialout),29(audio),999(spi),998(i2c),997(gpio) pi@raspberrypi:~ $ sudo su - spotify spotify@raspberrypi:~ $ amixer Simple mixer control 'DSPVolume',0 Capabilities: volume Playback channels: Front Left - Front Right Capture channels: Front Left - Front Right Limits: 0 - 255 Front Left: 255 [100%] Front Right: 255 [100%] spotify@raspberrypi:~ $ ```
Author
Owner

@patrickjane commented on GitHub (Aug 6, 2019):

Okay so I did a complete reinstall of the raspberry pi (for other reasons), now I have installed raspbian buster lite, and I have successfully compiled again librespot.

I still get a crash upon playback, but the error is different:

spotify@homepi:~/librespot/target/release $ ./librespot -b 320 -n PiTify --initial-volume 70 --onevent /home/spotify/libreout
[2019-08-06T19:50:06Z INFO  librespot] librespot 51a634d (2019-07-23). Built on 2019-08-06. Build ID: zqBcBON3
[2019-08-06T19:50:06Z WARN  mdns::fsm] error sending packet Os { code: 99, kind: AddrNotAvailable, message: "Cannot assign requested address" }
[2019-08-06T19:50:12Z INFO  librespot_core::session] Connecting to AP "gew1-accesspoint-a-zl64.ap.spotify.com:4070"
[2019-08-06T19:50:12Z INFO  librespot_core::session] Authenticated as "xxx" !
[2019-08-06T19:50:12Z INFO  librespot_core::session] Country: "DE"
[2019-08-06T19:50:12Z INFO  librespot_playback::player] Loading track "PUPPE" with Spotify URI "spotify:track:2iFgHPoa7FNHwgLnjXzu7F"
[2019-08-06T19:50:13Z INFO  librespot_playback::player] Track "PUPPE" loaded
[2019-08-06T19:50:13Z INFO  librespot::player_event_handler] Running ["/home/spotify/libreout"] with environment variables {"PLAYER_EVENT": "start", "TRACK_ID": "2iFgHPoa7FNHwgLnjXzu7F"}
thread 'main' panicked at 'program failed to start: Os { code: 8, kind: Other, message: "Exec format error" }', src/libcore/result.rs:999:5
stack backtrace:
   0:   0xa285bb - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::hf12a5fc553a70cb3
                       at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1:   0xa238db - std::sys_common::backtrace::_print::heba1367650a296de
                       at src/libstd/sys_common/backtrace.rs:71
   2:   0xa267af - std::panicking::default_hook::{{closure}}::h73b68f2f6101c35c
                       at src/libstd/sys_common/backtrace.rs:59
                       at src/libstd/panicking.rs:197
   3:   0xa2642f - std::panicking::default_hook::h37440a7db800dd3c
                       at src/libstd/panicking.rs:211
   4:   0xa26ed7 - std::panicking::rust_panic_with_hook::h2dfe4d5087d46577
                       at src/libstd/panicking.rs:474
   5:   0xa26a9b - std::panicking::continue_panic_fmt::hbd5a6a4e61657947
                       at src/libstd/panicking.rs:381
   6:   0xa26987 - rust_begin_unwind
                       at src/libstd/panicking.rs:308
   7:   0xa3bcaf - core::panicking::panic_fmt::hc4f83bfed80aeabd
                       at src/libcore/panicking.rs:85
   8:   0x551523 - core::result::unwrap_failed::hfe01ab92576658b9
   9:   0x535acf - <librespot::Main as futures::future::Future>::poll::h9bb5dc90e894b063
  10:   0x5456ef - futures::task_impl::std::set::hf9ed7d599f88a0c1
  11:   0x55962b - <futures::future::lazy::Lazy<F,R> as futures::future::Future>::poll::h28c2b164e2028084
  12:   0x54560b - futures::task_impl::std::set::h6c632506344ed161
  13:   0x5448d3 - std::thread::local::LocalKey<T>::with::h654aaf28ba137fcb
  14:   0x5445b3 - std::thread::local::LocalKey<T>::with::h519638aa9c0a548e
  15:   0x544caf - std::thread::local::LocalKey<T>::with::he07c97c343e3bd63
  16:   0x54175b - scoped_tls::ScopedKey<T>::set::ha6b17695300f7ed3
  17:   0x554c93 - tokio_core::reactor::Core::run::h5e971589c351d187
  18:   0x537d27 - librespot::main::h5c940630b5e75e67
  19:   0x54208b - std::rt::lang_start::{{closure}}::h6b8683984c6ad0c7
  20:   0xa268ff - std::panicking::try::do_call::hf0d794f61386f00a
                       at src/libstd/rt.rs:49
                       at src/libstd/panicking.rs:293
  21:   0xa2e35f - __rust_maybe_catch_panic
                       at src/libpanic_unwind/lib.rs:85
  22:   0xa27353 - std::rt::lang_start_internal::h2e68240ef81cd52f
                       at src/libstd/panicking.rs:272
                       at src/libstd/panic.rs:394
                       at src/libstd/rt.rs:48
  23:   0x538b4b - main
  24: 0xb6cd7717 - __libc_start_main
<!-- gh-comment-id:518820941 --> @patrickjane commented on GitHub (Aug 6, 2019): Okay so I did a complete reinstall of the raspberry pi (for other reasons), now I have installed raspbian buster lite, and I have successfully compiled again `librespot`. I still get a crash upon playback, but the error is different: ``` spotify@homepi:~/librespot/target/release $ ./librespot -b 320 -n PiTify --initial-volume 70 --onevent /home/spotify/libreout [2019-08-06T19:50:06Z INFO librespot] librespot 51a634d (2019-07-23). Built on 2019-08-06. Build ID: zqBcBON3 [2019-08-06T19:50:06Z WARN mdns::fsm] error sending packet Os { code: 99, kind: AddrNotAvailable, message: "Cannot assign requested address" } [2019-08-06T19:50:12Z INFO librespot_core::session] Connecting to AP "gew1-accesspoint-a-zl64.ap.spotify.com:4070" [2019-08-06T19:50:12Z INFO librespot_core::session] Authenticated as "xxx" ! [2019-08-06T19:50:12Z INFO librespot_core::session] Country: "DE" [2019-08-06T19:50:12Z INFO librespot_playback::player] Loading track "PUPPE" with Spotify URI "spotify:track:2iFgHPoa7FNHwgLnjXzu7F" [2019-08-06T19:50:13Z INFO librespot_playback::player] Track "PUPPE" loaded [2019-08-06T19:50:13Z INFO librespot::player_event_handler] Running ["/home/spotify/libreout"] with environment variables {"PLAYER_EVENT": "start", "TRACK_ID": "2iFgHPoa7FNHwgLnjXzu7F"} thread 'main' panicked at 'program failed to start: Os { code: 8, kind: Other, message: "Exec format error" }', src/libcore/result.rs:999:5 stack backtrace: 0: 0xa285bb - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::hf12a5fc553a70cb3 at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39 1: 0xa238db - std::sys_common::backtrace::_print::heba1367650a296de at src/libstd/sys_common/backtrace.rs:71 2: 0xa267af - std::panicking::default_hook::{{closure}}::h73b68f2f6101c35c at src/libstd/sys_common/backtrace.rs:59 at src/libstd/panicking.rs:197 3: 0xa2642f - std::panicking::default_hook::h37440a7db800dd3c at src/libstd/panicking.rs:211 4: 0xa26ed7 - std::panicking::rust_panic_with_hook::h2dfe4d5087d46577 at src/libstd/panicking.rs:474 5: 0xa26a9b - std::panicking::continue_panic_fmt::hbd5a6a4e61657947 at src/libstd/panicking.rs:381 6: 0xa26987 - rust_begin_unwind at src/libstd/panicking.rs:308 7: 0xa3bcaf - core::panicking::panic_fmt::hc4f83bfed80aeabd at src/libcore/panicking.rs:85 8: 0x551523 - core::result::unwrap_failed::hfe01ab92576658b9 9: 0x535acf - <librespot::Main as futures::future::Future>::poll::h9bb5dc90e894b063 10: 0x5456ef - futures::task_impl::std::set::hf9ed7d599f88a0c1 11: 0x55962b - <futures::future::lazy::Lazy<F,R> as futures::future::Future>::poll::h28c2b164e2028084 12: 0x54560b - futures::task_impl::std::set::h6c632506344ed161 13: 0x5448d3 - std::thread::local::LocalKey<T>::with::h654aaf28ba137fcb 14: 0x5445b3 - std::thread::local::LocalKey<T>::with::h519638aa9c0a548e 15: 0x544caf - std::thread::local::LocalKey<T>::with::he07c97c343e3bd63 16: 0x54175b - scoped_tls::ScopedKey<T>::set::ha6b17695300f7ed3 17: 0x554c93 - tokio_core::reactor::Core::run::h5e971589c351d187 18: 0x537d27 - librespot::main::h5c940630b5e75e67 19: 0x54208b - std::rt::lang_start::{{closure}}::h6b8683984c6ad0c7 20: 0xa268ff - std::panicking::try::do_call::hf0d794f61386f00a at src/libstd/rt.rs:49 at src/libstd/panicking.rs:293 21: 0xa2e35f - __rust_maybe_catch_panic at src/libpanic_unwind/lib.rs:85 22: 0xa27353 - std::rt::lang_start_internal::h2e68240ef81cd52f at src/libstd/panicking.rs:272 at src/libstd/panic.rs:394 at src/libstd/rt.rs:48 23: 0x538b4b - main 24: 0xb6cd7717 - __libc_start_main ```
Author
Owner

@patrickjane commented on GitHub (Aug 12, 2019):

Okay so I am a bit further, the above crash still occurs, however I noticed it is not about audio. The --onevent program is causing the issue. If I omit the --onevent parameter, I can play music just fine.

In my case, the program to execute (--onevent /home/spotify/libreout) is just a one-line script really:

spotify@homepi:~ $ cat libreout
/usr/bin/mosquitto_pub -h localhost -r -p 1883 -t ha/spotify/pitifyevent -m "{\"event\":\"$PLAYER_EVENT\"}"

I can execute the script just fine with the user also starting librespot:

spotify@homepi:~ $ /home/spotify/libreout
spotify@homepi:~ $

So its not about file access.

<!-- gh-comment-id:520543229 --> @patrickjane commented on GitHub (Aug 12, 2019): Okay so I am a bit further, the above crash still occurs, however I noticed it is _not_ about audio. The `--onevent` program is causing the issue. If I omit the `--onevent` parameter, I can play music just fine. In my case, the program to execute (`--onevent /home/spotify/libreout`) is just a one-line script really: ``` spotify@homepi:~ $ cat libreout /usr/bin/mosquitto_pub -h localhost -r -p 1883 -t ha/spotify/pitifyevent -m "{\"event\":\"$PLAYER_EVENT\"}" ``` I can execute the script just fine with the user also starting `librespot`: ``` spotify@homepi:~ $ /home/spotify/libreout spotify@homepi:~ $ ``` So its not about file access.
Author
Owner

@roderickvd commented on GitHub (May 24, 2021):

8973d29837 fixes it so that onevent program failures don't cause librespot to panic. It still must be something with your permissions however. Or maybe your script needs something like #!/usr/bin/env bash to work. Closing this for now.

<!-- gh-comment-id:847348894 --> @roderickvd commented on GitHub (May 24, 2021): 8973d298370e60a66e12bbc5375e9e72a3919f93 fixes it so that `onevent` program failures don't cause `librespot` to panic. It still must be something with your permissions however. Or maybe your script needs something like ` #!/usr/bin/env bash` to work. Closing this for now.
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#236
No description provided.