iOS自动布局方法中的App Store评论崩溃

时间:2016-06-03 21:53:34

标签: ios crash

我在App Store审核期间拒绝了应用的问题,原因是它在启动时崩溃了。它在调试和发布配置中(从TestFlight安装时)对我没有问题或自动布局警告。堆栈跟踪不包括除主函数之外的任何应用程序代码。

请帮助确定可能的问题。

崩溃日志的相关部分:

OS Version:          iOS 9.3.2 (13F69)

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000073006910
Triggered by Thread:  0

Filtered syslog:
None found

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libobjc.A.dylib                 0x000000018061db90 objc_msgSend + 16
1   Foundation                      0x00000001818dbc38 -[NSISLinearExpression enumerateVariablesAndCoefficients:] + 284
2   Foundation                      0x00000001818df078 -[NSISObjectiveLinearExpression replaceVariable:withExpression:processVariableNewToReceiver:processVariableDroppedFromReceiver:] + 352
3   Foundation                      0x00000001818dcc88 -[NSISEngine substituteOutAllOccurencesOfBodyVar:withExpression:] + 600
4   Foundation                      0x00000001818dc00c -[NSISEngine tryAddingDirectly:] + 140
5   Foundation                      0x00000001818db8a0 -[NSISEngine tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:] + 540
6   Foundation                      0x00000001818db53c -[NSLayoutConstraint _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:] + 284
7   Foundation                      0x00000001818d9138 -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 228
8   UIKit                           0x0000000186201a70 -[UIView(UIConstraintBasedLayout) _layoutEngine_didAddLayoutConstraint:roundingAdjustment:mutuallyExclusiveConstraints:] + 468
9   UIKit                           0x0000000186201840 -[UIView(UIConstraintBasedLayout) _tryToAddConstraintWithoutUpdatingConstraintsArray:roundingAdjustment:mutuallyExclusiveConstraints:] + 72
10  UIKit                           0x00000001862016e8 -[UIView(UIConstraintBasedLayout) _tryToAddConstraint:roundingAdjustment:mutuallyExclusiveConstraints:] + 288
11  UIKit                           0x00000001862015ac -[UIView(UIConstraintBasedLayout) _addConstraint:] + 280
12  UIKit                           0x00000001862061a8 -[UIView(UIConstraintBasedLayout) _updateContentSizeConstraints] + 1048
13  UIKit                           0x000000018620209c -[UIView(AdditionalLayoutSupport) updateConstraints] + 244
14  UIKit                           0x0000000186205d80 -[UILabel updateConstraints] + 220
15  UIKit                           0x0000000186992ee4 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:] + 460
16  UIKit                           0x000000018699314c -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:] + 200
17  UIKit                           0x0000000186992e14 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:] + 252
18  Foundation                      0x00000001818d8cc0 -[NSISEngine withBehaviors:performModifications:] + 168
19  UIKit                           0x0000000186204d98 -[UIView(AdditionalLayoutSupport) _withAutomaticEngineOptimizationDisabledIfEngineExists:] + 64
20  UIKit                           0x0000000186993120 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:] + 156
21  UIKit                           0x0000000186992e14 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:] + 252
22  Foundation                      0x00000001818d8cc0 -[NSISEngine withBehaviors:performModifications:] + 168
23  UIKit                           0x0000000186204d98 -[UIView(AdditionalLayoutSupport) _withAutomaticEngineOptimizationDisabledIfEngineExists:] + 64
24  UIKit                           0x0000000186993120 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:] + 156
25  UIKit                           0x0000000186992e14 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:] + 252
26  UIKit                           0x000000018699314c -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:] + 200
27  UIKit                           0x0000000186205c7c __60-[UIView(AdditionalLayoutSupport) updateConstraintsIfNeeded]_block_invoke + 100
28  Foundation                      0x00000001818d8cc0 -[NSISEngine withBehaviors:performModifications:] + 168
29  UIKit                           0x0000000186204d98 -[UIView(AdditionalLayoutSupport) _withAutomaticEngineOptimizationDisabledIfEngineExists:] + 64
30  UIKit                           0x00000001862058b0 -[UIView(AdditionalLayoutSupport) updateConstraintsIfNeeded] + 244
31  UIKit                           0x0000000186223110 -[UIWindow(UIConstraintBasedLayout) updateConstraintsIfNeeded] + 108
32  UIKit                           0x00000001869937f0 -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeeded] + 268
33  UIKit                           0x0000000186410aa0 -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 176
34  UIKit                           0x00000001860f8210 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 700
35  QuartzCore                      0x0000000183a8a994 -[CALayer layoutSublayers] + 148
36  QuartzCore                      0x0000000183a855d0 CA::Layer::layout_if_needed(CA::Transaction*) + 292
37  QuartzCore                      0x0000000183a85490 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
38  QuartzCore                      0x0000000183a84ac0 CA::Context::commit_transaction(CA::Transaction*) + 252
39  QuartzCore                      0x0000000183a84820 CA::Transaction::commit() + 500
40  QuartzCore                      0x0000000183a7dde4 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 80
41  CoreFoundation                  0x0000000180f5c728 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
42  CoreFoundation                  0x0000000180f5a4cc __CFRunLoopDoObservers + 372
43  CoreFoundation                  0x0000000180e84c70 CFRunLoopRunSpecific + 416
44  UIKit                           0x000000018616b94c -[UIApplication _run] + 460
45  UIKit                           0x0000000186166088 UIApplicationMain + 204
46  MyApp                       0x0000000100095a38 main (AppDelegate.swift:13)
47  libdyld.dylib                   0x0000000180a228b8 start + 4

1 个答案:

答案 0 :(得分:0)

原来这是与自动布局无关的内存问题,并且是由Swift 2.2编译器中的错误导致的,这已经在Swift 2.2.1(Xcode 7.3.1)中得到修复。 Autolayout方法恰好访问了其他代码导致的无效内存地址。它在AppStore评论中被复制,对我来说是不可复制的,因为我有Xcode 7.3.1,并且使用Xcode 7.3从不同的机器创建了AppStore。

相关问题