ios - 崩溃 : Engine Marked As Needing Optimization

标签 ios

我在现场有一个应用程序在 iOS 11 的某个时候开始崩溃,并显示以下消息:

CRASH: Engine marked as needing optimization even though it's already in progress.

崩溃发生在 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

最佳答案

question made 让我仔细检查我的崩溃日志。似乎这一切都来自后台线程进行的 UIKit 调用。

Xcode 9 现在会在调试您的应用程序时向您指出,并且会从非主线程调用此类调用。试试吧。

在我的例子中,它更容易,因为我在崩溃的线程中看到 UIAlertController,所以我可以缩小对这些调用的搜索范围。

关于ios - 崩溃 : Engine Marked As Needing Optimization,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47288107/

相关文章:

ios - 在 iOS 中使用 Google Maps API 自定义 Google Maps Style

iOS9:自定义UIWindow让状态栏消失

ios - skobbler 我可以缓存 json 数据吗?

ios - 向 UITable View 添加新项目与 reloadData

ios - 获取当前位置而不是缓存 ios

ios - 错误 : Deployment Update target 8. 3 NSMutableArray 和 addObjectsFromArray - swift

ios - 计时器间歇性漏秒

ios - 将 static void * 转换为 NSObject*

ios - 抓取 iPhone screenWidth 和 Height 以实现可重用性

iphone - "setting"UI 是由 iphone/touch/ipad 中的表格 View 实现的吗?