您的位置:首页 > 编程语言 > C语言/C++

NSScanner: nil string argument libc++abi.dylib: terminate_handler unexpectedly threw an exception问题

2016-02-03 13:48 288 查看
最近接手一个旧项目,一运行程序总是莫名其妙的奔溃,直接跳转到main函数就不动了,控制台输出错误信息:

NSScanner: nil string argument

NSScanner: nil string argument

libc++abi.dylib: terminate_handler unexpectedly threw an exception

谷歌一搜,有人说这种情况大多是字符串操作异常,但是很难定位到底是在哪里出了问题。也有人说先把集成友盟的代码注掉就可以在控制台看到错误信息了。果断把友盟的代码注掉,结果果然输出了以下错误信息:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application windows are expected to have a root view controller at the end of application launch'

有这么一个错误信息就可以了,直接加上根控制器代码即可。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: