[PR #426] [MERGED] Prevent spirc from crashing when the queue is empty. #920

Closed
opened 2026-02-27 20:00:28 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/426
Author: @kaymes
Created: 1/23/2020
Status: Merged
Merged: 1/24/2020
Merged by: @sashahilton00

Base: devHead: empty-queue-crash


📝 Commits (1)

  • 113bb92 Prevent spirc from crashing when the queue is empty.

📊 Changes

1 file changed (+22 additions, -8 deletions)

View changed files

📝 connect/src/spirc.rs (+22 -8)

📄 Description

I investigated a panic I observed. spirc's handle_next was called on an empty queue resulting in an index violation on the queue. I modified the code to catch this kind of situation.

Unfortunately I don't know how to reproduce this situation - I only saw it in the logs and we were mucking around with spotify quite a bit at the time so I don't know which of our actions caused it. Nevertheless I think it's worth fixing.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/librespot-org/librespot/pull/426 **Author:** [@kaymes](https://github.com/kaymes) **Created:** 1/23/2020 **Status:** ✅ Merged **Merged:** 1/24/2020 **Merged by:** [@sashahilton00](https://github.com/sashahilton00) **Base:** `dev` ← **Head:** `empty-queue-crash` --- ### 📝 Commits (1) - [`113bb92`](https://github.com/librespot-org/librespot/commit/113bb92c9d3c6ec18be15a14ae1faf26413adca5) Prevent spirc from crashing when the queue is empty. ### 📊 Changes **1 file changed** (+22 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `connect/src/spirc.rs` (+22 -8) </details> ### 📄 Description I investigated a panic I observed. spirc's handle_next was called on an empty queue resulting in an index violation on the queue. I modified the code to catch this kind of situation. Unfortunately I don't know how to reproduce this situation - I only saw it in the logs and we were mucking around with spotify quite a bit at the time so I don't know which of our actions caused it. Nevertheless I think it's worth fixing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:00:28 +03:00
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#920
No description provided.