Xcode7:此应用程序正在从后台线程修改自动布局引擎,这可能导致引擎损坏和奇怪的崩溃 [英] Xcode7: This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes
本文介绍了Xcode7:此应用程序正在从后台线程修改自动布局引擎,这可能导致引擎损坏和奇怪的崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
更新Xcode7时收到此消息.你能告诉我解决方法吗?谢谢.
I got this messages,when I updated Xcode7. Can you tell me solution? Thank.
此应用程序正在从后台线程修改自动布局引擎,这可能导致引擎损坏和奇怪的崩溃.这将在将来的版本中引起异常.
Stack:(
0 CoreFoundation 0x250df883 <redacted> + 150
1 libobjc.A.dylib 0x367dedff objc_exception_throw + 38
2 CoreFoundation 0x250df7b1 <redacted> + 0
3 Foundation 0x25f7be63 <redacted> + 170
4 Foundation 0x25e21ba7 <redacted> + 38
5 UIKit 0x292f3aa9 <redacted> + 52
6 UIKit 0x292f4487 <redacted> + 222
7 UIKit 0x299ccfa5 <redacted> + 288
8 UIKit 0x294e5fa9 <redacted> + 148
9 UIKit 0x291ed6bb <redacted> + 694
10 QuartzCore 0x28ab967d <redacted> + 128
11 QuartzCore 0x28ab4d79 <redacted> + 352
12 QuartzCore 0x28ab4c09 <redacted> + 16
13 QuartzCore 0x28ab4129 <redacted> + 368
14 QuartzCore 0x28ab3deb <redacted> + 590
15 WebCore 0x34a9c79f <redacted> + 282
16 CoreFoundation 0x250a2827 <redacted> + 14
17 CoreFoundation 0x250a2417 <redacted> + 454
18 CoreFoundation 0x250a077f <redacted> + 806
19 CoreFoundation 0x24ff31e9 CFRunLoopRunSpecific + 516
20 CoreFoundation 0x24ff2fdd CFRunLoopRunInMode + 108
21 WebCore 0x34040cdf <redacted> + 422
22 libsystem_pthread.dylib 0x37077c93 <redacted> + 138
23 libsystem_pthread.dylib 0x37077c07 _pthread_start + 110
24 libsystem_pthread.dylib 0x37075a24 thread_start + 8
)
推荐答案
我不知道您的代码是什么,但是我对为什么会这样有一个想法.您必须在后台线程中进行一些UI更改.
I don't know what your code is, but I have an idea as to why this is happening. You must be having some UI changes done in a background thread.
请勿从主线程以外的任何内容更改UI,它必须绑定到 使您的应用程序不稳定,并意外崩溃.
Do not change UI from anything but the main thread, it is bound to make your application unstable, and crash unpredictably.
使用GCD(大中央派遣).
您可以从任何线程侦听和执行工作,并将UI更改封装在dispatch_async中:
Use GCD (Grand Central Dispatch).
You can listen and do work from any thread, and encapsulate UI changes in a dispatch_async:
dispatch_async(dispatch_get_main_queue(), ^{
// Do UI stuff here
});
这篇关于Xcode7:此应用程序正在从后台线程修改自动布局引擎,这可能导致引擎损坏和奇怪的崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文