集合< __ NSSetM:0x79938670>在被列举时被突变

时间:2016-02-23 16:53:28

标签: ios

我正在使用带有一些标签的UITableView&图像在其单元格中。从服务器获取数据后填充数据。 大多数情况下它运行正常,但有时app会因此跟踪而崩溃:

Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <__NSSetM: 0x79938670> was mutated while being enumerated.'
*** First throw call stack:
(
    0   CoreFoundation                      0x05bde746 __exceptionPreprocess + 182
    1   libobjc.A.dylib                     0x05867a97 objc_exception_throw + 44
    2   CoreFoundation                      0x05bddfe6 __NSFastEnumerationMutationHandler + 166
    3   Foundation                          0x01b80617 -[NSISEngine chooseOutgoingRowHeadForIncomingRowHead:] + 347
    4   Foundation                          0x01b7dc60 -[NSISEngine minimizeConstantInObjectiveRowWithHead:] + 228
    5   Foundation                          0x01d32349 -[NSISEngine tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:] + 291
    6   Foundation                          0x01b7b4cb -[NSISEngine tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:] + 760
    7   Foundation                          0x01d3a02f -[NSLayoutConstraint _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:] + 280
    8   Foundation                          0x01b6e93b -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 258
    9   UIKit                               0x029f81bc -[UIView(UIConstraintBasedLayout) _layoutEngine_didAddLayoutConstraint:roundingAdjustment:mutuallyExclusiveConstraints:] + 450
    10  UIKit                               0x029f8507 -[UIView(UIConstraintBasedLayout) _tryToAddConstraintWithoutUpdatingConstraintsArray:roundingAdjustment:mutuallyExclusiveConstraints:] + 61
    11  UIKit                               0x029f865c -[UIView(UIConstraintBasedLayout) _tryToAddConstraint:roundingAdjustment:mutuallyExclusiveConstraints:] + 281
    12  UIKit                               0x029f8854 -[UIView(UIConstraintBasedLayout) nsli_addConstraint:] + 56
    13  UIKit                               0x029f8814 -[UIView(UIConstraintBasedLayout) _addConstraint:] + 218
    14  UIKit                               0x029f8735 -[UIView(UIConstraintBasedLayout) addConstraint:] + 40
    15  UIKit                               0x029f8a2f __50-[UIView(UIConstraintBasedLayout) addConstraints:]_block_invoke + 172
    16  Foundation                          0x01b7e077 -[NSISEngine withBehaviors:performModifications:] + 150
    17  Foundation                          0x01b815cf -[NSISEngine withAutomaticOptimizationDisabled:] + 48
    18  UIKit                               0x029f7d9f -[UIView(UIConstraintBasedLayout) _withAutomaticEngineOptimizationDisabled:] + 64
    19  UIKit                               0x029f897b -[UIView(UIConstraintBasedLayout) addConstraints:] + 290
    20  UIKit                               0x029fa262 -[UIView(UIConstraintBasedLayout) _updateLayoutEngineHostConstraints] + 612
    21  UIKit                               0x02a060db -[UIView(AdditionalLayoutSupport) updateConstraints] + 58
    22  UIKit                               0x02a055a4 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 300
    23  UIKit                               0x02a05837 __125-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:]_block_invoke + 43
    24  Foundation                          0x01b7e077 -[NSISEngine withBehaviors:performModifications:] + 150
    25  Foundation                          0x01b815cf -[NSISEngine withAutomaticOptimizationDisabled:] + 48
    26  UIKit                               0x02a04fab -[UIView(AdditionalLayoutSupport) _withAutomaticEngineOptimizationDisabledIfEngineExists:] + 64
    27  UIKit                               0x02a05804 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 127
    28  UIKit                               0x02a0577f __UIViewRecursionHelper + 41
    29  CoreFoundation                      0x05ad1529 CFArrayApplyFunction + 57
    30  UIKit                               0x02a05527 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 175
    31  UIKit                               0x02a05804 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:] + 127
    32  UIKit                               0x02a05d96 __60-[UIView(AdditionalLayoutSupport) updateConstraintsIfNeeded]_block_invoke + 105
    33  UIKit                               0x02a04fb3 -[UIView(AdditionalLayoutSupport) _withAutomaticEngineOptimizationDisabledIfEngineExists:] + 72
    34  UIKit                               0x02a059ec -[UIView(AdditionalLayoutSupport) updateConstraintsIfNeeded] + 248
    35  UIKit                               0x027a0065 -[UITableViewCellContentView updateConstraintsIfNeeded] + 106
    36  UIKit                               0x02a0624d -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeeded] + 191
    37  UIKit                               0x0231137e -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 120
    38  UIKit                               0x0231167c -[UIView(Hierarchy) layoutSubviews] + 57
    39  UIKit                               0x0244e8c9 -[UIImageView layoutSubviews] + 217
    40  UIKit                               0x0231f52a -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 668
    41  libobjc.A.dylib                     0x0587d771 -[NSObject performSelector:withObject:] + 70
    42  QuartzCore                          0x020bde47 -[CALayer layoutSublayers] + 144
    43  QuartzCore                          0x020b1925 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 403
    44  QuartzCore                          0x020b177a _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
    45  QuartzCore                          0x0200dc22 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 284
    46  QuartzCore                          0x0200f0b5 _ZN2CA11Transaction6commitEv + 487
    47  QuartzCore                          0x0200f7cc _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
    48  CoreFoundation                      0x05aff86e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
    49  CoreFoundation                      0x05aff7b0 __CFRunLoopDoObservers + 400
    50  CoreFoundation                      0x05af51ea __CFRunLoopRun + 1226
    51  CoreFoundation                      0x05af4a5b CFRunLoopRunSpecific + 443
    52  CoreFoundation                      0x05af488b CFRunLoopRunInMode + 123
    53  GraphicsServices                    0x075492c9 GSEventRunModal + 192
    54  GraphicsServices                    0x07549106 GSEventRun + 104
    55  UIKit                               0x0228c0b6 UIApplicationMain + 1526
    56  NightStay                           0x001aa2aa main + 138
    57  libdyld.dylib                       0x061baac9 start + 1
    58  ???                                 0x00000001 0x0 + 1

有人可以为此提供帮助吗?

0 个答案:

没有答案