I have a custom control. Inside its renderer I am using the Layer for drawing. When I set a Mask of my own a NullReferenceException is thrown. I need to set name for the Mask in order to resolve it. I have noticed a similar issue (#11118) logged about the same method. The fix (#11131) applied for it won't work for my scenario. I believe more checks are needed for the Name of the Mask.
The sample should run as expected.
Exception is thrown by the UpdateClip method
Set Name for the Mask applied for the Layer.
I have the same problem, only with 4.7.0
Xamarin.Forms.Platform.iOS.VisualElementTracker.UpdateClip()
Android works fine
I had same problem, I fix this problem reinstalling old version 4.6.0.847 (work fine), but I can't use new features for AppTheme Binding
VS for Mac 8.6.4 build 14
Xamarin.Forms 4.7.0.968
Receiving the following error when scrolling in a CollectionView using a ContentView as a DataTemplate.
System.NullReferenceException: Object reference not set to an instance of an object
at Xamarin.Forms.Platform.iOS.VisualElementTracker.UpdateClip () [0x00072] in D:a1sXamarin.Forms.Platform.iOSVisualElementTracker.cs:413
at Xamarin.Forms.Platform.iOS.VisualElementTracker.UpdateNativeControl () [0x0006c] in D:a1sXamarin.Forms.Platform.iOSVisualElementTracker.cs:386
at Xamarin.Forms.Platform.iOS.VisualElementTracker.HandlePropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00064] in D:a1sXamarin.Forms.Platform.iOSVisualElementTracker.cs:97
at (wrapper delegate-invoke)
at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in D:a1sXamarin.Forms.CoreBindableObject.cs:229
at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in D:a1sXamarin.Forms.CoreElement.cs:353
at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x00114] in D:a1sXamarin.Forms.CoreBindableObject.cs:461
at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in D:a1sXamarin.Forms.CoreBindableObject.cs:397
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x00042] in D:a1sXamarin.Forms.CoreBindableObject.cs:334
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindablePropertyKey propertyKey, System.Object value) [0x0000e] in D:a1sXamarin.Forms.CoreBindableObject.cs:318
at Xamarin.Forms.VisualElement.set_Height (System.Double value) [0x00000] in D:a1sXamarin.Forms.CoreVisualElement.cs:324
at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x0001a] in D:a1sXamarin.Forms.CoreVisualElement.cs:1081
at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:a1sXamarin.Forms.CoreVisualElement.cs:316
at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:a1sXamarin.Forms.CoreVisualElement.cs:708
at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x001da] in D:a1sXamarin.Forms.CoreLayout.cs:178
at Xamarin.Forms.TemplatedView.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00019] in D:a1sXamarin.Forms.CoreTemplatedView.cs:29
at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:a1sXamarin.Forms.CoreLayout.cs:266
at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:a1sXamarin.Forms.CoreLayout.cs:224
at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:a1sXamarin.Forms.CoreVisualElement.cs:812
at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] in D:a1sXamarin.Forms.CoreVisualElement.cs:1083
at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:a1sXamarin.Forms.CoreVisualElement.cs:316
at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:a1sXamarin.Forms.CoreVisualElement.cs:708
at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x001da] in D:a1sXamarin.Forms.CoreLayout.cs:178
at Xamarin.Forms.TemplatedView.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00019] in D:a1sXamarin.Forms.CoreTemplatedView.cs:29
at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:a1sXamarin.Forms.CoreLayout.cs:266
at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:a1sXamarin.Forms.CoreLayout.cs:224
at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:a1sXamarin.Forms.CoreVisualElement.cs:812
at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] in D:a1sXamarin.Forms.CoreVisualElement.cs:1083
at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:a1sXamarin.Forms.CoreVisualElement.cs:316
at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:a1sXamarin.Forms.CoreVisualElement.cs:708
at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x001da] in D:a1sXamarin.Forms.CoreLayout.cs:178
at Xamarin.Forms.Grid.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00144] in D:a1sXamarin.Forms.CoreGridCalc.cs:49
at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:a1sXamarin.Forms.CoreLayout.cs:266
at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:a1sXamarin.Forms.CoreLayout.cs:224
at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:a1sXamarin.Forms.CoreVisualElement.cs:812
at Xamarin.Forms.Layout.ResolveLayoutChanges () [0x0005c] in D:a1sXamarin.Forms.CoreLayout.cs:392
at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.2.1/src/Xamarin.iOS/Foundation/NSAction.cs:152
at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.2.1/src/Xamarin.iOS/UIKit/UIApplication.cs:86
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.2.1/src/Xamarin.iOS/UIKit/UIApplication.cs:65
The same issue occurred at our end, with the same exception. When will it be resolved
We're also facing the same crash in XF 4.7.
The problem has also been reported (with repro) at Syncfusion as it also breaks their SfDataGrid.
We have same issue with Xamarin.Forms 4.7.0.968
Right, still crashing on Version 4.7.0.1080
uiview.MaskView.Layer.Mask.Name is null
at Xamarin.Forms.Platform.iOS.VisualElementTracker.ShouldUpdateClip () [0x00037] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementTracker.cs:452
at Xamarin.Forms.Platform.iOS.VisualElementTracker.UpdateClip () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementTracker.cs:394
at Xamarin.Forms.Platform.iOS.VisualElementTracker.UpdateNativeControl () [0x0006c] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementTracker.cs:386
Same here - still cannot use 4.7 - simple click on back button does not work?
0x5C in Xamarin.Forms.Platform.iOS.VisualElementTracker.ShouldUpdateClip at D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementTracker.cs:452,5 C#
0x1 in Xamarin.Forms.Platform.iOS.VisualElementTracker.UpdateClip at D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementTracker.cs:394,4 C#
0x6D in Xamarin.Forms.Platform.iOS.VisualElementTracker.UpdateNativeControl at D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementTracker.cs:386,4 C#
0x65 in Xamarin.Forms.Platform.iOS.VisualElementTracker.HandlePropertyChanged at D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementTracker.cs:97,5 C#
0x12 in Xamarin.Forms.BindableObject.OnPropertyChanged at D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:229,7 C#
0x2 in Xamarin.Forms.Element.OnPropertyChanged at D:\a\1\s\Xamarin.Forms.Core\Element.cs:353,4 C#
0x11B in Xamarin.Forms.BindableObject.SetValueActual at D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:461,5 C#
0x17C in Xamarin.Forms.BindableObject.SetValueCore at D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:397,5 C#
0x56 in Xamarin.Forms.BindableObject.SetValue at D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:334,4 C#
0x18 in Xamarin.Forms.BindableObject.SetValue at D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:318,4 C#
0xC in Xamarin.Forms.VisualElement.set_Height at D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:324,18 C#
0x1C in Xamarin.Forms.VisualElement.SetSize at D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:1081,4 C#
0x6C in Xamarin.Forms.VisualElement.set_Bounds at D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:316,5 C#
VS for Mac 8.6.5 build 23
Xamarin.Forms 4.7.0.1080
Error While scrolling in CollectionView
System.NullReferenceException: Object reference not set to an instance of an object
at Xamarin.Forms.Platform.iOS.VisualElementTracker.ShouldUpdateClip () [0x00037] in D:a1sXamarin.Forms.Platform.iOSVisualElementTracker.cs:452
at Xamarin.Forms.Platform.iOS.VisualElementTracker.UpdateClip () [0x00000] in D:a1sXamarin.Forms.Platform.iOSVisualElementTracker.cs:394
at Xamarin.Forms.Platform.iOS.VisualElementTracker.UpdateNativeControl () [0x0006c] in D:a1sXamarin.Forms.Platform.iOSVisualElementTracker.cs:386
at Xamarin.Forms.Platform.iOS.VisualElementTracker.HandlePropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00064] in D:a1sXamarin.Forms.Platform.iOSVisualElementTracker.cs:97
at (wrapper delegate-invoke)
at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in D:a1sXamarin.Forms.CoreBindableObject.cs:229
at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in D:a1sXamarin.Forms.CoreElement.cs:353
at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x00114] in D:a1sXamarin.Forms.CoreBindableObject.cs:461
at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in D:a1sXamarin.Forms.CoreBindableObject.cs:397
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x00042] in D:a1sXamarin.Forms.CoreBindableObject.cs:334
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindablePropertyKey propertyKey, System.Object value) [0x0000e] in D:a1sXamarin.Forms.CoreBindableObject.cs:318
at Xamarin.Forms.VisualElement.set_Height (System.Double value) [0x00000] in D:a1sXamarin.Forms.CoreVisualElement.cs:324
at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x0001a] in D:a1sXamarin.Forms.CoreVisualElement.cs:1081
at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:a1sXamarin.Forms.CoreVisualElement.cs:316
at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:a1sXamarin.Forms.CoreVisualElement.cs:708
at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x001da] in D:a1sXamarin.Forms.CoreLayout.cs:178
at Xamarin.Forms.TemplatedView.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00019] in D:a1sXamarin.Forms.CoreTemplatedView.cs:29
at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:a1sXamarin.Forms.CoreLayout.cs:266
at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:a1sXamarin.Forms.CoreLayout.cs:224
at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:a1sXamarin.Forms.CoreVisualElement.cs:812
at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] in D:a1sXamarin.Forms.CoreVisualElement.cs:1083
at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:a1sXamarin.Forms.CoreVisualElement.cs:316
at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:a1sXamarin.Forms.CoreVisualElement.cs:708
at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x001da] in D:a1sXamarin.Forms.CoreLayout.cs:178
at Xamarin.Forms.TemplatedView.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00019] in D:a1sXamarin.Forms.CoreTemplatedView.cs:29
at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:a1sXamarin.Forms.CoreLayout.cs:266
at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:a1sXamarin.Forms.CoreLayout.cs:224
at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:a1sXamarin.Forms.CoreVisualElement.cs:812
at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] in D:a1sXamarin.Forms.CoreVisualElement.cs:1083
at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:a1sXamarin.Forms.CoreVisualElement.cs:316
at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:a1sXamarin.Forms.CoreVisualElement.cs:708
at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x001da] in D:a1sXamarin.Forms.CoreLayout.cs:178
at Xamarin.Forms.Grid.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00144] in D:a1sXamarin.Forms.CoreGridCalc.cs:49
at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:a1sXamarin.Forms.CoreLayout.cs:266
at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:a1sXamarin.Forms.CoreLayout.cs:224
at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:a1sXamarin.Forms.CoreVisualElement.cs:812
at Xamarin.Forms.Layout.ResolveLayoutChanges () [0x0005c] in D:a1sXamarin.Forms.CoreLayout.cs:392
at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.2.1/src/Xamarin.iOS/Foundation/NSAction.cs:152
at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.2.1/src/Xamarin.iOS/UIKit/UIApplication.cs:86
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.2.1/src/Xamarin.iOS/UIKit/UIApplication.cs:65
Xamarin.Forms 4.7.0.1080
VS for Windows 16.6.3
VS for Mac 8.6.5 (build 23)
+1, breaks SyncFusion's Pull To Refresh control on iOS too:
System.NullReferenceException: Object reference not set to an instance of an object
at Xamarin.Forms.Platform.iOS.VisualElementTracker.ShouldUpdateClip () [0x00037] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementTracker.cs:452
at Xamarin.Forms.Platform.iOS.VisualElementTracker.UpdateClip () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementTracker.cs:394
at Xamarin.Forms.Platform.iOS.VisualElementTracker.UpdateNativeControl () [0x0006c] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementTracker.cs:386
at Xamarin.Forms.Platform.iOS.VisualElementTracker.HandlePropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00064] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementTracker.cs:97
at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:229
at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:353
at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x00114] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:461
at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:397
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x00042] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:334
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindablePropertyKey propertyKey, System.Object value) [0x0000e] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:318
at Xamarin.Forms.VisualElement.set_Width (System.Double value) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:451
at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00013] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:1080
at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:316
at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:708
at Syncfusion.SfPullToRefresh.XForms.SfProgressCircleView.RenderProgress (System.Double yPosition) [0x0005e] in <5b701d72160948f6ae0f0cb94c0a79ca>:0
at Syncfusion.SfPullToRefresh.XForms.SfPullToRefresh.LayoutPullingView (System.Double yPosition) [0x0005c] in <5b701d72160948f6ae0f0cb94c0a79ca>:0
at Syncfusion.SfPullToRefresh.XForms.SfPullToRefresh.RaisePullingEvent (System.Double progressYPosition) [0x00473] in <5b701d72160948f6ae0f0cb94c0a79ca>:0
at Syncfusion.SfPullToRefresh.XForms.SfPullToRefresh.OnPanUpdated (System.Object sender, Xamarin.Forms.PanUpdatedEventArgs args) [0x001eb] in <5b701d72160948f6ae0f0cb94c0a79ca>:0
at Xamarin.Forms.PanGestureRecognizer.SendPan (Xamarin.Forms.Element sender, System.Double totalX, System.Double totalY, System.Int32 gestureId) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\PanGestureRecognizer.cs:20
at Xamarin.Forms.Platform.iOS.EventTracker+<>c__DisplayClass15_0.<GetNativeRecognizer>b__2 (UIKit.UIPanGestureRecognizer r) [0x00107] in D:\a\1\s\Xamarin.Forms.Platform.iOS\EventTracker.cs:403
at UIKit.UIPanGestureRecognizer+Callback.Activated (UIKit.UIPanGestureRecognizer sender) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.2.1/src/Xamarin.iOS/UIKit/UIGestureRecognizer.cs:247
Same stack trace as @KMWenyon as far as I can see.
+1 I'm getting crashes with 4.7 and 4.7.0.1080 also didn't solve this
Same here.
Xamarin.Forms 4.7.0.1080
VS for Mac 8.6.5 (build 23)
Same here. In my project, I'm using a RefreshView with a CollectionView (for pull to refresh), SwipeView in ItemTemplate to do a Swipe to Delete. On iOS, as soon as I scroll the CollectionView, it crashes with the "ShouldUpdateClip" error.
Then, I replaced the CollectionView with a SyncFusion sfListView...but I get the same error...we have to deliver our project soon so I will have to rollback Xamarin.Forms but will lose the AppThemeBinding feature.
@samhouts adding to the growing pain - latest Xamarin.Forms 4.7.0.1080 has introduced the new crashing bug - this is not the case for 4.6
for us the app crashes during the following scenario using a simple frame, button and visual state manager. following xaml snippet crashes with the following null reference exception, . this issue doesn't happen on android. it happens on iOS both hardware and simulator. and is related to the original post of the issue on this thread.
as soon as i remove the frame and the setter in the visual state manager it works again.
on another note, i want to voice out my serious concerns and the pain I am going through each time there is a compatibility breaking with previous XF version.
<Frame x:Name="_frame" BackgroundColor="Aqua" >
<Button BackgroundColor="#74BD51" CornerRadius="8" TextColor="White" Font="Title" Text="Login" FontAttributes="Bold" Command="{Binding LoginCommand}"
BorderColor = "White" BorderWidth="2" FontSize="Large" IsEnabled="{Binding IsBusy, Converter={StaticResource InvertBooleanConverter}}" >
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="Scale" Value="1" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Pressed">
<VisualState.Setters>
<Setter Property="Scale" Value=".8" />
</VisualState.Setters>
</VisualState>
<VisualState Name="Disabled">
<VisualState.Setters>
**<Setter TargetName="_frame" Property="BackgroundColor" Value="Gray" />**
<Setter Property="TextColor" Value="White" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Button>
</Frame>
Exception:
`2020-07-13 10:18:23.814992-0700 Spotlee[37345:346884] System.NullReferenceException: Object reference not set to an instance of an object
at Xamarin.Forms.Platform.iOS.VisualElementTracker.ShouldUpdateClip () [0x00037] in D:a1sXamarin.Forms.Platform.iOSVisualElementTracker.cs:452
at Xamarin.Forms.Platform.iOS.VisualElementTracker.UpdateClip () [0x00000] in D:a1sXamarin.Forms.Platform.iOSVisualElementTracker.cs:394
at Xamarin.Forms.Platform.iOS.VisualElementTracker.UpdateNativeControl () [0x0006c] in D:a1sXamarin.Forms.Platform.iOSVisualElementTracker.cs:386
at Xamarin.Forms.Platform.iOS.VisualElementTracker.HandlePropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x001df] in D:a1sXamarin.Forms.Platform.iOSVisualElementTracker.cs:115
at (wrapper delegate-invoke)
at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String prop
ertyName) [0x00000] in D:a1sXamarin.Forms.CoreBindableObject.cs:229
at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in D:a1sXamarin.Forms.CoreElement.cs:353
at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x00114] in D:a1sXamarin.Forms.CoreBindableObject.cs:461
at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in D:a1sXamarin.Forms.CoreBindableObject.cs:397
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x00042] in D:a1s
Xamarin.Forms.CoreBindableObject.cs:334
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle) [0x00000] in D:a1sXamarin.Forms.CoreBindableObject.cs:321
at Xamarin.Forms.Setter.Apply (Xamarin.Forms.BindableObject target, System.Boolean fromStyle) [0x000fa] in D:a1sXamarin.Forms.CoreSetter.cs:80
at Xamarin.Forms.VisualStateManager.GoToState (Xamarin.Forms.VisualElement visualElement, System.String name) [0x000b9] in D:a1sXamarin.Forms.CoreVisualStateManager.cs:90
at Xamarin.Forms.Button.ChangeVisualState () [0x00010] in D:a1sXamarin.Forms.CoreButton.cs:231
at Xamarin.Forms.VisualElement.ChangeVisualStateInternal () [0x00000] in D:a1sXamarin.Forms.CoreVisualElement.cs:954
at Xamarin.Forms.ButtonElement.ElementPressed (Xamarin.Forms.VisualElement visualElement, Xamarin.Forms.Internals.IButtonElement ButtonElementManager) [0x0000f] in D:a1sXamarin.Forms.CoreButtonElement.cs:70
at Xamarin
.Forms.Button.SendPressed () [0x00000] in D:a1sXamarin.Forms.CoreButton.cs:179
at Xamarin.Forms.Material.iOS.MaterialButtonRenderer.OnButtonTouchDown (System.Object sender, System.EventArgs eventArgs) [0x00000] in D:a1sXamarin.Forms.Material.iOSMaterialButtonRenderer.cs:160
at UIKit.UIControlEventProxy.Activated () [0x00004] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.2.1/src/Xamarin.iOS/UIKit/UIControl.cs:38
--- End of stack trace from previous location where exception was thrown ---
at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.2.1/src/Xamarin.iOS/UIKit/UIApplication.cs:86
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Version
s/13.18.2.1/src/Xamarin.iOS/UIKit/UIApplication.cs:65`
hi @samhouts i have more bad news for you - i tested this issue with SkiaSharp and the same exception happens when you try to use the following method - canvas.DrawTextOnPath with the following exception, that wasn't being thrown in 4.6
System.NullReferenceException: Object reference not set to an instance of an object
at SkiaSharp.SKFont+GlyphPathCache.Dispose () [0x00016] in <94e661f937c8433bbde4a540f6b2d091>:0
at SkiaSharp.SKFont.GetTextPathOnPath (System.ReadOnlySpan
1[T] glyphs, System.ReadOnlySpan1[T] glyphWidths, System.ReadOnlySpan
1[T] glyphPositions, SkiaSharp.SKPath path, SkiaSharp.SKTextAlign textAlign) [0x00158] in <94e661f937c8433bbde4a540f6b2d091>:0
at SkiaSharp.SKFont.GetTextPathOnPath (System.ReadOnlySpan1[T] glyphs, SkiaSharp.SKPath path, SkiaSharp.SKTextAlign textAlign, SkiaSharp.SKPoint origin) [0x00067] in <94e661f937c8433bbde4a540f6b2d091>:0
at SkiaSharp.SKFont.GetTextPathOnPath (System.Void* text, System.Int32 length, SkiaSharp.SKTextEncoding encoding, SkiaSharp.SKPath path, SkiaSharp.SKTextAlign textAlign, SkiaSharp.SKPoint origin) [0x00042] in <94e661f937c8433bbde4a540f6b2d091>:0
at SkiaSharp.SKFont.GetTextPathOnPath (System.ReadOnlySpan
1[T] text,
SkiaSharp.SKPath path, SkiaSharp.SKTextAlign textAlign, SkiaSharp.SKPoint origin) [0x00014] in <94e661f937c8433bbde4a540f6b2d091>:0
at SkiaSharp.SKFont.GetTextPathOnPath (System.String text, SkiaSharp.SKPath path, SkiaSharp.SKTextAlign textAlign, SkiaSharp.SKPoint origin) [0x00007] in <94e661f937c8433bbde4a540f6b2d091>:0
at SkiaSharp.SKCanvas.DrawTextOnPath (System.String text, SkiaSharp.SKPath path, SkiaSharp.SKPoint offset, System.Boolean warpGlyphs, SkiaSharp.SKFont font, SkiaSharp.SKPaint paint) [0x00049] in <94e661f937c8433bbde4a540f6b2d091>:0
at SkiaSharp.SKCanvas.DrawTextOnPath (System.String text, SkiaSharp.SKPath path, SkiaSharp.SKPoint offset, System.Boolean warpGlyphs, SkiaSharp.SKPaint paint) [0x0001c] in <94e661f937c8433bbde4a540f6b2d091>:0
at SkiaSharp.SKCanvas.DrawTextOnPath (System.String text, SkiaSharp.SKPath path, System.Single hOffset, System.Single vOffset, SkiaSharp.SKPaint paint) [0x0000b] in <94e661f937c8433bbde4a540f6b2d091>:0
at SensoDrive.Client.Infrastructure.Contro
ls.ParkadeViewControl.OnPaintSurface (SkiaSharp.Views.Forms.SKPaintSurfaceEventArgs args) [0x005fa] in C:DevMSBSensoDrive.Client.InfrastructureControlsParkadeViewControl.cs:168
at SkiaSharp.Views.Forms.SKCanvasView.SkiaSharp.Views.Forms.ISKCanvasViewController.OnPaintSurface (SkiaSharp.Views.Forms.SKPaintSurfaceEventArgs e) [0x00000] in <2ffb8e9bd89b4976990ab464a4bbda58>:0
at SkiaSharp.Views.Forms.SKCanvasViewRendererBase2[TFormsView,TNativeView].OnPaintSurface (System.Object sender, SkiaSharp.Views.iOS.SKPaintSurfaceEventArgs e) [0x00021] in <2ffb8e9bd89b4976990ab464a4bbda58>:0
at SkiaSharp.Views.iOS.SKCanvasView.OnPaintSurface (SkiaSharp.Views.iOS.SKPaintSurfaceEventArgs e) [0x0000a] in <2fda334037b543eabdad1306dbaab73a>:0
at SkiaSharp.Views.iOS.SKCanvasView.Draw (CoreGraphics.CGRect rect) [0x00064] in <2fda334037b543eabdad1306dbaab73a>:0
at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args,
System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.2.1/src/Xamarin.iOS/UIKit/UIApplication.cs:86
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.2.1/src/Xamarin.iOS/UIKit/UIApplication.cs:65
at MSBApp.iOS.Application.Main (System.String[] args) [0x00002] in C:\Dev\MSB\MSBApp\MSBApp.iOS\Main.cs:20
Can you please confirm before closing the issue it's addressed.
@pasha-o Can you please open a new issue for that? Thanks!
Looks good!
I tested the package from your PR and SfDataGrid works as expected again. Thanks!
any timeframe for the next service release?
The fix for this issue should be out next week. It just missed the cutoff for SR2, so it'll follow in SR3 shortly afterwards.
oh dear - such a fundamental issue 馃槖
Good news! @radioactiveman noticed that my PR actually did NOTHING because #11280 already resolved the same problem. And that PR is in SR2, which should be out later today!
Look for 4.7.0.1142, which should be available any second now. Thanks for your patience!
Most helpful comment
Look for 4.7.0.1142, which should be available any second now. Thanks for your patience!