Hello Telerik Team,
we have an Xamarin.Forms app where the user can display a RadCartesianChart with it's corresponding values in a ListView underneath. Inside the ListView the user can delete single values. And sometimes (not always) our app crashes with an unhandled exception on iOS. Below is the StackTrace:
System.NullReferenceException: Object reference not set to an instance of an object
at Telerik.XamarinForms.ChartRenderer.iOS.CartesianChartAdapter.UpdateXAxis (Telerik.XamarinForms.Chart.RadCartesianChart sourceOwner, TelerikUI.TKChart targetOwner) [0x00004] in <2c1279d14b694f6ebf395b400fc953c0>:0
at Telerik.XamarinForms.ChartRenderer.iOS.ChartSeriesAdapter`2[S,T].UpdateSeriesProperties (System.String propertyName, S sourceOwner, T targetOwner, Telerik.XamarinForms.Chart.RadChartBase sourceChart, TelerikUI.TKChart targetChart) [0x00089] in <2c1279d14b694f6ebf395b400fc953c0>:0
at Telerik.XamarinForms.ChartRenderer.iOS.CategoricalSeriesAdapter`1[TSeries].UpdateSeriesProperties (System.String propertyName, TSeries sourceOwner, TelerikUI.TKChartSeries targetOwner, Telerik.XamarinForms.Chart.RadChartBase sourceChart, TelerikUI.TKChart targetChart) [0x00000] in <2c1279d14b694f6ebf395b400fc953c0>:0
at Telerik.XamarinForms.ChartRenderer.iOS.CategoricalStrokedSeriesAdapter`1[TSeries].UpdateSeriesProperties (System.String propertyName, TSeries sourceOwner, TelerikUI.TKChartSeries targetOwner, Telerik.XamarinForms.Chart.RadChartBase sourceChart, TelerikUI.TKChart targetChart) [0x00000] in <2c1279d14b694f6ebf395b400fc953c0>:0
at Telerik.XamarinForms.ChartRenderer.iOS.ChartSeriesAdapter`2[S,T].UpdateCore (S sourceOwner, T targetOwner, System.String propertyName, Telerik.XamarinForms.Common.IParentElement sourceOwnerRoot, System.Object targetOwnerRoot) [0x00015] in <2c1279d14b694f6ebf395b400fc953c0>:0
at Telerik.XamarinForms.Chart.ChartElementFacadeAdapter`2[S,T].Update (System.Object sourceOwner, System.Object targetOwner, System.String propertyName, System.Object sourceOwnerRoot, System.Object targetOwnerRoot) [0x00000] in <2c1279d14b694f6ebf395b400fc953c0>:0
at Telerik.XamarinForms.Common.XamarinToNativeControlExtensions.Update[T,K] (T nativeElement, K xfЕlement, System.String propertyName, System.Object sourceOwnerRoot, System.Object targetOwnerRoot) [0x00031] in <18d6f5875866470caa321e95489d9b0e>:0
at Telerik.XamarinForms.Chart.ChartElement.OnPropertyChanged (System.String propertyName) [0x00025] in <2c1279d14b694f6ebf395b400fc953c0>:0
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) [0x00107] in D:\agent\_work\1\s\Xamarin.Forms.Core\BindableObject.cs:594
at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0015b] in D:\agent\_work\1\s\Xamarin.Forms.Core\BindableObject.cs:391
at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget) [0x001f9] in D:\agent\_work\1\s\Xamarin.Forms.Core\BindingExpression.cs:174
at Xamarin.Forms.BindingExpression.Apply (System.Boolean fromTarget) [0x0003e] in D:\agent\_work\1\s\Xamarin.Forms.Core\BindingExpression.cs:56
at Xamarin.Forms.BindingExpression+BindingExpressionPart.<PropertyChanged>b__47_0 () [0x00000] in D:\agent\_work\1\s\Xamarin.Forms.Core\BindingExpression.cs:551
at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/5665/f70a1348/source/xamarin-macios/src/Foundation/NSAction.cs:163
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 /Users/builder/data/lanes/5665/f70a1348/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/5665/f70a1348/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at MyApp.MobileApp.Forms.iOS.Application.Main (System.String[] args) [0x00001] in /MyApp.MobileApp.Forms.iOS/Main.cs:12
Maybe you can see something or can tell me if I'm doing something wrong? I have no chance at all to catch the exception and keep the app running. Maybe you can file a bug and fix it in a future version.
Kind regards
Chris