[PR #340] [MERGED] fix: iOS app crashes when playback session not loaded from Realm #1409

Closed
opened 2026-04-24 23:58:15 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf-app/pull/340
Author: @ronaldheft
Created: 8/30/2022
Status: Merged
Merged: 8/30/2022
Merged by: @advplyr

Base: masterHead: ios-crashes


📝 Commits (1)

  • b583a8e Handle iOS crashes when no session

📊 Changes

2 files changed (+78 additions, -40 deletions)

View changed files

📝 ios/App/Shared/player/AudioPlayer.swift (+69 -35)
📝 ios/App/Shared/player/PlayerHandler.swift (+9 -5)

📄 Description

I'm seeing an occasional crash on the iOS app, which I've traced back to the playback session return nil from Realm. I'm continuing to investigate scenarios where that may happen. In the meantime, I have addressed the hard crashes by improving the error handling:

  • In situations where without the playback session we could silently fail, I am allowing this to occur now
    • Used for status updates, saving current progress (as if one progress updates fails, that's okay, another one will be occurring soon), etc
  • In situations where a missing playback session results in a failure, I am throwing the failed playback notification
    • These situations occur when first starting playback
    • The user will then be allowed to retry playback

🔄 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/advplyr/audiobookshelf-app/pull/340 **Author:** [@ronaldheft](https://github.com/ronaldheft) **Created:** 8/30/2022 **Status:** ✅ Merged **Merged:** 8/30/2022 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `ios-crashes` --- ### 📝 Commits (1) - [`b583a8e`](https://github.com/advplyr/audiobookshelf-app/commit/b583a8e6e2ead325dcd242abab242a1f634a1147) Handle iOS crashes when no session ### 📊 Changes **2 files changed** (+78 additions, -40 deletions) <details> <summary>View changed files</summary> 📝 `ios/App/Shared/player/AudioPlayer.swift` (+69 -35) 📝 `ios/App/Shared/player/PlayerHandler.swift` (+9 -5) </details> ### 📄 Description I'm seeing an occasional crash on the iOS app, which I've traced back to the playback session return nil from Realm. I'm continuing to investigate scenarios where that may happen. In the meantime, I have addressed the hard crashes by improving the error handling: * In situations where without the playback session we could silently fail, I am allowing this to occur now * Used for status updates, saving current progress (as if one progress updates fails, that's okay, another one will be occurring soon), etc * In situations where a missing playback session results in a failure, I am throwing the failed playback notification * These situations occur when first starting playback * The user will then be allowed to retry playback --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-24 23:58:15 +02:00
adam closed this issue 2026-04-24 23:58:16 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#1409