Terminating app due to uncaught exception 'CALayerInvalid', reason: 'layer is a part of cycle in its layer tree'

时间:2021-09-12 02:39:46

iOS App里面所有的View构成一个组件树,这个树里面如果有了闭环就会出现这个报错,最常见的你不小在某UIViewController里面写了这样的代码:

someView.addSubView(view)

  因为ViewController默认有一个view作为VC的全局父view,你这样代码就会导致整个view树出现指向闭环。于是出现了 a part of cycyle in Its layer 这样的错误。

Terminating app due to uncaught exception 'CALayerInvalid', reason: 'layer <CALayer: 0x7fda42c66e30> is a part of cycle in its layer tree'的更多相关文章

  1. Terminating app due to uncaught exception &&num;39&semi;NSUnknownKeyException&&num;39&semi; this class is not key value coding-compliant for the key

     Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ViewController > se ...

  2. &ast;&ast;&ast; Terminating app due to uncaught exception &&num;39&semi;NSUnknownKeyException&&num;39&semi;&comma; reason&colon; &&num;39&semi;&lbrack;ViewController &gt&semi; setValue&colon;forUndefinedKey&colon;&rsqb;&colon; this class is not key value coding-compliant for the key

    *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ViewController > ...

  3. 在使用可变数组过程中遇到&ast;&ast;&ast; Terminating app due to uncaught exception &&num;39&semi;NSInternalInconsistencyException&&num;39&semi;&comma; reason&colon; &&num;39&semi;-&lbrack;&lowbar;&lowbar;NSCFDictionary setObject&colon;forKey&colon;&rsqb;&colon; mutating method sent to immutable object&&num;39&semi;问题

    *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[__NSCFD ...

  4. Terminating app due to uncaught exception &&num;39&semi;NSInvalidArgumentException&&num;39&semi;&comma; reason&colon; &&num;39&semi;&ast;&ast;&ast; -&lbrack;&lowbar;&lowbar;NSPlaceholderDictionary initWithObjects&colon;forKeys&colon;count&colon;&rsqb;&colon; attempt to insert nil object from objects&lbrack;0&rsqb;&&num;39&semi;

    报错: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlace ...

  5. iOS Terminating app due to uncaught exception &amp&semi;&num;39&semi;NSInternalInconsistencyException&amp&semi;&num;39&semi;&comma; reason&colon; &amp&semi;&num;39&semi;unable to

    刚接触iOS,依照教程操作执行出现错误 Terminating app due to uncaught exception 'NSInternalInconsistencyException', re ...

  6. &ast;&ast;&ast; Terminating app due to uncaught exception &&num;39&semi;NSInvalidArgumentException&&num;39&semi;&comma; reason&colon; &&num;39&semi;&lbrack;&lt&semi;&lowbar;UIFeedbackParameters 0x1d4442e50&gt&semi; setNilValueForKey&rsqb;&colon; could not set nil as the value for the key rate&period;&&num;39&semi;

    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '[<_UIFeedbac ...

  7. Adding an Exception Breakpoint - Terminating app due to uncaught exception &&num;39&semi;NSRangeException&&num;39&semi;&comma; reason&colon; &&num;39&semi;&ast;&ast;&ast; -&lbrack;&lowbar;&lowbar;NSArrayM objectAtIndex&colon;&rsqb;&colon; index 25 bey

    用如下的方法可以非常方便停留到具体crash的某行代码 Adding an Exception Breakpoint Add an exception breakpoint to your proje ...

  8. iOS程序崩溃&ast;&ast;&ast; Terminating app due to uncaught exception &&num;39&semi;CALayerInvalidGeometry&&num;39&semi;&comma; reason&colon; &&num;39&semi;CALayer position contains NaN&colon; &lbrack;37&period;5 nan&rsqb;&&num;39&semi;

    今天上班打开昨天的程序运行,昨天跑的很溜的程序今天竟然crash了,好郁闷啊!下面附上crash的栈打印信息: 经过一番调试终于找到了原因,程序crash是因为CALayer的位置中含有不存在的数,就 ...

  9. Terminating app due to uncaught exception &&num;39&semi;NSUnknownKeyException&&num;39&semi;&comma; reason&colon; xxxx

    出现错误的情景: 使用Swift自定义Cell, 然后将这个Cell在OC中使用, 由于为了能够在OC中使用和使用起来命名比较规范 我在Swift自定义的Cell前加了 @objc(DSProduct ...

随机推荐

  1. javascript &plus; jquery函数大全

    JAVASCRIPT Array 函数   array创建数组 concat()连接两个或更多的数组,并返回结果. join()把数组中所有元素组成字符串. pop()删除并返回数组的最后一个元素 s ...

  2. 3-WebPack

    一. 什么是WebPack WebPack可以看做是模块加载.打包工具. 它所做的事情是 1.分析你的项目结构,找到JavaScript模块以及其它的一些浏览器不能直接运行的拓展语言(Scss,Typ ...

  3. POJ 2728 Desert King

    Description David the Great has just become the king of a desert country. To win the respect of his ...

  4. SQL Server调优系列基础篇 - 并行运算总结&lpar;一&rpar;

    前言 上三篇文章我们介绍了查看查询计划的方式,以及一些常用的连接运算符.联合运算符的优化技巧. 本篇我们分析SQL Server的并行运算,作为多核计算机盛行的今天,SQL Server也会适时调整自 ...

  5. loj&num;6029&period; 「雅礼集训 2017 Day1」市场&lpar;线段树&rpar;

    题意 链接 Sol 势能分析. 除法是不能打标记的,所以只能暴力递归.这里我们加一个剪枝:如果区间内最大最小值的改变量都相同的话,就变成区间减. 这样复杂度是\((n + mlogn) logV\)的 ...

  6. &lpar;转&rpar;linux 内存管理——内核的shmall 和shmmax 参数

    内核的 shmall 和 shmmax 参数 SHMMAX= 配置了最大的内存segment的大小 ------>这个设置的比SGA_MAX_SIZE大比较好. SHMMIN= 最小的内存seg ...

  7. mysql表无权限访问

    当网页出现以上问题时的解决方法: 今天在两台服务器间转移网站,最后把域名解释设置好后等待...然后CMD查看DNS解释情况..解释成功-输入网址-却出现如上信息,首先用#ls -l查看mysql下的v ...

  8. Wifi模块的工作原理

    http://www.wifitop1.com/news/content-98.html 在无线网络领域里面,无线wifi是最火的名词.对于串口wifi模块的工作是什么呢?串口wifi模块又有什么功能 ...

  9. cmake的一个编译报错

    在一台新搭建的服务器上执行cmake的时候,报了如下错误: $ cmake ./ -- The C compiler identification is unknown -- The CXX comp ...

  10. TopCoder SRM420 Div1 RedIsGood —— 期望

    题目链接:https://vjudge.net/problem/TopCoder-9915 (论文上的题) 题解: 更正:, i>0, j>0 代码如下: #include <ios ...