deltachat / deltachat-ios

Email-based instant messaging for iOS.
GNU General Public License v3.0
306 stars 49 forks source link

Unable to simultaneously satisfy constraints when opening message view #2227

Closed r10s closed 1 week ago

r10s commented 2 weeks ago

when opening message view, we get the following warning for some (at least) chats:

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:0x1337fd2e0 '_UITemporaryLayoutWidth' deltachat_ios.ChatTitleView:0x117faf7b0.width == 0   (active)>",
    "<NSLayoutConstraint:0x1337cb960 'UISV-canvas-connection' UIStackView:0x124876570.leading == UILabel:0x13324aba0.leading   (active)>",
    "<NSLayoutConstraint:0x1337cbc30 'UISV-canvas-connection' H:[UIImageView:0x1248c7b10]-(0)-|   (active, names: '|':UIStackView:0x124876570 )>",
    "<NSLayoutConstraint:0x133791900 'UISV-canvas-connection' deltachat_ios.ChatTitleView:0x117faf7b0.leading == _UILayoutSpacer:0x1337980f0'UISV-alignment-spanner'.leading   (active)>",
    "<NSLayoutConstraint:0x1337cb2e0 'UISV-canvas-connection' deltachat_ios.ChatTitleView:0x117faf7b0.centerX == UIStackView:0x124876570.centerX   (active)>",
    "<NSLayoutConstraint:0x1337cc000 'UISV-spacing' H:[UILabel:0x13324aba0]-(3)-[UIImageView:0x1248c7b10]   (active)>",
    "<NSLayoutConstraint:0x1236d1120 'UISV-spanning-boundary' _UILayoutSpacer:0x1337980f0'UISV-alignment-spanner'.leading <= UIStackView:0x124876570.leading   (active)>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x1337cc000 'UISV-spacing' H:[UILabel:0x13324aba0]-(3)-[UIImageView:0x1248c7b10]   (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.