-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Sanitize measure function results #44557
Conversation
This pull request was exported from Phabricator. Differential Revision: D57285584 |
Summary: We've started seeing assertion failures in Yoga where a `NaN` value makes its way to an `availableHeight` constraint when measuring Litho tree. Because it's only happening on Litho, I have some suspicion this might be originating from a Litho-specific measure function. This adds sanitization in Yoga to measure function results, where we will log an error, and set size to zero, if either dimension ends up being negative of `NaN`. This doesn't really help track down where the error was happening, but Yoga doesn't have great context to show this to begin with. If we see this is issue, next steps would be Litho internal intrumentation to find culprit. Changelog: [Internal] Differential Revision: D57285584
92ea2ad
to
3e2640d
Compare
This pull request was exported from Phabricator. Differential Revision: D57285584 |
Base commit: 651c1d2 |
Summary: X-link: facebook/react-native#44557 We've started seeing assertion failures in Yoga where a `NaN` value makes its way to an `availableHeight` constraint when measuring Litho tree. Because it's only happening on Litho, I have some suspicion this might be originating from a Litho-specific measure function. This adds sanitization in Yoga to measure function results, where we will log an error, and set size to zero, if either dimension ends up being negative of `NaN`. This doesn't really help track down where the error was happening, but Yoga doesn't have great context to show this to begin with. If we see this is issue, next steps would be Litho internal intrumentation to find culprit. Changelog: [Internal] Reviewed By: joevilches Differential Revision: D57285584 fbshipit-source-id: 935fcdd28c05bbac0d73e1c7654ae11a74898537
This pull request has been merged in 44f9371. |
This pull request was successfully merged by @NickGerleman in 44f9371. When will my fix make it into a release? | How to file a pick request? |
Summary: X-link: facebook/react-native#44557 We've started seeing assertion failures in Yoga where a `NaN` value makes its way to an `availableHeight` constraint when measuring Litho tree. Because it's only happening on Litho, I have some suspicion this might be originating from a Litho-specific measure function. This adds sanitization in Yoga to measure function results, where we will log an error, and set size to zero, if either dimension ends up being negative of `NaN`. This doesn't really help track down where the error was happening, but Yoga doesn't have great context to show this to begin with. If we see this is issue, next steps would be Litho internal intrumentation to find culprit. Changelog: [Internal] Reviewed By: joevilches Differential Revision: D57285584 fbshipit-source-id: 935fcdd28c05bbac0d73e1c7654ae11a74898537
This pull request has been reverted by 1a56b9a. |
Summary: Pull Request resolved: facebook#44557 We've started seeing assertion failures in Yoga where a `NaN` value makes its way to an `availableHeight` constraint when measuring Litho tree. Because it's only happening on Litho, I have some suspicion this might be originating from a Litho-specific measure function. This adds sanitization in Yoga to measure function results, where we will log an error, and set size to zero, if either dimension ends up being negative of `NaN`. This doesn't really help track down where the error was happening, but Yoga doesn't have great context to show this to begin with. If we see this is issue, next steps would be Litho internal intrumentation to find culprit. Changelog: [Internal] Reviewed By: joevilches Differential Revision: D57285584 fbshipit-source-id: 935fcdd28c05bbac0d73e1c7654ae11a74898537
Summary:
We've started seeing assertion failures in Yoga where a
NaN
value makes its way to anavailableHeight
constrtaint when measuring Litho nodes.Because it's only happening on Litho, I have some suspicion this might be originating from a Litho-specific measure function. This adds santization in Yoga to measure function results, where we will log an error, and set size to zero, if either dimension ends up being negative of
NaN
.Changelog: [Internal]
Differential Revision: D57285584