[PR #387] [MERGED] Fixing index out of bounds error #509

Closed
opened 2026-02-28 14:33:16 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jpochyla/psst/pull/387
Author: @arch-btw
Created: 4/13/2023
Status: Merged
Merged: 4/14/2023
Merged by: @Insprill

Base: masterHead: patch-2


📝 Commits (1)

  • a602180 Fixing index out of bounds error

📊 Changes

1 file changed (+17 additions, -11 deletions)

View changed files

📝 psst-gui/src/controller/playback.rs (+17 -11)

📄 Description

Hey 👍

Fixed an "index out of bounds" error in the play function of playback.rs by checking that the provided position value is within bounds before sending the LoadQueue command to the player. This was the error that I kept getting, causing the app to become non-responsive until restarting it:

thread '<unnamed>' panicked at 'index out of bounds: the len is 2 but the index is 10', 
psst-core/src/player/queue.rs:57:13 

I tried modifying some things in queue.rs first but that was the wrong approach.


🔄 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/jpochyla/psst/pull/387 **Author:** [@arch-btw](https://github.com/arch-btw) **Created:** 4/13/2023 **Status:** ✅ Merged **Merged:** 4/14/2023 **Merged by:** [@Insprill](https://github.com/Insprill) **Base:** `master` ← **Head:** `patch-2` --- ### 📝 Commits (1) - [`a602180`](https://github.com/jpochyla/psst/commit/a60218064ad0028cd5e9c074e9194733c52d4a47) Fixing index out of bounds error ### 📊 Changes **1 file changed** (+17 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `psst-gui/src/controller/playback.rs` (+17 -11) </details> ### 📄 Description Hey :+1: Fixed an "index out of bounds" error in the play function of playback.rs by checking that the provided position value is within bounds before sending the LoadQueue command to the player. This was the error that I kept getting, causing the app to become non-responsive until restarting it: ``` thread '<unnamed>' panicked at 'index out of bounds: the len is 2 but the index is 10', psst-core/src/player/queue.rs:57:13 ``` I tried modifying some things in queue.rs first but that was the wrong approach. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 14:33:16 +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/psst#509
No description provided.