Page 1 of 1

IndexOutOfRangeException - FastLine when DrawAllPoints=false

Posted: Fri Oct 06, 2017 2:27 pm
by 10046738
I am getting the following inconsistent error on mouse click when the chart has fastline series
when DrawAllPoints = false. If I change DrawAllPoints = true I do not get the error.

Index was outside the bounds of the array.
[Inner Exception 0]
Type: System.IndexOutOfRangeException

at Steema.TeeChart.Styles.ValueList.get_Item(Int32 index)
at Steema.TeeChart.Styles.FastLine.Clicked(Int32 x, Int32 y)
at Steema.TeeChart.Styles.SeriesCollection.Clicked(Int32 x, Int32 y, Int32& valueIndex)
at Steema.TeeChart.Tools.MarksTip.MouseEvent(MouseEventKinds kind, MouseEventArgs e, Cursor& c)
at Steema.TeeChart.Chart.BroadcastMouseEvent(MouseEventKinds kind, MouseEventArgs e, Cursor& c)
at Steema.TeeChart.TChart.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

Re: IndexOutOfRangeException - FastLine when DrawAllPoints=false

Posted: Fri Oct 06, 2017 2:54 pm
by Christopher
Hello,

Can you reproduce this issue using the following code?

Code: Select all

    private void InitializeChart()
    {
      FastLine series = new FastLine(tChart1.Chart);

      series.FillSampleValues(100000);
      series.DrawAllPoints = false;

      MarksTip tool = new MarksTip(tChart1.Chart);
      tool.Series = series;
    }
if not could you please modify the above code so I can reproduce the issue here?

Re: IndexOutOfRangeException - FastLine when DrawAllPoints=false

Posted: Fri Oct 06, 2017 3:20 pm
by 10046738
- I could not get the exception with a single series.
- It occurs more often when the chart is zoomed.
- It seems to occur more often when the mouse click is outside of the wall area but inside the panel area.
- It requires many (estimated 10-20) mouse clicks to get the error.

I hope that helps.

Code: Select all

        private void InitializeChart()
        {

            for (int i = 0; i < 10; i++)
            {
                FastLine series = new FastLine(tChart1.Chart);

                series.FillSampleValues(100000);
                series.DrawAllPoints = false;
            }
            MarksTip tool = new MarksTip(tChart1.Chart);
        }

Re: IndexOutOfRangeException - FastLine when DrawAllPoints=false

Posted: Mon Oct 09, 2017 9:55 am
by Christopher
Hello,

Yes, thank you, that helped - I have added the issue to our issue-tracking software with id=1926 and have resolved it. The resolution will be available in the upcoming maintenance release.