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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-animation Animation, Transitions, Transforms area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing community ✨ Community Contribution
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.
2 participants