This is a migrated thread and some comments may be shown as answers.
Unhandled Exception during UpdateXAxis
1 Answer 9 Views
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 23 Jan 2018, 10:54 AM

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

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 26 Jan 2018, 09:43 AM
Hi Chris,

My local tests do not show a problem when removing an item from chart series' source. In addition, the stack trace you have provided does not seem to be produced the mere removal of an item. That's why I believe I do not have all the needed information to reproduce the problem. Do you update the chart series in any way? The best way to approach this would be if you can provide a sample, which reproduces it. You can start with just a simple chart and add the functionality, which causes the issue -- remove an item from the source, any chart-related updates etc. This way I'll be able to review it locally and get back to you with my findings.

Best regards,
Ves
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart
Asked by
Chris
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or