My application intermittently output the following exception log:
System.InvalidOperationException: Enumerator version is invalid
Location: hbq`1.ghm.uqc()
InvalidOperationException could be thrown when a collection is modified while iterating of IEnumerable collection
However, it usually outputs the following exception message:
“Collection was modified; enumeration operation may not execute.”
(NOT is “Enumerator version is invalid”)
When and under what conditions can this exceptions occur?
When an exception occurs, the call stack is as follows:
SciChart.Data.dll!hbq.ghm.uqc()
SciChart.Data.dll!hbq.ghm.MoveNext()
System.Core.dll!System.Linq.Enumerable.Any(System.Collections.Generic.IEnumerable source)
SciChart.Charting.dll!SciChart.Charting.Model.DataSeries.DataSeries<double, double>.GetIndicesRange(SciChart.Data.Model.IRange range, SciChart.Charting.Common.Extensions.SearchMode downSearchMode, SciChart.Charting.Common.Extensions.SearchMode upSearchMode)
SciChart.Charting.dll!SciChart.Charting.ChartModifiers.SeriesValueModifier.kly(SciChart.Charting.Visuals.RenderableSeries.IRenderableSeries gsv)
SciChart.Charting.dll!SciChart.Charting.ChartModifiers.SeriesValueModifier.OnParentSurfaceRendered(SciChart.Charting.Utility.SciChartRenderedMessage e)
SciChart.Core.dll!TinyMessenger.TinyMessengerHub.ptc<SciChart.Charting.Utility.SciChartRenderedMessage>.Deliver(TinyMessenger.ITinyMessage message)
SciChart.Core.dll!TinyMessenger.DefaultTinyMessageProxy.Deliver(TinyMessenger.ITinyMessage message, TinyMessenger.ITinyMessageSubscription subscription)
SciChart.Core.dll!TinyMessenger.TinyMessengerHub.ptg<SciChart.Charting.Utility.SciChartRenderedMessage>.hyi(TinyMessenger.TinyMessengerHub.ptd ayb)
mscorlib.dll!System.Collections.Generic.List<TinyMessenger.TinyMessengerHub.ptd>.ForEach(System.Action<TinyMessenger.TinyMessengerHub.ptd> action)
SciChart.Core.dll!TinyMessenger.TinyMessengerHub.fbs<SciChart.Charting.Utility.SciChartRenderedMessage>(SciChart.Charting.Utility.SciChartRenderedMessage axj)
SciChart.Core.dll!TinyMessenger.TinyMessengerHub.Publish<SciChart.Charting.Utility.SciChartRenderedMessage>(SciChart.Charting.Utility.SciChartRenderedMessage message)
SciChart.Charting.dll!sjd.urk(SciChart.Charting.Visuals.ISciChartSurface ccg, SciChart.Charting.Services.RenderPassInfo cch, SciChart.Drawing.Common.IRenderContext2D cci)
SciChart.Charting.dll!sjd.RenderLoop(SciChart.Drawing.Common.IRenderContext2D renderContext)
SciChart.Charting.dll!SciChart.Charting.Visuals.SciChartSurface.DoDrawingLoop()
SciChart.Charting.dll!SciChart.Charting.Visuals.SciChartSurface.hjp()
SciChart.Core.dll!SciChart.Core.Utility.CompositionSyncedDelegate.otw(object bdd, object bde)
- Park Seong Gyu asked 1 year ago
- last active 1 year ago
After update to SciChart.6.2.1.13304 we get an InvalidOperationException:
This SciChartSurface instance is disposed, you cannot set a RenderSurface on it at this time
System.InvalidOperationException: This SciChartSurface instance is disposed, you cannot set a RenderSurface on it at this time
at SciChart.Charting.Visuals.SciChartSurfaceBase.OnRenderSurfaceDependencyPropertyChanged(DependencyPropertyChangedEventArgs e)
at SciChart.Charting.Visuals.SciChartSurface.OnRenderSurfaceDependencyPropertyChanged(DependencyPropertyChangedEventArgs e)
at SciChart.Charting.Visuals.SciChartSurfaceBase.eit(DependencyObject ph, DependencyPropertyChangedEventArgs pi)
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetCurrentValue(DependencyProperty dp, Object value)
at SciChart.Charting.VisualXcceleratorEngine.bov.nmx()
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)
I have no idea what happen. This is how we initalize SciChart:
<s:SciChartSurface x:Name="sciChart"
Grid.Column="2"
RenderPriority ="Low"
s:PerformanceHelper.EnableExtremeDrawingManager="True"
s:PerformanceHelper.EnableExtremeResamplers="True"
s:VisualXcceleratorEngine.DowngradeWithoutException="True"
s:VisualXcceleratorEngine.FallbackType="{x:Type s:HighQualityRenderSurface}"
s:VisualXcceleratorEngine.AvoidBlacklistedGpu="False"
s:VisualXcceleratorEngine.EnableImpossibleMode="True"
s:VisualXcceleratorEngine.IsEnabled="{Binding Path=DirectXSupport, FallbackValue=True}"
s:SciChartGroup.VerticalChartGroup="{Binding Path=ChartViewModel.VerticalChartGroupKey}"
Style="{StaticResource SciChartSurfaceStyle}"
GridLinesPanelStyle="{StaticResource DefaultGridLinesPanelStyle}"
RenderableSeries="{s:SeriesBinding RenderableSeriesViewModels, UpdateSourceTrigger=PropertyChanged}">
Any idea?
- Tobias asked 3 years ago
- last active 2 years ago
Right now I’m encountering a strange problem.
- Open C# WPF app containing SciChart on Windows Server 2012 R2 computer.
- Open a tabbed view that contains SciChartSurface.
- Press Ctrl-Alt-Del and Switch User. Select user and type in login password.
Instead of switching user, Remote Desktop can be used to log in to the Windows Server 2012 R2 computer. - After password is entered, an InvalidOperationException would occasionally appear. Enclosed is a popup dialog that appears when the exception occurs.
The error message says “Specified element is already the logical child of another element. Disconnect it first.”
However, the problem doesn’t occur every time though.
This problem never occurs on Windows 7, and it may be related to how DataContext gets changed in newer versions of Windows (like Windows 10 and Windows Server 2012 R2) after remote login or user switch.
Here’s a link to a StackOverflow question posted by someone else regarding this DataContext issue: http://stackoverflow.com/questions/40996366/wpf-view-constructor-called-on-windows-switch-user-or-remote-desktop-login
Somehow, a DataContext change would occasionally glitch up SciChart to produce this exception. This is problematic because one of our customers installed our WPF software application (containing SciChart) on a Windows Server 2012 R2 machine, and would remote login to that machine to run the app. Occasionally the Windows Remote Desktop would lose its connection (understandable), but when the customer logs in again, if the screen the customer was on contained a SciChart surface, the app would occasionally display the InvalidOperationException and crash.
- Xiang Yu asked 6 years ago
- last active 6 years ago
Hi!
I’m having an issue with ZoomExtentsY, where it throws the exception InvalidOperationException.
My software reads sensordata from a stream and appends this data to the SciChart XyDataSeries<DateTime, double>.
I’m plotting a moving window of the data +/- 5 seconds which moves at 1 x speed of time forward. I use ZoomExtentsY to make the moving window show all the available data in that +/- 5 second segment in the Y-direction.
As I haven’t found any pattern on when/why the exception happens, it occurs rather random. Sometimes I can playback fine, but other times the exception happens within seconds of opening the SciChart-plot.
The exception message was: ‘Enumerator version is invalid’
Here is the StackTrace:
at A.1..()
at System.Linq.Enumerable.Any[TSource](IEnumerable1 source)
at Abt.Controls.SciChart.Model.DataSeries.DataSeries2.ZB(IRange C, SearchMode D, SearchMode I)
at Abt.Controls.SciChart.Model.DataSeries.DataSeries2.GetWindowedYRange(IRange xRange, Boolean getPositiveRange)
at Abt.Controls.SciChart.Visuals.RenderableSeries.BaseRenderableSeries.GetYRange(IRange xRange, Boolean getPositiveRange)
at Abt.Controls.SciChart.Visuals.Axes.AxisBase.GetWindowedYRange(IDictionary2 xRanges)
at Abt.Controls.SciChart.Visuals.SciChartSurface.ZB(IDictionary2 C, TimeSpan D
at Abt.Controls.SciChart.Visuals.SciChartSurface.ZoomExtentsY()
Best regards
Lars
- Stian Dahl asked 8 years ago
- last active 8 years ago
Good day, everybody!
Recently I’ve upgraded my project to new SciChart version (v3.1.0.4761 (13th July 2014)). Previos version is 3.0.2.4282 (1st May 2014).
I noticed that the project had a lot of freezes. I watched output data and found out this:
A first chance exception of type 'System.InvalidOperationException' occurred in Abt.Controls.SciChart.Wpf.dll
A first chance exception of type 'System.InvalidOperationException' occurred in Abt.Controls.SciChart.Wpf.dll
SciChartSurface didn't render, because an exception was thrown:
Message: AxisCollection.GetAxisById('DefaultAxisId') returned more than one axis with the ID=DefaultAxisId. Please check you have assigned correct axis Ids when you have multiple axes in SciChart
Stack Trace: в Abt.Controls.SciChart.AxisCollection.GetAxisById(String axisId, Boolean assertAxisExists)
в Abt.Controls.SciChart.Wpf.TreeNodeAttribute.JoinControl(ISciChartSurface firstFont, RenderPassInfo currentValues, IRenderContext2D currentId)
в Abt.Controls.SciChart.Wpf.TreeNodeAttribute.RenderLoop(IRenderContext2D renderContext)
в Abt.Controls.SciChart.Visuals.SciChartSurface.DoDrawingLoop()
A first chance exception of type 'System.InvalidOperationException' occurred in Abt.Controls.SciChart.Wpf.dll
A first chance exception of type 'System.InvalidOperationException' occurred in Abt.Controls.SciChart.Wpf.dll
SciChartSurface didn't render, because an exception was thrown:
Message: AxisCollection.GetAxisById('DefaultAxisId') returned more than one axis with the ID=DefaultAxisId. Please check you have assigned correct axis Ids when you have multiple axes in SciChart
Stack Trace: в Abt.Controls.SciChart.AxisCollection.GetAxisById(String axisId, Boolean assertAxisExists)
в Abt.Controls.SciChart.Wpf.TreeNodeAttribute.JoinControl(ISciChartSurface firstFont, RenderPassInfo currentValues, IRenderContext2D currentId)
в Abt.Controls.SciChart.Wpf.TreeNodeAttribute.RenderLoop(IRenderContext2D renderContext)
в Abt.Controls.SciChart.Visuals.SciChartSurface.DoDrawingLoop()
How can I fix this error?
- Egor asked 9 years ago
- last active 9 years ago