This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release.
一,经历
<1> 使用SDWebImage下载 成功图片后,将图片设置给 self.imageView.image,提示如题所示的错误提示.
<2>第一反应就是慢慢注释掉代码进行调试,结果发现是在成功的回调中出事了,代码如下:
- (void)setupDownloadImage{
NSURL *url = [NSURL URLWithString:@"http://i4.pdim.gs/dmfd/200_200_100/t01f117f76fc58c257c.gif"];
SDWebImageDownloader *downloader = [SDWebImageDownloader sharedDownloader];
[downloader downloadImageWithURL:url options: progress:nil completed:^(UIImage *image, NSData *data, NSError *error, BOOL finished) {
if (data != nil && image != nil) {
UIImage *image = [UIImage sd_animatedGIFWithData:data];
self.imageView.image = image;
}else {
UIImage *image = [UIImage imageNamed:@""];
self.imageView.image = image;
}
}];
}
<3>初步怀疑是sdwebimage 设置gift 图片失败,就在成功的回调中使用了一张本地的图片,依旧报错.
<4>仔细研究了提示,发现了关键词"a background thread",才知道是 sdwebimage 的后台线程在执行一些操作,仔细想了想才知道是更新 UI的操作必须在主线程中执行.
二,总结
<1>一定要注意子线程中对更新 UI 的使用.
This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release.的更多相关文章
- This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes.
-- :::] This application is modifying the autolayout engine from a background thread, which can lead ...
- This application is modifying the autolayout engine from a background threa-线程错误
警告提示:This application is modifying the autolayout engine from a background thread, which can lead to ...
- warning:This application is modifying the autolayout engine from a background thread
警告提示:This application is modifying the autolayout engine from a background thread, which can lead to ...
- iOS之崩溃处理:This application is modifying the autolayout engine from a background thread
一.错误提示 今天在开发的时候遇到一个崩溃问题,"This application is modifying the autolayout engine from a background ...
- iOS开发——modifying the autolayout engine from a background thread
很多时候,我们需要用到多线程的东西,比如红外线检测是否有人经过.这种情况需要搞个子线程在后台不断的检测,这个线程可能是第三方提供的,你调用它给的方法,然后显示提示框的时候,问题就来了. 提示信息:Th ...
- APP崩溃提示:This application is modifying the autolayout engine from a background thread after the engine was accessed from the main thread. This can lead to engine corruption and weird crashes.
崩溃输出日志 2017-08-29 14:53:47.332368+0800 HuiDaiKe[2373:1135604] This application is modifying the auto ...
- iOS 报错:(子线程中更新UI)This application is modifying the autolayout engine from a background thread after the engine was accessed from the main thread. This can lead to engine corruption and weird crashes.
今天在写程序的时候,使用Xcode 运行工程时报出下面的错误错信息,我还以为是什么呢,好久没遇到过这样的错误了. **ProjectName[1512:778965] This application ...
- autolayout也会锁死
This application is modifying the autolayout engine from a background thread, which can lead to engi ...
- iOS JavaScriptCore与H5交互时出现异常提示
在利用JavaScriptCore与H5交互时出现异常提示: This application is modifying the autolayout engine from a background ...
随机推荐
- 攻城狮在路上(叁)Linux(十八)--- 文件系统的简单操作
本篇仅作为补漏. 一.查看磁盘和目录的容量:df du df:列出文件系统的整体磁盘使用量. du:评估文件系统的磁盘使用量(常用于评估目录所占容量) 二.连接文件:ln 1.hard link:硬 ...
- 攻城狮在路上(叁)Linux(十一)--- 用户与用户组、文件权限、目录配置
一.用户与用户组: 3个概念:文件所有者(user).用户组(group).其他人(others). /etc/passwd <==存放所有的用户名 /etc/shadow <==存放 ...
- linux环境下libevent的使用
step1:安装libevent yum install libevent step2: 代码入下: #include <sys/socket.h> #include <sys/ty ...
- 验证备份前设置CONFIGURE CONTROLFILE AUTOBACKUP ON/OFF; 的区别
关于rman的,环境: oracle 10.2.0 rman nocatalog方式 1.首先设置 CONFIGURE CONTROLFILE AUTOBACKUP ON; 然后进行数据库全备份 RM ...
- 2-01SQL的概述
SQL: Structured Query Languaage:结构化查询语言. 美国国家标准局ANSI. 国际标准化组织. T-SQL: Transact-SQL. T-SQL是SQL的扩展集. 对 ...
- OpenMesh 读写网格控制(读取写入纹理坐标,法向等)
OpenMesh读取网格默认是不自动读取obj网格中的法向,纹理坐标等信息的,写入网格同样也是.所以要读取(或写入)这些信息需要修改默认的选项. 先看一下其读写网格的函数 template<cl ...
- python客户端编程
上一篇说了最为底层的用来网络通讯的套接字.有很多基于套接字的一些协议,这些协议构成了当今互联网大多数客户服务器应用的核心 其实这些协议时在套接字上面的进一层封装用来完成特定的应用,这些应用主要包括: ...
- commonlisp教程以及学习笔记-01
手上有两个教程,但是感觉这个教程可能更适合自己
- DIV伸缩盒子box
<div class="div1"> <div class="box"> <div>A</div> <di ...
- 【项目经验】——JSON.parse() && JSON.stringify()
我们在做项目的时候,都知道序列化和反序列化,师哥说:"有正就有反,有来就有回!"的确,就是这样.然后我们在这里分享一下JSON.stringify() 和JSON.parse() ...