• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: auto layout exception: Unable to create description in descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: auto layout exception: Unable to create description in descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil


  • Subject: Re: auto layout exception: Unable to create description in descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil
  • From: Chuck Soper <email@hidden>
  • Date: Fri, 07 Nov 2014 15:14:27 -0800
  • Thread-topic: auto layout exception: Unable to create description in descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil

Thanks for your reply. I fixed the issue by removing all the constraints
and re-adding them. Each time I added some constraints, I confirmed
compatibility with iOS 7.1 The one thing that I did differently was that I
added width and height constraints to some images. I only had about a
dozen views (images, controls, etc.), so it didn't take very long.

I believe that the breaking constraint was generated by Xcode when I did a
"Add Missing Constraints" on a some selected images.


Chuck


On 11/6/14, 2:11 AM, "Jonathan Mitchell" <email@hidden> wrote:

>Frame 13 indicates that you have a breaking constraint.
>The framework bug (if such it be) is triggered on iOS 7.1 trying to log
>the breaking constraint.
>
>	12  Foundation                          0x000000010f2f420a NSLog + 148
>	13  UIKit                               0x000000010e86a097
>-[UIView(UIConstraintBasedLayout_EngineDelegate)
>engine:willBreakConstraint:dueToMutuallyExclusiveConstraints:] + 62
>
>I would try and locate the breaking constraint and adjust my constrains
>accordingly.
>The constraint may be breaking in all iOS builds, check the logs for
>layout warnings.
>
>Obviously its is not desirable that the constraint issues crashes the app
>but if you can track it in the simulator I imagine that it is fixable.
>
>Jonathan
>
>
>> On 6 Nov 2014, at 01:41, Chuck Soper <email@hidden> wrote:
>>
>> 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:mu
>>tu
>> allyExclusiveConstraints:] + 521
>> 	15  Foundation                          0x000000010f42a9b1 -[NSISEngine
>>
>>tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasib
>>il
>> ityHandlingBehavior:mutuallyExclusiveConstraints:] + 353
>> 	16  Foundation                          0x000000010f2e226b -[NSISEngine
>>
>>tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuall
>>yE
>> xclusiveConstraints:] + 663
>> 	17  Foundation                          0x000000010f433180
>> -[NSLayoutConstraint
>>
>>_addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConst
>>an
>> tWasRounded:mutuallyExclusiveConstraints:] + 275
>> 	18  Foundation                          0x000000010f2de1b0
>> -[NSLayoutConstraint
>> _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] +
>>204
>> 	19  UIKit                               0x000000010e85d591
>> -[UIView(UIConstraintBasedLayout)
>>
>>_layoutEngine_didAddLayoutConstraint:roundingAdjustment:mutuallyExclusive
>>Co
>> nstraints:] + 362
>> 	20  UIKit                               0x000000010e85d738
>> -[UIView(UIConstraintBasedLayout)
>>
>>_tryToAddConstraintWithoutUpdatingConstraintsArray:roundingAdjustment:mut
>>ua
>> 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 (email@hidden)
>>
>> 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:
>>
>>om
>>
>> This email sent to email@hidden
>
>
>_______________________________________________
>
>Cocoa-dev mailing list (email@hidden)
>
>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:
>
>This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


References: 
 >auto layout exception: Unable to create description in descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil (From: Chuck Soper <email@hidden>)
 >Re: auto layout exception: Unable to create description in descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil (From: Jonathan Mitchell <email@hidden>)

  • Prev by Date: How to obtain paths of laid-out text
  • Next by Date: NSSplitView divider position
  • Previous by thread: Re: auto layout exception: Unable to create description in descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil
  • Next by thread: Re: Closing window on Yosemite crashes (isFlipped)
  • Index(es):
    • Date
    • Thread