See that over the years there has been many issues with "Index out of range". Is this a general issue that has not been resolved yet? We are starting to use a WPF-application in production and as the load increases we get more and more of these exceptions. Looks like it can happen when we remove and item from a RadObservableCollection (or a ObservableCollection bound to a RadTimeline) and add an item right afterwards. Maybe combined with many entries in the collection.
Is there a workaround?
Here is a callstack:
2017-11-13 16:34:38,704 [106:1] ERROR Tennotech.Hilding.Watchman.App - Unhandled exception: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
2017-11-13 16:34:38,714 [106:1] DEBUG Tennotech.Hilding.Watchman.App - Stacktrace:
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at Telerik.Windows.Controls.ProjectedView`1.ObservableSourceListCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at System.Windows.Data.CompositeCollection.OnContainedCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
at System.Windows.Data.CollectionContainer.OnContainedCollectionChanged(NotifyCollectionChangedEventArgs args)
at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
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)
at Tennotech.Hilding.Watchman.Utilities.MirroredRadList`2.SourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in C:\BuildAgent\work\a6c0493e3d7aa6b\Source\Tennotech.Hilding.Watchman.Utilities\MirroredRadList.cs:line 193
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
at System.Collections.ObjectModel.Collection`1.Remove(T item)
at Tennotech.Hilding.Watchman.Framework.Devices.GenericRecordingsSynchronizer.OnRecordingsUpdated(Object sender, ParameterizedEventArgs`1 eventArgs) in C:\BuildAgent\work\a6c0493e3d7aa6b\Source\Tennotech.Hilding.Watchman.Framework\Devices\GenericRecordingsSynchronizer.cs:line 174
at System.Reactive.AnonymousSafeObserver`1.OnNext(T value)
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)