Since upgrading to the 8/17 service release, I intermittently get a NullReferenceException when clearing out (or removing ont a time) old series:
System.NullReferenceException: Object reference not set to an instance of an object. at Infragistics.Silverlight.Chart.XamWebChart.a(Object A_0, NotifyCollectionChangedEventArgs A_1) at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index) at System.Collections.ObjectModel.Collection`1.Remove(T item)System.NullReferenceException: Object reference not set to an instance of an object.at Infragistics.Silverlight.Chart.XamWebChart.a(Object A_0, NotifyCollectionChangedEventArgs A_1)at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)System.Collections.ObjectModel.ObservableCollection`1.ClearItems()at System.Collections.ObjectModel.Collection`1.Clear()
I can't narrow down a small repro yet, but will keep trying. I wanted to post to see if this was a known issue, or if you could notice anything from the stack trace to help me narrow it down or avoid it.
Thanks,Keith
OK, here's a simple repro. All code-behind. This works fine on the 9.1 release, but appeared right after I upgraded to the service release.
FYI, If you comment out the Scene, it doesn't happen.
public partial class SeriesClearRepro : UserControl{ private XamWebChart chart;
public SeriesClearRepro() { InitializeComponent(); this.Loaded += new RoutedEventHandler(SeriesClearRepro_Loaded); }
void SeriesClearRepro_Loaded(object sender, RoutedEventArgs e) { ResetChart(); ResetChart(); }
void ResetChart() { if (this.chart != null) { this.chart.Series.Clear(); this.chart.Axes.Clear(); }
this.chart = new XamWebChart(); this.chart.Scene = new Scene(); }}
One more note... If I keep the Scene, but null it out before clearing the Series and Axes, everything works: this.chart.Scene = null;this.chart.Series.Clear();
Works in my app as well, so a pretty easy, no-impact workaround.