码迷,mamicode.com
首页 > 其他好文 > 详细

strcmp传入nil导致崩溃

时间:2016-03-11 22:10:55      阅读:430      评论:0      收藏:0      [点我收藏+]

标签:

现象:连接电脑可以正常启动程序,不连接电脑启动程序就崩溃。

崩溃信息:

BSXPCMessage received error for message: Connection invalid

HW kbd: Failed to set (null) as keyboard focus

UNNotificationRegistrarConnectionListener connection invalidated

UNNotificationSchedulerConnectionListener connection invalidated

com.apple.xpc.launchd[1] (UIKitApplication:com.wuba.zhuanzhuan[0x58ac][1073]) <Notice>: Service exited due to signal: Segmentation fault: 11

这种崩溃信息比较浪,导致这种崩溃的可能性比较多,最终定位问题是程序中用了一个c的方法 strcmp,原因是向这个方法中传递的参数中有nil,所以导致崩溃。

strcmp传入nil导致崩溃

标签:

原文地址:http://www.cnblogs.com/ygm900/p/5267246.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!