SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0 votes
2k views

Right now I’m encountering a strange problem.

  1. Open C# WPF app containing SciChart on Windows Server 2012 R2 computer.
  2. Open a tabbed view that contains SciChartSurface.
  3. 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.
  4. 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 3 years ago
  • last active 3 years ago
0 votes
3k views

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 4 years ago
  • last active 4 years ago
0 votes
7k views

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 5 years ago
  • last active 5 years ago
Showing 3 results
This template supports the sidebar's widgets. Add one or use Full Width layout.