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

在版本10.2和11.0以下的 手机上,播放音乐 崩溃,APP闪退,但是在ios11 版本以上就不闪退,求助 #157

Open
huangyanan423 opened this issue Dec 18, 2017 · 1 comment

Comments

@huangyanan423
Copy link

报错:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An instance 0x146b3070 of class DOUAudioStreamer was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x1467d2c0> (
<NSKeyValueObservance 0x1479f9c0: Observer: 0x1467c4f0, Key path: status, Options: <New: YES, Old: NO, Prior: NO> Context: 0x78aa78, Property: 0x14656dc0>
<NSKeyValueObservance 0x147e3fc0: Observer: 0x1467c4f0, Key path: duration, Options: <New: YES, Old: NO, Prior: NO> Context: 0x78aa7c, Property: 0x147e3fa0>
<NSKeyValueObservance 0x147e4510: Observer: 0x1467c4f0, Key path: bufferingRatio, Options: <New: YES, Old: NO, Prior: NO> Context: 0x78aa80, Property: 0x147e44f0>
)'
*** First throw call stack:
(0x1c9b7b3d 0x1bc3f067 0x1c9b7a85 0x1d276729 0x1bc59259 0x209553 0x209793 0x1c23c93b 0x1c23c85d 0x1c23a468)

@huangyanan423 huangyanan423 changed the title 在版本10.2和11.0以下的 手机上,播放音乐 崩溃,APP闪退 在版本10.2和11.0以下的 手机上,播放音乐 崩溃,APP闪退,但是在ios11 版本以上就不闪退,求助 Dec 18, 2017
@huangyanan423
Copy link
Author

好吧,在初始化streamer 时,添加

@Try {
[self removeStreamerObserver];
} @catch(id anException){
}

就好了

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

No branches or pull requests

1 participant