Skip to content
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

[release/3.1] Port VSP floating-point hang from 4.8 #5020

Merged
merged 4 commits into from
Aug 16, 2021

Conversation

SamBent
Copy link
Contributor

@SamBent SamBent commented Aug 5, 2021

Addresses Issue #4978. This is a port of a servicing fix in .NET 4.7-4.8.

Description
The hang is due to floating-point drift. After any scroll, VSP runs logic to verify that it scrolled to the right place (it can be wrong due to new information discovered while de-virtualizing). There's a special case when the scroll reaches the end of the data, comparing the actual offset to the maximum (extent - viewport height). This uses the strict test DoubleUtil.AreClose(actual, maximum), which tolerates floating-point drift of 10^-16 pixel. But the difference in the repro is 10^-14 pixel, so the test fails.

Prior to the 2020-08 update, this would have merely triggered a Debug.Assert, invisible to customers. With the update, it now requests a re-measure, fixing a bug that arose when the numbers were legitimately different. But when the numbers are so close and layout rounding is enabled, the re-measure just ends up in the same situation, and the app hangs.

The fix is to use the looser test LayoutDoubleUtil.AreClose(actual, maximum), which tolerates floating-point drift of 10^-6 pixel.

Customer Impact
Hang while scrolling.

Regression
Exposed by PR #3564.

Testing
Ad-hoc with customer scenarios.
Standard regression testing.

Risk
Low. Straightforward port of .NETFx fix that was released earlier this year.

@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Aug 5, 2021
@ghost ghost requested review from fabiant3 and ryalanms August 5, 2021 18:30
@SamBent SamBent changed the title Port VSP floating-point hang from 4.8 [release/3.1] Port VSP floating-point hang from 4.8 Aug 5, 2021
@SamBent SamBent merged commit e4b4db8 into dotnet:release/3.1 Aug 16, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Apr 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR metadata: Label to tag PRs, to facilitate with triage Servicing-consider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant