现象:链接电脑能够正常启动程序,不链接电脑启动程序就崩溃。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,因此致使崩溃。程序