-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
ios: NSInternalInconsistencyException for "currentItem.hasEnabledAudio" observer #814
Comments
To out point of view, this might be caused by the use of According to Apple, this might lead to exceptions: |
Suggesting to replace Going to try this one internally. Will update this issue thereafter. |
@thisisthekap did it work? Can you make a PR? |
No, unfortunately not (other errors appeared, skipped that approach thereafter). Created my own implementation from scratch. |
I'm running into this issue at the moment as well. @thisisthekap any indicators as to what's different about your custom implementation over CrossMediaManager? |
@martijn00 Hope you're well. I've spent the day looking at this issue! I read through the Apple docs as linked above and have updated just this method:
I've also plugged the The issue is that the problem was extremely intermittent, even in dev. So whilst I haven't seen any issues it's really hard for me to "sign it off" so-to-speak. I had the odd report from the test group of videos bombing the app with this logged in App Center:
Having now pushed the app out to a wider beta group it seems a too large to ignore group of those users ran headlong into this issue. I'm going to keep testing for the rest of today and see if I can at least increase confidence in this being "more compliant". I think it might be prudent for you to give this a pretty close test if it makes it to a PR. |
@martijn00 I've pushed the current code to a branch in my fork here: https://github.com/jamsoft/XamarinMediaManager/tree/fix/814-NSInternalInconsistencyException |
Interestingly, I've just switched back to my main dev branch and within two debug runs BOOM the error occurs ... This does lead me to feel the fix in fact a good fix. |
🐛 Bug Report
Sometimes when playback stops, the app crashes throwing this exception:
NSInternalInconsistencyException Reason: Cannot update for observer NSKeyValueObservance for the key path "currentItem.hasEnabledAudio" from AVQueuePlayer, most likely because the value for the key "currentItem" has changed without an appropriate KVO notification being sent.
It seems to be not limited to
currentItem.hasEnabledAudio
. We saw similar exceptions for these members:Expected behavior
No crash :)
Reproduction steps
Play and stop playback, repeat approx 15 times.
Configuration
Version: 1.0.8
Platform:
The text was updated successfully, but these errors were encountered: