Hello,
I am getting an infrequent error using TChart .NET and the fastline series. I am plotting up to 8 fastline series elements on the chart, and sometimes get an error message that generates a red-X through the TChart control. I captured the .NET error info but cannot seem to make sense of it. Like I said, this error happens infrequently and I do have considerable error trapping (i.e. try/catch) around the plotting method.
Any help would be greatly appreciated.
Thanks,
Mark
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Steema.TeeChart.Styles.ValueList.CalcStats()
at Steema.TeeChart.Styles.ValueList.get_Maximum()
at Steema.TeeChart.Styles.Series.MaxXValue()
at Steema.TeeChart.Chart.InternalMinMax(Axis aAxis, Boolean isMin, Boolean isX)
at Steema.TeeChart.Axis.CalcMinMax(Double& min, Double& max)
at Steema.TeeChart.Axis.AdjustMaxMin()
at Steema.TeeChart.Axes.AdjustMaxMin()
at Steema.TeeChart.Chart.CalcAxisRect()
at Steema.TeeChart.Chart.InternalDraw(Graphics g)
at Steema.TeeChart.TChart.Draw(Graphics g)
at Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
IPMS
Assembly Version: 0.1.1984.22919
Win32 Version: 0.1.1984.22919
CodeBase: file:///C:/Documents%20and%20Settings/RFLab/Desktop/IPMS%20Client/IPMS.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
Tools
Assembly Version: 1.0.1984.17264
Win32 Version: 1.0.1984.17264
CodeBase: file:///C:/Documents%20and%20Settings/RFLab/Desktop/IPMS%20Client/Tools.DLL
----------------------------------------
E3238s
Assembly Version: 1.0.1984.17265
Win32 Version: 1.0.1984.17265
CodeBase: file:///C:/Documents%20and%20Settings/RFLab/Desktop/IPMS%20Client/E3238s.DLL
----------------------------------------
GlimmerGlass
Assembly Version: 0.0.0.0
Win32 Version: 0.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/RFLab/Desktop/IPMS%20Client/GlimmerGlass.DLL
----------------------------------------
CTI
Assembly Version: 1.0.1984.17265
Win32 Version: 1.0.1984.17265
CodeBase: file:///C:/Documents%20and%20Settings/RFLab/Desktop/IPMS%20Client/CTI.DLL
----------------------------------------
TeeChart
Assembly Version: 1.1.1769.19457
Win32 Version: 1.1.1769.19457
CodeBase: file:///C:/Documents%20and%20Settings/RFLab/Desktop/IPMS%20Client/TeeChart.DLL
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
System.Web
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2037
CodeBase: file:///c:/windows/assembly/gac/system.web/1.0.5000.0__b03f5f7f11d50a3a/system.web.dll
----------------------------------------
Accessibility
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll
----------------------------------------
************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
TChart .NET Error
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Mark,
Could you please be more specific and tell us the instructions to reproduce this problem? Or could you better send us an example we can run "as-is" to reproduce the problem here?
You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
Could you please be more specific and tell us the instructions to reproduce this problem? Or could you better send us an example we can run "as-is" to reproduce the problem here?
You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Narcis,
This is not so easy as the code requires many pieces of hardware to operate correctly. What I can tell you is that the chart is configured with eight (8) fastline series, each getting 10,000 points. I have varied the number of points for all series from 1000 to 10000 and still receive the error. This error is very infrequent, sometimes taking days to occur.
//Plot the UTV trace (if enabled)
try
{
if (bPlotUtv == true && iSeriesCntr < tChart1.Series.Count)
{
float fUtvScale = -(utv.fYMax - utv.fYMin) / utv.iHeight;
tChart1.Series[iSeriesCntr].Clear();
if (utv.iHeight <= 200)
{
for (int i=0; i < utv.byteP2.Length; i++)
{
yVector = fUtvScale * utv.byteP2 + utv.fYMax;
tChart1.Series[iSeriesCntr].Add(xVector, yVector);
}
}
else
{
for (int i=0; i < utv.uiP2.Length; i++)
{
yVector = fUtvScale * utv.uiP2 + utv.fYMax;
tChart1.Series[iSeriesCntr].Add(xVector, yVector);
}
}
}
}
catch
{
Log("Error Plotting UTV Data!");
Log(" Channel#: " + utv.iChannel);
Log(" Series#: " + iSeriesCntr);
}
Please note that both the xVector[] and yVector[] are doubles.
Thanks,
Mark
This is not so easy as the code requires many pieces of hardware to operate correctly. What I can tell you is that the chart is configured with eight (8) fastline series, each getting 10,000 points. I have varied the number of points for all series from 1000 to 10000 and still receive the error. This error is very infrequent, sometimes taking days to occur.
//Plot the UTV trace (if enabled)
try
{
if (bPlotUtv == true && iSeriesCntr < tChart1.Series.Count)
{
float fUtvScale = -(utv.fYMax - utv.fYMin) / utv.iHeight;
tChart1.Series[iSeriesCntr].Clear();
if (utv.iHeight <= 200)
{
for (int i=0; i < utv.byteP2.Length; i++)
{
yVector = fUtvScale * utv.byteP2 + utv.fYMax;
tChart1.Series[iSeriesCntr].Add(xVector, yVector);
}
}
else
{
for (int i=0; i < utv.uiP2.Length; i++)
{
yVector = fUtvScale * utv.uiP2 + utv.fYMax;
tChart1.Series[iSeriesCntr].Add(xVector, yVector);
}
}
}
}
catch
{
Log("Error Plotting UTV Data!");
Log(" Channel#: " + utv.iChannel);
Log(" Series#: " + iSeriesCntr);
}
Please note that both the xVector[] and yVector[] are doubles.
Thanks,
Mark
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Mark,
It's very difficult to say as these infrequent errors are very difficult to debug. Is there any way you could send us an example project with which we can try and reproduce the error? Maybe you could get data from a file or generate some testing data.
It's very difficult to say as these infrequent errors are very difficult to debug. Is there any way you could send us an example project with which we can try and reproduce the error? Maybe you could get data from a file or generate some testing data.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |