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

Fixed An issue with Microsoft.Maui.Animations when testing a custom busy indicator control. #26051

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

NirmalKumarYuvaraj
Copy link
Contributor

Issue Details

The custom busy indicator control disappears after some time (approx 16 seconds) on iOS and macOS.

Root Cause

Invalid valid value for start and end angle was passed to the PlatformDrawArc method. As a result, the indicator disappears from view and below message is displayed in the debug console.

Error Message

Maui.Controls.Sample.Sandbox[49285:546706] [Unknown process name] CGPathAddArc: invalid value for start or end angle.

Description of Change

  • Core Graphics requires angles within the range [0,2π] radians. Any angle outside this range, whether negative or exceeding is considered invalid.

Debugging session
2024-11-18 16:24:18.799770+0530 Maui.Controls.Sample.Sandbox[49285:546706] startAngle: -359685 endAngle: -359725 2024-11-18 16:24:18.800034+0530 Maui.Controls.Sample.Sandbox[49285:546706] Drawing arc from 6282.732 to 6283.4297 2024-11-18 16:24:18.800189+0530 Maui.Controls.Sample.Sandbox[49285:546706] [Unknown process name] CGPathAddArc: invalid value for start or end angle.

  • The values 6282.732 and 6283.4297 (radians) far exceed the proper radians (approximately 6.2832). These values are derived from a significantly negative start and end angle in degrees (-359685° and -359725°), converted to radians.

  • Bringing them into the 0 to 2π range before using them in your drawing logic resolves the issue.

Validated the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Issues Fixed

Fixes #22055

Output

Before After
Before.IOS.mov
After.IOS.mov
Before.MAC.mov
After.Mac.mov

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Nov 22, 2024
Copy link
Contributor

Hey there @NirmalKumarYuvaraj! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@jsuarezruiz jsuarezruiz added area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing area-animation Animation, Transitions, Transforms labels Nov 22, 2024
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@NirmalKumarYuvaraj NirmalKumarYuvaraj marked this pull request as ready for review November 25, 2024 11:51
@NirmalKumarYuvaraj NirmalKumarYuvaraj requested a review from a team as a code owner November 25, 2024 11:51
@rmarinho rmarinho merged commit 0531642 into dotnet:main Nov 28, 2024
104 checks passed
@rmarinho rmarinho added this to the .NET 9 SR2 milestone Nov 28, 2024
@NirmalKumarYuvaraj NirmalKumarYuvaraj added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 6, 2024
@samhouts samhouts added fixed-in-9.0.21 fixed-in-net8.0-nightly This may be available in a nightly release! labels Dec 16, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-animation Animation, Transitions, Transforms area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing community ✨ Community Contribution fixed-in-9.0.21 fixed-in-net8.0-nightly This may be available in a nightly release! partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

An issue with Microsoft.Maui.Animations when testing a custom busy indicator control.
5 participants