Fix backend mutex poisoned panic on OpenHome stop #60

Merged
eric merged 1 commits from push-zxynzquymotu into main 2026-01-17 13:41:03 +01:00
Owner

Fix backend mutex poisoned panic when stopping playback on OpenHome renderer

This commit addresses a panic that occurred when stopping playback on OpenHome renderers, which was caused by:

  1. Mutex poisoning from unhandled panics in backend operations
  2. A regression revealed after initial fixes, where inconsistent renderer state caused index out of bounds errors

Changes include:

  • Added defensive error handling for mutex operations to prevent poisoning
  • Implemented bounds-checking for current_index in sync_queue to handle inconsistent renderer states
  • Removed redundant clear_queue calls that were causing additional failures
  • Improved error tolerance in queue operations

The fix ensures that the backend mutex remains healthy and that inconsistent renderer states are handled gracefully rather than causing panics.

Fix backend mutex poisoned panic when stopping playback on OpenHome renderer This commit addresses a panic that occurred when stopping playback on OpenHome renderers, which was caused by: 1. Mutex poisoning from unhandled panics in backend operations 2. A regression revealed after initial fixes, where inconsistent renderer state caused index out of bounds errors Changes include: - Added defensive error handling for mutex operations to prevent poisoning - Implemented bounds-checking for current_index in sync_queue to handle inconsistent renderer states - Removed redundant clear_queue calls that were causing additional failures - Improved error tolerance in queue operations The fix ensures that the backend mutex remains healthy and that inconsistent renderer states are handled gracefully rather than causing panics.
eric added 1 commit 2026-01-17 13:40:57 +01:00
Fix backend mutex poisoned panic when stopping playback on OpenHome renderer

This commit addresses a panic that occurred when stopping playback on OpenHome renderers, which was caused by:

1. Mutex poisoning from unhandled panics in backend operations
2. A regression revealed after initial fixes, where inconsistent renderer state caused index out of bounds errors

Changes include:
- Added defensive error handling for mutex operations to prevent poisoning
- Implemented bounds-checking for current_index in sync_queue to handle inconsistent renderer states
- Removed redundant clear_queue calls that were causing additional failures
- Improved error tolerance in queue operations

The fix ensures that the backend mutex remains healthy and that inconsistent renderer states are handled gracefully rather than causing panics.
eric merged commit 01fb821dd3 into main 2026-01-17 13:41:03 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eric/pmomusic#60
No description provided.