Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net
 SPC Control Chart Tools for .Net
 exception in v1.7.1.5
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

scl1688scl

6 Posts

Posted - 18 Mar 2009 :  09:24:06  Show Profile  Reply with Quote
hi, my demo runs a exception in v1.7.1.5,but very smooth in v1.7.1.4,
mybe it's the bug of v1.7.1.5.

************** exception **************
System.IndexOutOfRangeException:
at com.quinncurtis.spcchartnet.SPCControlChartData.GetCalculatedValue(Int32 row, Int32 column)
at com.quinncurtis.spcchartnet.SPCChartBase.DisplayCalculatedValues()
at com.quinncurtis.spcchartnet.SPCChartBase.DisplayTableData()
at com.quinncurtis.spcchartnet.SPCChartBase.RebuildChartUsingCurrentData()
at com.quinncurtis.spcchartnet.SPCChartBase.timer1_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
-----------------------------------------------------------------
thanks.

quinncurtis

1586 Posts

Posted - 18 Mar 2009 :  10:03:52  Show Profile  Reply with Quote
Sorry, but based on the limited information provided we cannot make any suggestions.

Are you using the trial, or commercial version of the software?

Can you reproduce the problem using any of our example programs ? Can you modify any of our example program so that they can reproduce the problem ?

Quinn-Curtis Customer Support
Go to Top of Page

scl1688scl

6 Posts

Posted - 18 Mar 2009 :  14:17:16  Show Profile  Reply with Quote
trial version.

I debug the program,when I remove the line "chart.EnableScrollBar = true",the exception disappears;and it raises again when I add this line.

Go to Top of Page

quinncurtis

1586 Posts

Posted - 18 Mar 2009 :  14:37:21  Show Profile  Reply with Quote
Revision 1.7.1.4 is more than one month old. Are you trying to use the trial version past the 30 day trial period?

All of our example programs enable the scroll bar.

Can you reproduce your problem using any of our example programs, either in their original state, or after some modification that simulates changes you made to your own demo program. If we can't reproduce the problem we are not going to be able offer any suggestions.
Go to Top of Page

scl1688scl

6 Posts

Posted - 19 Mar 2009 :  08:14:05  Show Profile  Reply with Quote
the demo file "BatchXBarRChart.cs" packaged in v1.7.1.5, I rewrited the "SimulateData" function:

        private void SimulateData()
        {
            //very simple data ...
            ChartCalendar timestamp = new ChartCalendar(DateTime.Now.AddHours(-1));
            double[] data = new double[] { 5.1, 5.2, 5.3};
            DoubleArray samples = new DoubleArray(data);
            this.ChartData.AddNewSampleRecord(timestamp, samples, "memo1...");

            timestamp = new ChartCalendar(DateTime.Now);
            data = new double[] { 5.2, 5.3, 5.4 };
            samples = new DoubleArray(data);
            this.ChartData.AddNewSampleRecord(timestamp, samples, "memo2...");
        }

the exception raised which described in above thread,
when I comment the line "this.EnableScrollBar = true;",it runs well,it's really very strange.

Edited by - scl1688scl on 19 Mar 2009 08:14:55
Go to Top of Page

quinncurtis

1586 Posts

Posted - 19 Mar 2009 :  09:22:05  Show Profile  Reply with Quote
Thank you for the example. We are able to reproduce the problem. It is associated with enabling the scroll bar when the point count is so low that the scroll bar has no function. The scroll bar ends up being initialized with a negative range.

There are a couple of things you can do.

1. Do not enable the scroll bar until you call AddNewSampleRecord enough times to produce one screens worth of data, the numdatapointsinview value in our example programs.

2. Or, set the property HScrollBarMaxValueAdjust to half the value of numdatapointsinview.

this.HScrollBarMaxValueAdjust = numdatapointsinview / 2;

In the meantime we will add code to disable the scroll bar until at least a screens worth of data is added to the chart.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07