Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: AVPlayer Notifications Crash App When Switching Tracks After Background #4188

Open
AlexEKoren opened this issue Sep 20, 2024 · 2 comments

Comments

@AlexEKoren
Copy link

Version

6.4.5

What platforms are you having the problem on?

iOS

System Version

iOS 17

On what device are you experiencing the issue?

Real device

Architecture

Old architecture

What happened?

After playing a file, locking the screen, unlocking, then changing the track, the following crash occurs:

The app crashes with:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot remove an observer <NSKeyValueObservance 0x30005b600> for the key path "currentItem.videoComposition" from <AVPlayer 0x300dcac00>, most likely because the value for the key "currentItem" has changed without an appropriate KVO notification being sent. Check the KVO-compliance of the AVPlayer class.'

It's unclear why this is only happening after a screen lock. Possibly some other observers are added for background playback that aren't cleaned up correctly?

Reproduction Link

repository link

Reproduction

Steps to reproduce:

  1. Configure player for offline playback
  2. Start playback of a file (we are using DRM protected files, but I don't believe it's relevant for this issue)
  3. Let the file play and load
  4. Lock the screen then unlock
  5. Change the track by setting a new source
@AlexEKoren AlexEKoren added the bug label Sep 20, 2024
Copy link

Thank you for your issue report. Please note that the following information is missing or incomplete:

  • reproduction link

Please update your issue with this information to help us address it more effectively.

Note: issues without complete information have a lower priority

There is a newer version of the library available. You are using version 6.4.5, while the latest stable version is 6.6.1. Please update to the latest version and check if the issue still exists.

Note: If the issue still exists, please update the issue report with the latest information.

@freeboub
Copy link
Collaborator

Can you reproduce with the last version 6.6.1 ? There was a lot of rework linked to DRM on this version
"Change the track by setting a new source" -> it is not clear to me do you change track or source ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants