philippe44 / SpotConnect

Turn any UPnP or AirPlay player into a Spotify Connect device
MIT License
77 stars 3 forks source link

spotraop quit with no obvious error #12

Closed nano9g closed 1 year ago

nano9g commented 1 year ago

For testing I'm running spotraop 0.1.2 in interactive mode and it just quit during streaming to my HomePod without any clear reason I can see. Here's the end of the log:

TrackQueue.cpp:161: trackInfo.restriction.size() = 1
D TrackQueue.cpp:212: File format: 2
D TrackQueue.cpp:212: File format: 1
D TrackQueue.cpp:212: File format: 0
I MercurySession.cpp:42: Received packet, command: 178
D MercurySession.cpp:174: Received mercury packet
I MercurySession.cpp:42: Received packet, command: 13
I TrackQueue.cpp:252: Got audio key
I TrackQueue.cpp:275: Received access key, fetching CDN URL...
I MercurySession.cpp:42: Received packet, command: 181
I MercurySession.cpp:42: Received packet, command: 181
I MercurySession.cpp:42: Received packet, command: 178
D MercurySession.cpp:174: Received mercury packet
I TrackQueue.cpp:301: Received CDN URL, https://audio-fa.scdn.co/audio/9b953fc565935f5306780631c065f546588d717c?1690662300_mpvBnukEEDHF9EaYGYG7t-0LE1ChaL81d557BtkQbSQ=
D spotify.cpp:416: keepAlive Kitchen HomePod
[16:25:08.776745] raopcl_send_chunk:588 [0x7f84014b20]: check n:2653761448 p:2653762675 ts:74554397576403 sn:65293
               retr: 0, avail: 0, send: 0, select: 0)
D spotify.cpp:416: keepAlive Kitchen HomePod
[16:25:18.790625] raopcl_send_chunk:588 [0x7f84014b20]: check n:2653771462 p:2653772677 ts:74554398017459 sn:1010
               retr: 0, avail: 0, send: 0, select: 0)
[16:25:25.609548] UpdateDevices:318 [0xa56e10]: removing renderer (dev[device ID]) on timeout
I spotify.cpp:445: terminating player Office Cone
I spotify.cpp:119: player <Office Cone> deletion pending
I spotify.cpp:125: done
Segmentation fault

In case it's relevant, here's my config file (there are some other devices but I have them disabled):

<?xml version="1.0"?>
<spotraop>
    <common>
        <enabled>1</enabled>
        <volume_feedback>1</volume_feedback>
        <volume_mode>2</volume_mode>
        <send_metadata>1</send_metadata>
        <send_coverart>1</send_coverart>
        <remove_timeout>120</remove_timeout>
        <alac_encode>1</alac_encode>
        <encryption>0</encryption>
        <read_ahead>1000</read_ahead>
        <vorbis_rate>320</vorbis_rate>
    </common>

    <interface>?</interface>
    <ports>0:0</ports>

    <!-- Log levels: error|warn|info|debug|sdebug -->
    <slimproto_log>info</slimproto_log>
    <stream_log>info</stream_log>
    <output_log>info</output_log>
    <decode_log>info</decode_log>
    <main_log>info</main_log>
    <slimmain_log>info</slimmain_log>
    <raop_log>info</raop_log>
    <util_log>info</util_log>
    <log_limit>-1</log_limit>

    <device>
        <udn>[id]@Kitchen HomePod._raop._tcp.local</udn>
        <name>Kitchen HomePod</name>
        <friendly_name>Kitchen HomePod</friendly_name>
        <enabled>1</enabled>
    </device>

    <device>
        <udn>[id]@Aether Cone._raop._tcp.local</udn>
        <name>Office Cone</name>
        <friendly_name>Office Cone</friendly_name>
        <enabled>1</enabled>
    </device>

</spotraop>

As before, this is on Raspberry Pi 4B with 4GB RAM and Raspberry Pi OS Bullseye with Linux kernel 6.1.21-v8+.

Please let me know what additional information I can provide or testing I can do to troubleshoot. Thanks!

philippe44 commented 1 year ago

Can you set RemoveTimeout to -1

nano9g commented 1 year ago

Setting <remove_timeout>-1</remove_timeout> in the config file seems to have fixed it, and I now have SpotConnect up and running (mostly; one more issue incoming about Apple TV pairing)! Thank you so much.