SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
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?
We are also seeing this issue. In our application we are disposing and creating SciCharts. This seems to happen when we are in the process of disposing a chart.
Here is our stack trace:
This SciChartSurface instance is disposed, you cannot set a RenderSurface on it at this time
Unhandled Exception on thread: 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.eko(SciChartSurface v)
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)
Hi Tobias,
Thanks for your inquiry.
Unfortunately, we cannot be much helpful without being able to reproduce this issue on our side. Please provide us with a small sample project reproducing this for investigation or with steps to reproduce this in our examples.
At the moment I can recommend you to switch off the VisualXccelerator before disposing of a SciChartSurface setting s:VisualXcceleratorEngine.IsEnabled to “False” and reset the fallback value of RenderSurface to “Null” setting the s:VisualXcceleratorEngine.FallbackType property.
Hope this helps.
With best regards,
Oleksandr
Hi there,
we are facing the same issue. Tried to follow Oleksandr’s advice but wasn’t able to set the fallback value to null by setting s:VisualXcceleratorEngine.FallbackType property. I guess, I’m doing something wrong.
Does anybody solved the issue already?
Thanks,
Philippp
Please login first to submit.