Skip to content

NSInternalInconsistencyException crash in CropView._InteractiveCropGuideView during gesture handling #257

@spartan-minhnguyen

Description

@spartan-minhnguyen

Description:

Fatal Exception: NSInternalInconsistencyException
NSLayoutConstraint constant is not finite! That's illegal. constant:inf firstAnchor:<NSLayoutXAxisAnchor:0x3003aaa40 "_TtCC12BrightroomUI8CropView25_InteractiveCropGuideView:0x105259200.left"> secondAnchor:<NSLayoutXAxisAnchor:0x3003b94c0 "BrightroomUI.CropView:0x118c80500.left">

  • While using Brightroom, a crash occurs when handling pan gestures in the CropView._InteractiveCropGuideView. This crash happens specifically in the onGestureTrackingChanged() method when setting constraints (NSLayoutConstraint.setConstant).

  • The crash log indicates an NSInternalInconsistencyException caused by invalid or unexpected constants being applied to a constraint.

Actual Behavior:

  • The app crashes with the following exception: Fatal Exception: NSInternalInconsistencyException -[NSLayoutConstraint setConstant:]

Crash Log:
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x827cc __exceptionPreprocess
1 libobjc.A.dylib 0x172e4 objc_exception_throw
2 Foundation 0x80f8d8 _userInfoForFileAndLine
3 CoreAutoLayout 0x4d44 -[NSLayoutConstraint _setSymbolicConstant:constant:symbolicConstantMultiplier:]
4 CoreAutoLayout 0x4854 -[NSLayoutConstraint setConstant:]
5 App 0x4e4c44 CropView._InteractiveCropGuideView.onGestureTrackingChanged() + 372 (CropView._InteractiveCropGuideView.swift:372)
6 App 0x4e7094 CropView._InteractiveCropGuideView.handlePanGestureInLeft(gesture:) + 902 (CropView._InteractiveCropGuideView.swift:902)
7 App 0x4e710c @objc CropView._InteractiveCropGuideView.handlePanGestureInLeft(gesture:) ()
...

Environment:
Brightroom version: 3.0.0 beta 5
iOS version: iOS 18.1.1
Device model: iPhone 13 Pro

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions