About a week ago, I turned on Auto Layout for xib file that contains a view. I added constraints and my subviews (some images and a label) were positioned exactly as I wanted. I thought that auto layout was great. Today, I discovered that the app crashes on iOS 7.1 using the simulator for an iPhone 5s. Console output is below. I'm using Xcode 6.1. Everything works fine on iOS 8.1. Xcode shows no warnings or errors for the constraints.
I found two similar questions on Stack Overflow, but they didn't help me. http://stackoverflow.com/questions/26024906/unable-to-create-description-in -descriptionforlayoutattribute-layoutitem-coeffi http://stackoverflow.com/questions/14042016/ios-6-auto-layout-constraints-e rror-something-is-nil Does anyone have thoughts how to solve this? If I can't find a solution, I may need to turn off auto layout and revert to using autoresizing. Console output: 2014-11-05 11:26:32.602 SSP[20856:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unable to create description in descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil' *** First throw call stack: ( 0 CoreFoundation 0x000000011019c495 __exceptionPreprocess + 165 1 libobjc.A.dylib 0x000000010fa6599e objc_exception_throw + 43 2 CoreFoundation 0x000000011019c2ad +[NSException raise:format:] + 205 3 Foundation 0x000000010f432548 descriptionForLayoutAttribute_layoutItem_coefficient + 145 4 Foundation 0x000000010f4323bc -[NSLayoutConstraint equationDescription] + 216 5 Foundation 0x000000010f432831 -[NSLayoutConstraint description] + 297 6 CoreFoundation 0x000000011015d1b9 -[NSArray descriptionWithLocale:indent:] + 345 7 Foundation 0x000000010f2c414e _NSDescriptionWithLocaleFunc + 64 8 CoreFoundation 0x0000000110121244 __CFStringAppendFormatCore + 7252 9 CoreFoundation 0x000000011015f913 _CFStringCreateWithFormatAndArgumentsAux + 115 10 CoreFoundation 0x00000001101bfa5b _CFLogvEx + 123 11 Foundation 0x000000010f2f4276 NSLogv + 79 12 Foundation 0x000000010f2f420a NSLog + 148 13 UIKit 0x000000010e86a097 -[UIView(UIConstraintBasedLayout_EngineDelegate) engine:willBreakConstraint:dueToMutuallyExclusiveConstraints:] + 62 14 Foundation 0x000000010f4292ac -[NSISEngine handleUnsatisfiableRowWithHead:body:usingInfeasibilityHandlingBehavior:mutu allyExclusiveConstraints:] + 521 15 Foundation 0x000000010f42a9b1 -[NSISEngine tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasibil ityHandlingBehavior:mutuallyExclusiveConstraints:] + 353 16 Foundation 0x000000010f2e226b -[NSISEngine tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyE xclusiveConstraints:] + 663 17 Foundation 0x000000010f433180 -[NSLayoutConstraint _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstan tWasRounded:mutuallyExclusiveConstraints:] + 275 18 Foundation 0x000000010f2de1b0 -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 204 19 UIKit 0x000000010e85d591 -[UIView(UIConstraintBasedLayout) _layoutEngine_didAddLayoutConstraint:roundingAdjustment:mutuallyExclusiveCo nstraints:] + 362 20 UIKit 0x000000010e85d738 -[UIView(UIConstraintBasedLayout) _tryToAddConstraintWithoutUpdatingConstraintsArray:roundingAdjustment:mutua llyExclusiveConstraints:] + 30 21 UIKit 0x000000010e85d858 -[UIView(UIConstraintBasedLayout) _tryToAddConstraint:roundingAdjustment:mutuallyExclusiveConstraints:] + 232 22 UIKit 0x000000010e85db63 __50-[UIView(UIConstraintBasedLayout) addConstraints:]_block_invoke + 153 23 Foundation 0x000000010f42b29a -[NSISEngine withBehaviors:performModifications:] + 119 24 UIKit 0x000000010e85dabb -[UIView(UIConstraintBasedLayout) addConstraints:] + 263 25 UIKit 0x000000010e4e5078 -[UIButton updateConstraints] + 2816 26 UIKit 0x000000010e867539 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 223 27 UIKit 0x000000010e86768a -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 124 28 CoreFoundation 0x0000000110142f74 CFArrayApplyFunction + 68 29 UIKit 0x000000010e8674e7 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 141 30 UIKit 0x000000010e86768a -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 124 31 CoreFoundation 0x0000000110142f74 CFArrayApplyFunction + 68 32 UIKit 0x000000010e8674e7 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 141 33 UIKit 0x000000010e86768a -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 124 34 CoreFoundation 0x0000000110142f74 CFArrayApplyFunction + 68 35 UIKit 0x000000010e8674e7 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 141 36 UIKit 0x000000010e86768a -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 124 37 CoreFoundation 0x0000000110142f74 CFArrayApplyFunction + 68 38 UIKit 0x000000010e8674e7 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 141 39 UIKit 0x000000010e86768a -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 124 40 CoreFoundation 0x0000000110142f74 CFArrayApplyFunction + 68 41 UIKit 0x000000010e8674e7 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 141 42 UIKit 0x000000010e86768a -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 124 43 CoreFoundation 0x0000000110142f74 CFArrayApplyFunction + 68 44 UIKit 0x000000010e8674e7 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 141 45 UIKit 0x000000010e86768a -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 124 46 CoreFoundation 0x0000000110142f74 CFArrayApplyFunction + 68 47 UIKit 0x000000010e8674e7 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 141 48 UIKit 0x000000010e86768a -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 124 49 Foundation 0x000000010f42b29a -[NSISEngine withBehaviors:performModifications:] + 119 50 UIKit 0x000000010e85c9fe -[UIWindow(UIConstraintBasedLayout) updateConstraintsIfNeeded] + 212 51 UIKit 0x000000010e2ef228 -[UIView(Hierarchy) layoutSubviews] + 77 52 UIKit 0x000000010e4cd8b4 -[UILayoutContainerView layoutSubviews] + 233 53 UIKit 0x000000010e2fa993 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 354 54 QuartzCore 0x000000010dbba802 -[CALayer layoutSublayers] + 151 55 QuartzCore 0x000000010dbaf369 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 363 56 QuartzCore 0x000000010dbaf1ea _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24 57 QuartzCore 0x000000010db22fb8 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 252 58 QuartzCore 0x000000010db24030 _ZN2CA11Transaction6commitEv + 394 59 QuartzCore 0x000000010db2469d _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 89 60 CoreFoundation 0x0000000110167dc7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23 61 CoreFoundation 0x0000000110167d37 __CFRunLoopDoObservers + 391 62 CoreFoundation 0x0000000110147522 __CFRunLoopRun + 946 63 CoreFoundation 0x0000000110146d83 CFRunLoopRunSpecific + 467 64 GraphicsServices 0x000000011213ff04 GSEventRunModal + 161 65 UIKit 0x000000010e29ae33 UIApplicationMain + 1010 66 SSP 0x000000010cfb71a9 main + 169 67 libdyld.dylib 0x00000001108ef5fd start + 1 68 ??? 0x0000000000000001 0x0 + 1 ) Thanks, Chuck _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com