JJException
JJException copied to clipboard
iOS18 使用AVPlayerViewController 播放器,播放视频时,页面卡死。与JJExceptionGuardKVOCrash 有关系。JJException版本0.2.13
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Please complete the following information
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Version [e.g. 22]
webview播放视频时,也会因为监听了JJExceptionGuardKVOCrash,导致闪退。
有什么好的解决办法吗
临时解决方案是:
[JJException configExceptionCategory:JJExceptionGuardUnrecognizedSelector | JJExceptionGuardDictionaryContainer | JJExceptionGuardArrayContainer | JJExceptionGuardNSTimer | JJExceptionGuardNSNotificationCenter | JJExceptionGuardNSStringContainer];
iOS11之后不手动移除Observer也没有问题.
更新
产生原因: iOS18竞态环境下产生dead lock.
解决方案: 异步执行
dispatch_semaphore_wait(...)
...
dispatch_semaphore_signal(..)
更新
产生原因: iOS18竞态环境下产生dead lock.
解决方案: 异步执行
dispatch_semaphore_wait(...) ... dispatch_semaphore_signal(..)
啥意思?你这个信号量要包着谁?