Welcome to the WPF feedback portal. We’re happy you’re here! If you have feedback on how to improve the WPF, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

Hello,

we recently upgraded Syncfusion from version 15.4.0.20 to 19.2.0.46 and experienced, that in some of our charts a Null reference exception was thrown. The stack trace only contains code from Syncfusion:

Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Object.GetType()
   at Syncfusion.UI.Xaml.Charts.ChartSeriesBase.ReflectedObject(Object parentObj, String actualPath)
   at Syncfusion.UI.Xaml.Charts.ChartSeriesBase.GetComplexArrayPropertyValue(Object parentObj, String path)
   at Syncfusion.UI.Xaml.Charts.ChartSeriesBase.GetArrayPropertyValue(Object parentObj, String[] paths)
   at Syncfusion.UI.Xaml.Charts.ChartSeriesBase.GenerateComplexPropertyPoints(String[] yPaths, IList`1[] yLists, GetReflectedProperty getPropertyValue)
   at Syncfusion.UI.Xaml.Charts.ChartSeriesBase.GeneratePoints(String[] yPaths, IList`1[] yValueLists)
   at Syncfusion.UI.Xaml.Charts.XyDataSeries.GeneratePoints()
   at Syncfusion.UI.Xaml.Charts.SfChart.UpdateArea(Boolean forceUpdate)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Because the code is a bit complicated and written by a colleague, I cannot provide a minimal example application.

But I have already found the root cause for the problem and a working solution:

In the past, we feeded the data in the following format to the bar chart:

- Category1
--- SubCategory1
--- SubCategory2
- Category2
--- SubCategory1

which means, that each category does not have the same amount of sub categories.

This was working fine until the upgrade. Now I changed the code, such that all categories will have the same number of sub categories, while the ones, that were not present in the past, just have a value of 0:

- Category1
--- SubCategory1
--- SubCategory2
- Category2
--- SubCategory1 --- SubCategory2 (with value 0, such that it is not visible in the bar chart)

I hope you can do something with that description. This is only meant for a notification, I do not need any urgent fixes at the moment, because I have identified the root cause and found a solution.

Thanks and kind regards,

Christian