Pre loader

NullReferenceException in SciChart.Charting.dll on mouse drag events

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

1
0

Hello, SciChart Team!
i have an issue using mouse drag event ( RubberBandXyZoomModifier, ZoomPanMidifier). the message says “NullReferenceException in SciChart.Charting.dll ” or “Thread.cs not found” from time to time.
after some experiments i figured out that the app starts to crush after i change XAxis type .
i have a simple mvvm user control used to display both arrays of double and datebound data, XAxes of SciChart Surfase is bound to an observable collection of IAxis elements. if i need to change chart type i clear this collection and create an axis of desired type (DateTimeAxisViewModel or NumericAxisViewModel). after that the series can be added, but zooming causes crash with nearly to no info.

i attached a solution, which lacks only scichart dlls in order to run (hopefully), Window_Loaded method has a commented line which changes chart type and makes app crush on zooming, would be nice if you checked it out.
Thanks in advance!
Alexander

Version
5.1
  • Alexander Volkov
    I get the same kind of exception when I add PointMarker to lines renderableseries viewmodels in ViewModelsFactory.New method. I really must have missed something crucial.
  • Andrew Burnett-Thompson
    Thanks for the code to repro Alexander, we will take a look!
  • You must to post comments
2
0

Hello Alexander,

I’ve investigated your sample, and found out that the reason of crash is an XAxis with IsPrimaryAxis = false, we’re still investigating what makes it happened, but we have a quick suggestion for you:

You can try to set this property to “true” right before adding it to Axis.

We’re still working on this issue and we’re going to post you an update, when we have more information on it.

  • Alexander Volkov
    Hello, Nazariy Thanks for an update, this workaround seems to do the job. Anyway, i’ll stay tuned for your final conclusion.
  • You must to post comments
Showing 1 result
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