Browse Source
ScrollViewer.Offset and ScrollContentPresenter.Offset form a two-way coerced binding whose convergence is decided with the default equality comparer. Because NaN != NaN, a NaN offset is reported "changed" on every pass, so the coerce/raise cycle never converges and recurses until the stack overflows -- an unrecoverable crash (on Mono/AOT targets such as Android it surfaces as a native SIGSEGV). CoerceOffset's Clamp passed NaN straight through (NaN < min and NaN > max are both false), so a NaN component survived coercion. Sanitize it to the lower bound so the coerce always converges, regardless of where the NaN came from. Fixes #21444 Co-authored-by: Julien Lebosquain <julien@lebosquain.net>pull/21448/head
committed by
GitHub
2 changed files with 27 additions and 0 deletions
Loading…
Reference in new issue