Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
报错:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
看起报错就知道:试图插入零对象。
说明某个对象为零或为空
解决方法:
检查一遍当页代码,是否有相关现象。一般为没有开辟空间的数组。直接被拿去使用了。
如:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return datamutarr.count;
}
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'的更多相关文章
- *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '[<_UIFeedbackParameters 0x1d4442e50> setNilValueForKey]: could not set nil as the value for the key rate.'
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '[<_UIFeedbac ...
- 在使用可变数组过程中遇到*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[__NSCFDictionary setObject:forKey:]: mutating method sent to immutable object'问题
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[__NSCFD ...
- Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSInvocation setArgument:atIndex:]: index (3) out of bounds [-1, 2]'
这是相机调用方法的时候参数错误
- Terminating app due to uncaught exception 'NSUnknownKeyException' this class is not key value coding-compliant for the key
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ViewController > se ...
- *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ViewController > setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ViewController > ...
- iOS Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to
刚接触iOS,依照教程操作执行出现错误 Terminating app due to uncaught exception 'NSInternalInconsistencyException', re ...
- Terminating app due to uncaught exception 'CALayerInvalid', reason: 'layer <CALayer: 0x7fda42c66e30> is a part of cycle in its layer tree'
iOS App里面所有的View构成一个组件树,这个树里面如果有了闭环就会出现这个报错,最常见的你不小在某UIViewController里面写了这样的代码: someView.addSubView( ...
- Adding an Exception Breakpoint - Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 25 bey
用如下的方法可以非常方便停留到具体crash的某行代码 Adding an Exception Breakpoint Add an exception breakpoint to your proje ...
- iOS程序崩溃*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [37.5 nan]'
今天上班打开昨天的程序运行,昨天跑的很溜的程序今天竟然crash了,好郁闷啊!下面附上crash的栈打印信息: 经过一番调试终于找到了原因,程序crash是因为CALayer的位置中含有不存在的数,就 ...
随机推荐
- SharePoint 2010:“&”作为SharePoint账号密码引起的错误
一朋友修改了SharePoint 2010系统账号密码,导致无法登陆.他的环境如下: 两台服务器:AD+SharePoint 2010 ,Sql Server 2008 r2 目标站点开启了Form登 ...
- 织梦dedeCMS数据库结构字段说明-简略说明
dede_addonarticle 附加文章表 aid int(11) 文章编号typeid int(11) 分类栏目编号body mediumtext 文章内容dede_addonflash 附加F ...
- 关于nginx报错/usr/share/nginx/html/jiankongshare" failed (2: No such file or directory)的问题解决
nginx的location虚拟目录配置: monitor.conf server { server_name monitor.chinasoft.com; server_ ...
- 重装windows系统后配置Anaconda
给电脑换了系统,十分担心anaconda需要重装.还好以下方法完美解决.(同是win10 64位) 原始anaconda安装路径:D:\ProgramData\Anaconda3 (不能有空格哦) ...
- html中子界面与父界面相互操作或传值
一.在使用iframe的页面,要操作这个iframe里面的DOM元素可以用: contentWindow.contentDocument(测试的时候chrom浏览器,要在服务器环境下) content ...
- 将数据库从Oracle迁移到SQL Server
参考链接:http://www.360doc.com/content/15/0310/14/9260775_454038517.shtml
- python 全栈开发,Day59(小米商城)
一.小米商城 准备工作: 访问iconfont,官网链接: http://www.iconfont.cn/ 登录之后,找到需要的图标 将图标下载到本地,解压,重命名为font创建几个空文件夹:css, ...
- 计算机编码--c语言中输出float的十六进制和二进制编码
c语言中没有可以直接打印float类型数据的二进制或者十六进制编码的输出格式, 因此,需要单独给个函数,如下: unsigned int float2hexRepr(float* a){ unsign ...
- Android strings.xml中定义字符串显示空格
<string name="str">字 符 串</string> 其中 就表示空格.如果直接在里面键入空格,无论多少空格都只会显示一个. 用的XML转 ...
- 使用gunicorn将django项目部署到生产环境的子目录下,在nginx后端获取客户真实IP地址
生产环境有时,并不是为了一个项目而存在的.毕竟,域名是比较稀有的. 今天遇到这个问题,解决了.作个记录. 并且,如果将django项目部署在Nginx后面,那如何获取用户真实的IP地址呢? 下面就来解 ...