Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LayoutConstraints] Unable to simultaneously satisfy constraints #221

Open
waynedyck opened this issue Jul 21, 2021 · 0 comments
Open

[LayoutConstraints] Unable to simultaneously satisfy constraints #221

waynedyck opened this issue Jul 21, 2021 · 0 comments
Assignees

Comments

@waynedyck
Copy link
Contributor

Navigating to the Ferries section results in the following log messages:

2021-07-21 15:27:08.611664-0700 WSDOT[52532:1272969] [LayoutConstraints] Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x6000037b1900 H:|-(8)-[UIButton:0x7fdea64c5f10'Buy Tickets']   (active, names: '|':UIView:0x7fdeaa3677a0 )>",
    "<NSLayoutConstraint:0x6000037b3480 H:[UIButton:0x7fdea64c5f10'Buy Tickets']-(21.5)-[UIButton:0x7fdea64f8340'Reservations']   (active)>",
    "<NSLayoutConstraint:0x6000037b0c80 H:[UIButton:0x7fdea64f8340'Reservations']-(8)-|   (active, names: '|':UIView:0x7fdeaa3677a0 )>",
    "<NSLayoutConstraint:0x6000037b3b60 UIView:0x7fdeaa3677a0.leading == UILayoutGuide:0x600002dd2f40'UIViewSafeAreaLayoutGuide'.leading   (active)>",
    "<NSLayoutConstraint:0x6000037b29e0 UIView:0x7fdeaa3677a0.trailing == UILayoutGuide:0x600002dd2f40'UIViewSafeAreaLayoutGuide'.trailing   (active)>",
    "<NSLayoutConstraint:0x6000037b0550 UIButton:0x7fdea64c5f10'Buy Tickets'.width == 0.45*UILayoutGuide:0x600002dd2f40'UIViewSafeAreaLayoutGuide'.width   (active)>",
    "<NSLayoutConstraint:0x6000037b0e60 UIButton:0x7fdea64f8340'Reservations'.width == 0.45*UILayoutGuide:0x600002dd2f40'UIViewSafeAreaLayoutGuide'.width   (active)>",
    "<NSLayoutConstraint:0x60000345caa0 '_UITemporaryLayoutWidth' UIView:0x7fdeaa3ab060.width == 390   (active)>",
    "<NSLayoutConstraint:0x6000037b3980 'UIViewSafeAreaLayoutGuide-left' H:|-(0)-[UILayoutGuide:0x600002dd2f40'UIViewSafeAreaLayoutGuide'](LTR)   (active, names: '|':UIView:0x7fdeaa3ab060 )>",
    "<NSLayoutConstraint:0x6000037b2530 'UIViewSafeAreaLayoutGuide-right' H:[UILayoutGuide:0x600002dd2f40'UIViewSafeAreaLayoutGuide']-(0)-|(LTR)   (active, names: '|':UIView:0x7fdeaa3ab060 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x6000037b3480 H:[UIButton:0x7fdea64c5f10'Buy Tickets']-(21.5)-[UIButton:0x7fdea64f8340'Reservations']   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2021-07-21 15:27:08.638337-0700 WSDOT[52532:1272969] [LayoutConstraints] Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x6000037b1900 H:|-(8)-[UIButton:0x7fdea64c5f10'Buy Tickets']   (active, names: '|':UIView:0x7fdeaa3677a0 )>",
    "<NSLayoutConstraint:0x6000037b3480 H:[UIButton:0x7fdea64c5f10'Buy Tickets']-(21.5)-[UIButton:0x7fdea64f8340'Reservations']   (active)>",
    "<NSLayoutConstraint:0x6000037b0c80 H:[UIButton:0x7fdea64f8340'Reservations']-(8)-|   (active, names: '|':UIView:0x7fdeaa3677a0 )>",
    "<NSLayoutConstraint:0x6000037b3b60 UIView:0x7fdeaa3677a0.leading == UILayoutGuide:0x600002dd2f40'UIViewSafeAreaLayoutGuide'.leading   (active)>",
    "<NSLayoutConstraint:0x6000037b29e0 UIView:0x7fdeaa3677a0.trailing == UILayoutGuide:0x600002dd2f40'UIViewSafeAreaLayoutGuide'.trailing   (active)>",
    "<NSLayoutConstraint:0x6000037b0550 UIButton:0x7fdea64c5f10'Buy Tickets'.width == 0.45*UILayoutGuide:0x600002dd2f40'UIViewSafeAreaLayoutGuide'.width   (active)>",
    "<NSLayoutConstraint:0x6000037b0e60 UIButton:0x7fdea64f8340'Reservations'.width == 0.45*UILayoutGuide:0x600002dd2f40'UIViewSafeAreaLayoutGuide'.width   (active)>",
    "<NSLayoutConstraint:0x60000345f840 'UIView-Encapsulated-Layout-Width' UIView:0x7fdeaa3ab060.width == 390   (active)>",
    "<NSLayoutConstraint:0x6000037b3980 'UIViewSafeAreaLayoutGuide-left' H:|-(0)-[UILayoutGuide:0x600002dd2f40'UIViewSafeAreaLayoutGuide'](LTR)   (active, names: '|':UIView:0x7fdeaa3ab060 )>",
    "<NSLayoutConstraint:0x6000037b2530 'UIViewSafeAreaLayoutGuide-right' H:[UILayoutGuide:0x600002dd2f40'UIViewSafeAreaLayoutGuide']-(0)-|(LTR)   (active, names: '|':UIView:0x7fdeaa3ab060 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x6000037b3480 H:[UIButton:0x7fdea64c5f10'Buy Tickets']-(21.5)-[UIButton:0x7fdea64f8340'Reservations']   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
@waynedyck waynedyck self-assigned this Jul 21, 2021
@waynedyck waynedyck assigned englehorn and unassigned waynedyck Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants