崩溃:引擎标记为需要优化

Ale*_*lex 5 ios

我在该字段中有一个应用程序,该应用程序在iOS 11中的某个时间开始崩溃,并显示以下消息:

崩溃:引擎已标记为需要优化,即使它已经在进行中。

崩溃位于中的某处UIKit -> Foundation -> CoreFoundation -> libocj.A.dylib -> CoreFoundation,但是我删除的崩溃日志已被删除,因此我所了解的不多。我通常将它们表示为符号,但是该符号仅适用于我的应用程序,不适用于库代码,因此,我需要从此处提供的字段中获取设备,以从该设备获取完整的崩溃日志。

在此之前,是否有人对导致这种崩溃的原因有任何线索,或者有任何良好的起点开始调查?

0 CoreFoundation exceptionPreprocess (in CoreFoundation) + 148
1 libobjc.A.dylib objc_exception_throw + 56
2 CoreFoundation +[NSException raise:format:] (in CoreFoundation) + 0
3 Foundation -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] (in Foundation) + 112
4 Foundation -[NSISEngine _optimizeIfNotDisabled] (in Foundation) + 320
5 Foundation -[NSISEngine tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:] (in Foundation) + 664
6 Foundation -[NSLayoutConstraint _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:] (in Foundation) + 284
7 Foundation -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] (in Foundation) + 272
8 UIKit -[UIView(UIConstraintBasedLayout) _layoutEngine_didAddLayoutConstraint:roundingAdjustment:mutuallyExclusiveConstraints:] (in UIKit) + 488
9 UIKit -[UIView(UIConstraintBasedLayout) _tryToAddConstraintWithoutUpdatingConstraintsArray:roundingAdjustment:mutuallyExclusiveConstraints:] (in UIKit) + 36
10 UIKit -[UIView(UIConstraintBasedLayout) _updateContentSizeConstraints] (in UIKit) + 696
11 UIKit -[UIView(AdditionalLayoutSupport) _updateSystemConstraints] (in UIKit) + 112
12 UIKit -[UIView(AdditionalLayoutSupport) _sendUpdateConstraintsIfNecessaryForSecondPass:] (in UIKit) + 188
13 UIKit -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] (in UIKit) + 1008
14 UIKit -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] (in UIKit) + 712
15 UIKit -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] (in UIKit) + 712
16 UIKit -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] (in UIKit) + 712
17 Foundation -[NSISEngine withBehaviors:performModifications:] (in Foundation) + 168
18 UIKit 100-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:]_block_invoke (in UIKit) + 92
19 UIKit -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] (in UIKit) + 116
20 UIKit -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:] (in UIKit) + 168
21 UIKit -[UIWindow(UIConstraintBasedLayout) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:] (in UIKit) + 104
22 UIKit -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeededWithViewForVariableChangeNotifications:] (in UIKit) + 428
23 UIKit -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] (in UIKit) + 180
24 UIKit -[UIView(CALayerDelegate) layoutSublayersOfLayer:] (in UIKit) + 1276
25 QuartzCore -[CALayer layoutSublayers] (in QuartzCore) + 184
26 QuartzCore CA::Layer::layout_if_needed(CA::Transaction*) (in QuartzCore) + 332
27 QuartzCore CA::Context::commit_transaction(CA::Transaction*) (in QuartzCore) + 336
28 QuartzCore CA::Transaction::commit() (in QuartzCore) + 540
29 QuartzCore CA::Transaction::observer_callback(CFRunLoopObserver*, unsigned long, void*) (in QuartzCore) + 92
30 CoreFoundation CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ (in CoreFoundation) + 32
31 CoreFoundation CFRunLoopDoObservers (in CoreFoundation) + 412
32 CoreFoundation CFRunLoopRun (in CoreFoundation) + 1292
33 CoreFoundation CFRunLoopRunSpecific + 436
34 GraphicsServices GSEventRunModal + 100
35 UIKit UIApplicationMain + 208
36 ios-app main (main.m:27)
37 libdyld.dylib start (in libdyld.dylib) + 4
Run Code Online (Sandbox Code Playgroud)

Riv*_*era 4

这个问题让我仔细检查了我的崩溃日志。看起来这一切都来自UIKit后台线程的调用。

Xcode 9 现在会在调试应用程序时指出您从非主线程调用此类调用。尝试一下。

就我而言,正如我UIAlertController在崩溃的线程中看到的那样,这更容易,因此我可以缩小对这些调用的搜索范围。