gpt4 book ai didi

iOS 在 App Store 审查自动布局方法中崩溃

转载 作者:行者123 更新时间:2023-12-02 02:09:47 26 4
gpt4 key购买 nike

我遇到了一个问题,某个应用程序在 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

最佳答案

原来这是与自动布局无关的内存问题,是由 Swift 2.2 编译器中的错误引起的,该错误已在 Swift 2.2.1 (Xcode 7.3.1) 中修复。自动布局方法恰好访问了由其他代码引起的无效内存地址。它在 AppStore 审核中重现,但对我来说无法重现,因为我有 Xcode 7.3.1,并且构建到 AppStore 是使用 Xcode 7.3 从不同的机器创建的。

关于iOS 在 App Store 审查自动布局方法中崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37624018/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com