Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Crash with non-finite constraint multiplier (dividing by zero) #18

Open
ian-mcdowell opened this issue Feb 7, 2018 · 1 comment
Open
Labels

Comments

@ian-mcdowell
Copy link

ian-mcdowell commented Feb 7, 2018

I triggered a crash in OpenTerm while trying to dock a panel to the side.

I believe this is caused by PanelManager+AutoLayout:updateFrame(for:to:keyboardShown) dividing by zero. Not sure the circumstances that caused this, or if this is something misconfigured in OpenTerm, but there should be a check to handle this case in PanelKit.

Crash is below:

Assertion failure in -[NSLayoutConstraint _setMultiplier:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/Foundation/Foundation-1444.12/Layout.subproj/NSLayoutConstraint.m:196
2018-02-06 16:45:07.837694-0800 OpenTerm[38697:2877706] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Multiplier is not finite!  That's illegal.  multiplier:inf'
@ian-mcdowell
Copy link
Author

ian-mcdowell commented Feb 7, 2018

Turns out the PanelManager was missing a panel in the panels array. A better error should be thrown if a panel is presented that is not part of the panels array.

@louisdh louisdh added the bug label Mar 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants