現象:鏈接電腦能夠正常啓動程序,不鏈接電腦啓動程序就崩潰。app
崩潰信息:spa
BSXPCMessage received error for message: Connection invalidit
HW kbd: Failed to set (null) as keyboard focusio
UNNotificationRegistrarConnectionListener connection invalidatedclass
UNNotificationSchedulerConnectionListener connection invalidateddate
com.apple.xpc.launchd[1] (UIKitApplication:com.wuba.zhuanzhuan[0x58ac][1073]) <Notice>: Service exited due to signal: Segmentation fault: 11List
這種崩潰信息比較浪,致使這種崩潰的可能性比較多,最終定位問題是程序中用了一個c的方法 strcmp,緣由是向這個方法中傳遞的參數中有nil,因此致使崩潰。程序