iOS 9 App freeze with console log “BKSendHIDEvent”

吃可爱长大的小学妹 提交于 2019-11-29 12:01:00

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!