libc++abi.dylib: terminate_handler unexpectedly错误
来源:互联网 发布:html5 javascript exe 编辑:程序博客网 时间:2024/05/29 05:06
今天测试app时发现一个必现的异常,当在登录成功后再打开登录前点击的页面时,就会在Xcode console中打印如下日志:
NSScanner:nil string argument
NSScanner:nil string argument
libc++abi.dylib: terminate_handler unexpectedly threw an exception
然后app就会crash掉。
搜索了一下相关资料,得知出现NSScanner: nil string argument问题都是跟字符串有关,一般认为是intWithString:的参数传入了nil就会出现这个问题。但是项目的代码中并没有几处intWithString:的地方,逐一加断点都排除了出问题的可能。
然后我单步调试,发现问题可能出在这几行代码:
NSDictionary *para=nil;
para=@{@"userid":[Configs getInstance].me.uid, @"flag":@"1" };
那么最有问题的可能在这里:[Configs getInstance].me.uid,会不会在它为nil时出现上面的crash问题呢?经过验证,在出现crash之前这个uid值果然为nil,又是前人留下的坑……对代码进行了一些调整,此问题解决。
20150411更新:
出现NSScanner:nil string argument这个问题很有可能是因为你在项目中用了友盟的SDK,这样的错误信息非常不利于定位,可以先把调用友盟SDK的代码注释掉来定位问题。
0 0
- libc++abi.dylib: terminate_handler unexpectedly错误
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误解决方案
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误小结
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误小结
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误小结
- 151128libc++abi.dylib: terminate_handler unexpectedly threw an exception错误
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误小结
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误小结
- libc++abi.dylib: terminate_handler unexpectedly threw an exception错误小结
- 对于libc++abi.dylib: terminate_handler unexpectedly threw an exception 异常处理如何调试错误
- 开发中遇到libc++abi.dylib: terminate_handler unexpectedly threw an exception错误
- libc++abi.dylib: terminate_handler unexpectedly threw an exception
- libc++abi.dylib: terminate_handler unexpectedly threw an exception 报错
- libc++abi.dylib: terminate_handler unexpectedly threw an exception 问题解决
- iOS libc++abi.dylib: terminate_handler unexpectedly threw an exception
- 解决libc++abi.dylib: terminate_handler unexpectedly threw an exception(1)
- ajax 调用 web service 示例
- 开启Hadoop2.6.0出现ssh无法解析主机名等错误提示的解决办法!
- 关于设置http响应头connection的作用
- UIImageView
- iOS 使用Quartz 2D画虚线
- libc++abi.dylib: terminate_handler unexpectedly错误
- AIX: osysmond.bin High CPU Usage
- VC枚举(遍历)文件夹里面的文件
- IOS自定义UI组件的外观——使用UIAppearance协议自定义视图
- 欢迎使用CSDN-markdown编辑器
- HDU 1811 Rank of Tetris
- IntelliJ Idea 常用快捷键列表
- libevent 学习
- Spring JDBC例子