简体   繁体   English

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

[英]iOS crash on App Store review inside autolayout methods

I have a problem with an app rejected during App Store review with the reason that it crashes on launch. 我在App Store审核期间拒绝某个应用程序时遇到问题,原因是该应用程序在启动时崩溃。 It works without issues or autolayout warnings for me in debug and release configurations (when installed from TestFlight). 在调试和发布配置中(从TestFlight安装时),它对我没有问题或没有自动布局警告。 Stack trace does not include any app code except the main function. 堆栈跟踪除了主要功能外不包含任何应用程序代码。

Please help to identify the possible issue. 请帮助确定可能的问题。

Relevant part of crash log: 崩溃日志的相关部分:

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

Turned out it was memory issue not related to autolayout and caused by bug in Swift 2.2 compiler which is already fixed in Swift 2.2.1 (Xcode 7.3.1). 原来这是与自动布局无关的内存问题,是由Swift 2.2编译器中的错误引起的,该问题已在Swift 2.2.1(Xcode 7.3.1)中修复。 Autolayout methods just happened to access invalid memory address caused by other code. 自动布局方法刚巧访问了由其他代码引起的无效内存地址。 It was reproduced on AppStore review and was not reproducible for me because I had Xcode 7.3.1 and build to AppStore was created from different machine with Xcode 7.3. 它是在AppStore审查中复制的,对我来说是不可复制的,因为我有Xcode 7.3.1,并且构建到AppStore的是使用Xcode 7.3从另一台计算机创建的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM