[Windows]Fixed the ViewExtensions RotateYTo and RotateXTo with length 0 crashes#30167
Merged
jfversluis merged 3 commits intodotnet:inflight/currentfrom Nov 27, 2025
Merged
Conversation
Contributor
|
Hey there @@Ahamed-Ali! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
MartyIX
reviewed
Jun 24, 2025
MartyIX
reviewed
Jun 24, 2025
MartyIX
reviewed
Jun 24, 2025
MartyIX
reviewed
Jun 24, 2025
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18420.cs
Outdated
Show resolved
Hide resolved
Contributor
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
9827682 to
7d19073
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a crash on Windows when ViewExtensions.RotateYTo and RotateXTo are called with a duration of 0, which resulted in NaN values being passed to the transformation system causing ArgumentExceptions.
- Adds defensive NaN checks in the Windows transformation logic to prevent invalid transformations
- Includes comprehensive UI tests to validate the fix across multiple button taps with zero-duration rotations
- Fixes a variable reference issue in the transformation condition check
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Core/src/Platform/Windows/TransformationExtensions.cs | Adds NaN validation and fixes variable reference in rotation condition |
| src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18420.cs | NUnit test that verifies multiple zero-duration rotations don't crash |
| src/Controls/tests/TestCases.HostApp/Issues/Issue18420.cs | Host app UI test page with button that triggers zero-duration RotateYTo calls |
Member
|
/rebase |
7d19073 to
973954a
Compare
973954a to
9114787
Compare
jfversluis
approved these changes
Nov 27, 2025
PureWeen
pushed a commit
that referenced
this pull request
Dec 3, 2025
#30167) Included the test sample and test case for the fix Updated the changes
github-actions bot
pushed a commit
that referenced
this pull request
Dec 5, 2025
#30167) Included the test sample and test case for the fix Updated the changes
This was referenced Dec 18, 2025
Merged
Merged
Closed
Open
Closed
Closed
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Root Cause of the issue
https://github.com/dotnet/maui/blob/main/src/Controls/src/Core/Tweener.cs#L124
Description of Change
Issues Fixed
Fixes #18420
Tested the behaviour in the following platforms
Screenshot
CrashOccured.mp4
NoCrashwithFix.mp4