Page 1 of 1

Another Out Of Bounds Crash

Posted: Tue Dec 20, 2005 3:39 pm
by 9639099
NET control crashes application. Error raised outwith any user code that accesses control, hence all my exception traps do not stop it.

Happens on a random basis, but regularly within a few minutes of run.

Debug Dump below.

Any currently known solutions. I have less than 5 days to deliver and may be forced to write own control if no known solution is available.

Getting less convinced that your control is tested by the day :x

DUMP:

System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Steema.TeeChart.Styles.FastLine.CalcPosition(Int32 index, Int32& x, Int32& y)
at Steema.TeeChart.Styles.FastLine.DrawValue(Int32 index)
at Steema.TeeChart.Styles.FastLine.Draw()
at Steema.TeeChart.Styles.Series.DrawSeries()
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
----------------------------------------
WiVibViewer
Assembly Version: 1.0.2180.27873
Win32 Version: 1.0.2180.27873
CodeBase: file:///C:/Projects/WIFI/WiVibSuite/WiVibViewer/bin/Release/WiVibViewer.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
----------------------------------------
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.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
----------------------------------------
IconMathsLibrary
Assembly Version: 1.0.2180.27873
Win32 Version: 1.0.2180.27873
CodeBase: file:///C:/Projects/WIFI/WiVibSuite/WiVibViewer/bin/Release/IconMathsLibrary.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
----------------------------------------
TeeChart
Assembly Version: 2.0.2040.15119
Win32 Version: 2.0.2040.15119
CodeBase: file:///C:/Projects/WIFI/WiVibSuite/WiVibViewer/bin/Release/TeeChart.DLL

Posted: Tue Dec 20, 2005 4:07 pm
by narcis
Hello,

I've been running an application with a FastLine series adding points using a timer. It has currently added more than 10000 points and the application hasn't crashed.

Could you please send us an example we can run "as-is" or let us know specific instructions to reproduce this problem here? It is very important for us to reproduce the problem here to find a solution to it. You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

Is the Graph thread Safe?

Posted: Wed Dec 21, 2005 9:43 am
by 9639099
The application relies on asynchronous TCP connections with our hardware. Without the hardware it is unlikely that you will see the safe effects.

As it is a "random" event, how thread safe is your control?

Is there any way of trapping these drawing exceptions so I can determine the graph state when it fails, without the exception being sent via the windows forms and crashing the application?

As a suggestion, I would have thought that any drawing routines would not raise outside exceptions due to their terminal nature, or that an event could be trapped to get hold of these directly.

Regards

Seriescount = 0?

Posted: Wed Dec 21, 2005 10:17 am
by 9639099
I've linked the graph object back to the calling app so I can see its internals when the exception is raised.

Although there are over four series on the form that are associated with the graph, it is reporting a seriescount of 0.

This may not be the cause but a symptom of the initial error, but it does indicate some form of internal memory loss / corruption has occurred.

Posted: Fri Dec 23, 2005 11:41 am
by narcis
Hi Brian,

TeeChart has and can be used in an asynchronous context but it is the responsibility of the coder in this context to make the necessary checks before executing TeeChart code. You may wish to write us a simple project using a worker thread(s) which simulates your application and about which we can make suggestions.

You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.