Pre loader

SciChartSurface instance is disposed in SciChart.6.2.1.13304

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

2
1

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?

Version
6.2.1.13304
  • You must to post comments
0
0

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

  • You must to post comments
0
0

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

  • You must to post comments
0
0

It is fixed with > 6.3

  • J Jakupi
    See my post below, it still happens for us with 6.3
  • You must to post comments
0
0

We are seeing the same exception and we are using 6.3.0.13476
I’m not sure how to reproduce this as it sometimes happens and sometimes not. It passed our internal testing but now shows up in our productions systems which is bad for us.

Here is the exception:

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.yqa(DependencyObject pi, DependencyPropertyChangedEventArgs pj) 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.gbw.oqj() 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)

  • Andrew Burnett-Thompson
    Hi JJ, we’d love to help, but can you help us by providing a sample to reproduce? SciChartSurface gets disposed when either (1) .Dispose() is called by the user or (2) .Dispose() is called by the finalizer before the object is garbage collected. The exact conditions to cause this bug we haven’t seen, so any help in reproducing it would be helpful
  • J Jakupi
    I’m not sure how to reproduce it as it doesn’t happen every time. However like you said I think it happens when we close a chart and it’s disposed. We specifically call dispose of the chart control but we do clear the data series it’s bound to.
  • You must to post comments
0
0

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)

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies