FS#8748 - Freeze when selecting song from filetree in partymode

When playback is stopped and partymode is enabled it can happen that rockbox freezes shortly after you select a song from the filetree.

dircache (i wasn’t able to reproduce it without dircache), then start playback and enable partymode. Now shutdown the device, restart it and then select a song from the filetree without starting playback first. It shows a splash with “queue last” and then freezes 2 seconds or so later (the disk continues spinning).

Without dircache enabled following the reproduction steps does not lead me to a freeze, but the cabbiev2 WPS displays “2 of 1” on the bottom, which could be an indication of what’s going wrong here. The playlist shows the song has been queued, and if I try to play/select it, the icon changes to suggest it is now-playing, but the song does not play. The track display updates to the correct “1 of 1” but the ID3 info is not read/displayed.

With dircache enabled the “Queue Last” message is displayed and the player freezes a few seconds later. If I press play/pause before it freezes, the message “Nothing to Resume” appears.