Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] iOS Native crash when RadiusX/RadiusY > Width/Height of Shapes.Rectangle #11033

Closed
samhouts opened this issue Jun 12, 2020 · 0 comments · Fixed by #11051
Closed

[Bug] iOS Native crash when RadiusX/RadiusY > Width/Height of Shapes.Rectangle #11033

samhouts opened this issue Jun 12, 2020 · 0 comments · Fixed by #11051
Assignees
Labels
a/shapes blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. e/3 🕒 3 i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often in-progress This issue has an associated pull request that may resolve it! p/iOS 🍎 t/bug 🐛
Milestone

Comments

@samhouts
Copy link
Member

Description

Steps to Reproduce

xmlns:shapes="clr-namespace:Xamarin.Forms.Shapes;assembly=Xamarin.Forms.Core"
....

 <shapes:Rectangle 
                              WidthRequest="100"
                              HeightRequest="100"
                              RadiusX="200"
                              RadiusY="200"
                              StrokeLineCap="Round"
                              StrokeThickness="2"
                              StrokeLineJoin="Round"
                              Stroke="Red"
                              Rotation="45"/>

Expected Behavior

I don't know. A circle?

Actual Behavior

	  at <unknown> <0xffffffff>
	  at CoreGraphics.CGPath:CGPathAddRoundedRect <0x00157>
	  at CoreGraphics.CGPath:AddRoundedRect <0x000e2>
	  at Xamarin.Forms.Platform.iOS.RectView:UpdateShape <0x00212>
	  at Xamarin.Forms.Platform.iOS.RectView:UpdateRadiusX <0x00152>
	  at Xamarin.Forms.Platform.iOS.RectangleRenderer:UpdateRadiusX <0x0018a>
	  at Xamarin.Forms.Platform.iOS.RectangleRenderer:OnElementChanged <0x001da>
	  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1:SetElement <0x00adf>
	  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1:Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement <0x000c2>
	  at Xamarin.Forms.Platform.iOS.Platform:CreateRenderer <0x00174>
	  at Xamarin.Forms.Platform.iOS.VisualElementPackager:OnChildAdded <0x0028a>
	  at Xamarin.Forms.Platform.iOS.VisualElementPackager:Load <0x001a6>
	  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1:SetElement <0x0086a>
	  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1:Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement <0x000c2>
	  at Xamarin.Forms.Platform.iOS.Platform:CreateRenderer <0x00174>
	  at Xamarin.Forms.Platform.iOS.VisualElementPackager:OnChildAdded <0x0028a>
	  at Xamarin.Forms.Platform.iOS.VisualElementPackager:OnChildAdded <0x00120>
	  at Xamarin.Forms.Element:OnChildAdded <0x0017b>
	  at Xamarin.Forms.VisualElement:OnChildAdded <0x00092>
	  at Xamarin.Forms.Page:OnInternalAdded <0x00140>
	  at Xamarin.Forms.Page:InternalChildrenOnCollectionChanged <0x0068a>
	  at System.Collections.ObjectModel.ObservableCollection`1:OnCollectionChanged <0x000fa>
	  at System.Collections.ObjectModel.ObservableCollection`1:OnCollectionChanged <0x00103>
	  at System.Collections.ObjectModel.ObservableCollection`1:InsertItem <0x00132>
	  at System.Collections.ObjectModel.Collection`1:Add <0x0019c>
	  at Xamarin.Forms.TemplateUtilities:OnContentChanged <0x0033b>
	  at Xamarin.Forms.BindableObject:SetValueActual <0x007c7>
	  at Xamarin.Forms.BindableObject:SetValueCore <0x00c62>
	  at Xamarin.Forms.BindableObject:SetValue <0x003f2>
	  at Xamarin.Forms.BindableObject:SetValue <0x0008a>
	  at Xamarin.Forms.Xaml.ApplyPropertiesVisitor:TrySetValue <0x009ba>
	  at Xamarin.Forms.Xaml.ApplyPropertiesVisitor:SetPropertyValue <0x00882>
	  at Xamarin.Forms.Xaml.ApplyPropertiesVisitor:Visit <0x01fe2>
	  at Xamarin.Forms.Xaml.ElementNode:Accept <0x007fc>
	  at Xamarin.Forms.Xaml.RootNode:Accept <0x00602>
	  at Xamarin.Forms.Xaml.XamlLoader:Visit <0x0070e>
	  at Xamarin.Forms.Xaml.XamlLoader:Load <0x00ae2>
	  at Xamarin.Forms.Xaml.XamlLoader:Load <0x0008a>
	  at Xamarin.Forms.Xaml.XamlLoader:Load <0x002a2>
	  at Xamarin.Forms.Xaml.Extensions:LoadFromXaml <0x00082>
	  at RoundyAndTheShapeMachine.MainPage:__InitComponentRuntime <0x00062>
	  at RoundyAndTheShapeMachine.MainPage:InitializeComponent <0x002f2>
	  at System.Object:runtime_invoke_void__this__ <0x00195>
	  at <unknown> <0xffffffff>
	  at System.Reflection.RuntimeMethodInfo:InternalInvoke <0x00100>
	  at System.Reflection.RuntimeMethodInfo:Invoke <0x0055a>
	  at System.Reflection.MethodBase:Invoke <0x00087>
	  at <<ReloadXamlOnMainThreadAsync>b__0>d:MoveNext <0x0069a>
	  at MoveNextRunner:InvokeMoveNext <0x000ab>
	  at System.Threading.ExecutionContext:RunInternal <0x00585>
	  at System.Threading.ExecutionContext:Run <0x00092>
	  at MoveNextRunner:Run <0x001aa>
	  at System.Threading.Tasks.AwaitTaskContinuation:InvokeAction <0x00093>
	  at System.Threading.Tasks.AwaitTaskContinuation:RunCallback <0x00153>
	  at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run <0x0013a>
	  at System.Threading.Tasks.Task:FinishContinuations <0x006a6>
	  at System.Threading.Tasks.Task:FinishStageThree <0x0015a>
	  at System.Threading.Tasks.Task`1:TrySetResult <0x0022a>
	  at System
.Threading.Tasks.TaskCompletionSource`1:TrySetResult <0x00092>
	  at System.Threading.Tasks.TaskCompletionSource`1:SetResult <0x0007a>
	  at <>c__DisplayClass1_0:<AnimateTo>b__1 <0x0008a>
	  at <>c__DisplayClass14_0`1:<AnimateInternal>b__1 <0x000c9>
	  at Xamarin.Forms.AnimationExtensions:HandleTweenerFinished <0x00690>
	  at Xamarin.Forms.Tweener:<Start>b__27_0 <0x004d6>
	  at Xamarin.Forms.Internals.Ticker:SendSignals <0x0031e>
	  at Xamarin.Forms.Internals.Ticker:SendSignals <0x00102>
	  at Xamarin.Forms.Platform.iOS.CADisplayLinkTicker:<EnableTimer>b__7_0 <0x0007a>
	  at Foundation.NSActionDispatcher:Apply <0x0006f>
	  at System.Object:runtime_invoke_void__this__ <0x000e5>
	  at <unknown> <0xffffffff>
	  at UIKit.UIApplication:UIApplicationMain <0x00254>
	  at UIKit.UIApplication:Main <0x000b2>
	  at UIKit.UIApplication:Main <0x00132>
	  at RoundyAndTheShapeMachine.iOS.Application:Main <0x00092>
	  at <Module>:runtime_invoke_void_object <0x00342>
