Skip to content

Constraints are crashing when opening the gallery #71

@valentinaIancu-Hitta

Description

@valentinaIancu-Hitta

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.
2019-11-01 17:57:00.858871+0200 Bokadirekt Dev[10919:4818945] [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.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x2834efa20 h=--& v=--& _UIToolbarContentView:0x10ed19620.width == 0 (active)>",
"<NSLayoutConstraint:0x2834e8960 H:|-(0)-[_UIButtonBarStackView:0x10ed0d480] (active, names: '|':_UIToolbarContentView:0x10ed19620 )>",
"<NSLayoutConstraint:0x2834ebf70 _UIButtonBarStackView:0x10ed0d480.trailing == _UIToolbarContentView:0x10ed19620.trailing (active)>",
"<NSLayoutConstraint:0x2834ef8e0 'IB_Leading_Leading' H:|-(16)-[_UIModernBarButton:0x11217bd60] (active, names: '|':_UIButtonBarButton:0x115572580 )>",
"<NSLayoutConstraint:0x2834ed090 'IB_Trailing_Trailing' H:[_UIModernBarButton:0x11217bd60]-(16)-| (active, names: '|':_UIButtonBarButton:0x115572580 )>",
"<NSLayoutConstraint:0x2834ef020 'UISV-canvas-connection' UILayoutGuide:0x282e40c40'UIViewLayoutMarginsGuide'.leading == _UIButtonBarButton:0x115572580.leading (active)>",
"<NSLayoutConstraint:0x2834ecb40 'UISV-canvas-connection' UILayoutGuide:0x282e40c40'UIViewLayoutMarginsGuide'.trailing == UIView:0x115524200.trailing (active)>",
"<NSLayoutConstraint:0x2834ecc30 'UISV-spacing' H:[_UIButtonBarButton:0x115572580]-(0)-[UIView:0x115524200] (active)>",
"<NSLayoutConstraint:0x2834ea620 'UIView-leftMargin-guide-constraint' H:|-(0)-UILayoutGuide:0x282e40c40'UIViewLayoutMarginsGuide' (active, names: '|':_UIButtonBarStackView:0x10ed0d480 )>",
"<NSLayoutConstraint:0x2834e85a0 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x282e40c40'UIViewLayoutMarginsGuide']-(0)-|(LTR) (active, names: '|':_UIButtonBarStackView:0x10ed0d480 )>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x2834ed090 'IB_Trailing_Trailing' H:[_UIModernBarButton:0x11217bd60]-(16)-| (active, names: '|':_UIButtonBarButton:0x115572580 )>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions