Page 1 of 1

NullReferenceException during ScrollPosition set

Posted: Fri Mar 24, 2017 12:48 pm
by Matthias Weidmann
Hello Arction-Team,

I got a call from one of our customers which describes an application crash.
From the log of our application I can see a lot of NullReferenceException during setting the ScrollPosition of an x-axis.
We are adding samples to the series every 100 ms and update the scroll position after adding the new points.
These exceptions occur about 25 seconds ending with a ChartException.
Neither I can reproduce the scenario, nor your customer.

Are you able to figure out what causes the exceptions?
Maybe the fact, that the customer is using a virtual machine, is of importance?

Here are the call stacks:

System.NullReferenceException Msg:Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
bei System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
bei System.Threading.Tasks.Task.Wait()
bei System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
bei System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body)
bei Arction.WinForms.Charting.Axes.AxisX.LFC(IList`1 A, Double B)
bei Arction.WinForms.Charting.Axes.AxisX.LFC()
bei Arction.WinForms.Charting.Axes.AxisX.set_ScrollPosition(Double value)

Arction.WinForms.Charting.ChartException: Render device create failed: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei Arction.WinForms.Charting.LightningChartUltimate.NMC()
bei Arction.WinForms.Charting.LightningChartUltimate.SYC()
bei Arction.WinForms.Charting.LightningChartUltimate.WndProc(Message& message)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Best regards,
Matthias Weidmann

Re: NullReferenceException during ScrollPosition set

Posted: Fri Mar 24, 2017 3:37 pm
by ArctionKestutis
Hello Matthias,

First, we would need to know version of LightningChart you are using. Running on virtual machine is possible, but of course it limits graphic capabilities. If it is not reproducible, when we are in for a long day.
As for now, exception don't look familiar. Maybe something new come up after we will learn the LCU version.

All the best,
Kestutis

Re: NullReferenceException during ScrollPosition set

Posted: Mon Mar 27, 2017 6:36 am
by Matthias Weidmann
Hello Kestutis,

our customer is currently using the version 7.0.2.4018 of the WinForms LCU.
We have plans to release the newest version of LCU, but this will take some additional time.

Best regards,
Matthias

Re: NullReferenceException during ScrollPosition set

Posted: Mon Mar 27, 2017 3:15 pm
by ArctionKestutis
Hello Matthias,

The x-axis scrolling behavior have been modified/improved in numerous revisions after version 7.0.2.4018. If you could not reproduce it, when it is just guessing game, which one of those maybe the problem.

All the best.