===========================================================

Basic Information

  • Version with issue: 4.7.0-pre4
  • Last known good version: n/a
  • IDE: 16.7.0 P2
  • Platform Target Frameworks:
    • iOS: 13.5

Reproduction Link

RoundyAndTheShapeMachine.zip

Workaround

Don't do that.

@samhouts samhouts added t/bug 🐛 p/iOS 🍎 i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often s/unverified New report that has yet to be verified a/shapes labels Jun 12, 2020
@samhouts samhouts added this to the 4.7.0 milestone Jun 12, 2020
@hartez hartez added e/3 🕒 3 and removed s/unverified New report that has yet to be verified labels Jun 12, 2020
@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label Jun 15, 2020
@samhouts samhouts modified the milestones: 4.7.0, 5.0.0 Aug 4, 2020
@jsuarezruiz jsuarezruiz self-assigned this Sep 10, 2020
@rmarinho rmarinho added the blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. label Oct 30, 2020
rmarinho added a commit that referenced this issue Nov 27, 2020
…1051) fixes #11033

* Fixed issue creating rectangle with a big Radius on iOS

* Fixed build error

* Fixed build error

* Added comment

* Fixed build error

* Fix inconsistent issue in EllipseRenderers

* Updated RectangleRenderers

Co-authored-by: Rui Marinho <me@ruimarinho.net>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/shapes blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. e/3 🕒 3 i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often in-progress This issue has an associated pull request that may resolve it! p/iOS 🍎 t/bug 🐛
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants