#ios #autolayout #sigabrt
#iOS #автоматическое описание #sigabrt
Вопрос:
Исключение NSInternalInconsistencyException
SIGABRT
Переменная, хранящаяся в таблице, не соответствует переданной в переменной 0x282720900.negError{id: 1046} != placeholderForExpressionBeingAdded{id: 1019}
Произошел сбой потока
#0 Thread
NSInternalInconsistencyException
EXC_CRASH
0 CoreFoundation ___exceptionPreprocess
1 libobjc.A.dylib _objc_exception_throw
2 CoreFoundation [_CFXNotificationTokenRegistration keyCallbacks]
3 Foundation -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
4 Foundation __engineVarForVariable
5 Foundation __addToEngineVarTableIfNeeded
6 Foundation -[NSISEngine tryToAddConstraintWithMarker:expression:mutuallyExclusiveConstraints:]
7 Foundation -[NSLayoutConstraint _addLoweredExpression:toEngine:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:]
8 Foundation -[NSLayoutConstraint _addToEngine:mutuallyExclusiveConstraints:]
9 UIKitCore -[UIView(UIConstraintBasedLayout) _layoutEngine_didAddLayoutConstraint:roundingAdjustment:mutuallyExclusiveConstraints:]
10 UIKitCore -[UIView(UIConstraintBasedLayout) _tryToAddConstraintWithoutUpdatingConstraintsArray:roundingAdjustment:mutuallyExclusiveConstraints:]
11 UIKitCore -[UIView(UIConstraintBasedLayout) nsli_addConstraint:]
12 UIKitCore -[UIView(UIConstraintBasedLayout) _updateContentSizeConstraints]
13 UIKitCore -[UIView(AdditionalLayoutSupport) _updateSystemConstraints]
14 UIKitCore -[UIButton updateConstraints]
15 UIKitCore -[UIView(AdditionalLayoutSupport) _sendUpdateConstraintsIfNecessaryForSecondPass:]
16 UIKitCore -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:]
17 UIKitCore -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:]
18 Foundation -[NSISEngine withBehaviors:performModifications:]
19 UIKitCore ___100-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:]_block_invoke
20 UIKitCore -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:]
21 UIKitCore -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:]
22 UIKitCore -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeededWithViewForVariableChangeNotifications:]
23 UIKitCore -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine]
24 xxxxxxxx -[UIView(category) xxxxxx_layoutSubviews] UIView HighLayer.m:29
25 UIKitCore -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
26 QuartzCore -[CALayer layoutSublayers]
27 QuartzCore __ZN2CA5Layer16layout_if_neededEPNS_11TransactionE
28 QuartzCore __ZN2CA7Context18commit_transactionEPNS_11TransactionE
29 QuartzCore __ZN2CA11Transaction6commitEv
30 QuartzCore __ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv
31 CoreFoundation ___CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
32 CoreFoundation ___CFRunLoopDoObservers
33 CoreFoundation ___CFRunLoopRun
34 CoreFoundation _CFRunLoopRunSpecific
35 GraphicsServices _GSEventRunModal
36 UIKitCore _UIApplicationMain
37 xxxxxxxx main main.mm:50
38 libdyld.dylib _start
Комментарии:
1. Для этого действительно нужен актуальный вопрос, а не только ваша трассировка стека. Пожалуйста, отредактируйте свой вопрос, добавив соответствующий код и актуальный вопрос.
Ответ №1:
Я столкнулся с такой ситуацией. Причиной сбоя является вызов методов UIKit в подпотоке. Вам лучше включить «Проверку основного потока», хотя ваш аварийный поток равен # 0.