使用控制台日志“BKSendHIDEvent”冻结iOS 9应用程序
应用程序启动很长一段时间后,触摸屏幕时控制台中有一些日志:
BKSendHIDEvent: IOHIDEventSystemConnectionDispatchEvent error:0xE00002E8 -- Unknown event dropped
并且所有按钮都没有响应,整个应用程序冻结。 目前,这个问题只发生在iPhone 5s上。
类似的问题: https : //forums.xamarin.com/discussion/55646/alot-of-annotation-on-mkmapview
有没有人有同样的问题?
更新 :我发现当应用程序被iOS杀死时有超过500个线程,因为我使用第三方类可达性太多次了。 为了解决这个问题,我声明了一个静态变量,冻结似乎不再发生了。
static Reachability *staticReachability; +(NetworkStatus)detectNetwork{ if (staticReachability == nil) { staticReachability = [Reachability reachabilityForInternetConnection]; [staticReachability startNotifier]; } NetworkStatus status = [staticReachability currentReachabilityStatus]; return status; }
我也有同样的问题。
在我的情况下,它在iPad(OS 9.1)关闭wifi后发生。 应用程序没有响应。 在控制台中我可以看到相同的错误。
打开wifi后,应用程序再次响应,我可以继续。
我已经解决了这个问题…在我的情况下使用swift,使用Xcode 7.2。 我使用了自定义标签,并且func layoutSubviews()调用无限时间,控制台显示BKSendHIDEvent: IOHIDEventSystemConnectionDispatchEvent
以下是修复相同的:
class CustomLabel: UILabel { var isSubLayoutSet: Bool = false override internal init(frame: CGRect) { super.init(frame: frame) } required internal init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) } override func layoutSubviews() { super.layoutSubviews() if isSubLayoutSet == false { //--- do your stuff related to set font or any operation... ///--- isSubLayoutSet = true } }
fyi,我在更新到iOS 9.3后看到相同的控制台输出“未知事件已丢失”。 我不确定它是操作系统,还是运行后台进程的特定应用程序,但我在许多不同的应用程序中看到它,包括主屏幕以及立即重启,所以我认为这是最新的9.3更新中的一个错误。
- iOS7崩溃 – [__NSPlaceholderDictionary initWithObjects
- iPhone4能同时logging前后相机吗?
- 从另一个选项卡调用popToRootViewController
- 在UIImagePickerController中隐藏loggingbutton
- 热门iOS 10 Objective-C和Swift 3.0代码示例
- UISearchControllerDelegate – 搜索栏在表头中不可见
- Swift 3中的不安全字节
- TableView / CollectionView单元格的索引
- 应用程序:didReceiveLocalNotification永远不会调用ios 8