问题
After app launched for a long time, there are some logs in console while touching the screen:
BKSendHIDEvent: IOHIDEventSystemConnectionDispatchEvent error:0xE00002E8 -- Unknown event dropped
and all buttons have no response, whole app freeze. Currently, this problem only happened on iPhone 5s.
Similar issue: https://forums.xamarin.com/discussion/55646/alot-of-annotation-on-mkmapview
Does anyone have the same issue?
Update: I've found that there are more than 500 threads when app being killed by iOS, because I use a third party class Reachability too many times. To fix that, I declare a static variable, the freeze seems not happen again.
static Reachability *staticReachability;
+(NetworkStatus)detectNetwork{
if (staticReachability == nil) {
staticReachability = [Reachability reachabilityForInternetConnection];
[staticReachability startNotifier];
}
NetworkStatus status = [staticReachability currentReachabilityStatus];
return status;
}
回答1:
I have the same problem.
In My case it happends after switch off wifi in iPad (OS 9.1). Application is unresponsive. In console I can see the same errors.
After switch wifi on, application is again responsive and I can continue.
回答2:
I have got fix for that...
In My case using swift, with Xcode 7.2.
I have used custom label, and func layoutSubviews() call infinite time and console is showing BKSendHIDEvent: IOHIDEventSystemConnectionDispatchEvent
below is fix for same:
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
}
}
回答3:
fyi, i'm seeing the same console output "unknown event dropped" after updating to iOS 9.3. I'm not sure if it's the OS, or a specific app running a background process, but I see it in many different apps including the home screen as well as immediately on restarting, so I think it's a bug in the latest 9.3 update.
来源:https://stackoverflow.com/questions/34063166/ios-9-app-freeze-with-console-log-bksendhidevent