Page 1 of 1

Access Violation sizing TeeChart5.ocx

Posted: Mon Dec 08, 2003 8:41 pm
by 6924722
Hello,
I'm using TeeChart5.ocx in .Net. If I resize the chart to be too small, I get an access violation: "Access violation at address 504222F4 in module 'TeeChart5.ocx' Write address of 0000001F", essentially TeeChart is crashing. If I create the chart with Long legend text (the graph must draw too small) I get the same error. If I change the font size (which makes the graph draw small) I get the same error. Has anyone seen this error? The only difference I can see versus other graphs we have created is that the X axis is in date/Time format. It seems that someone would have already seen this...
Thanks in advance for your help.

Posted: Wed Dec 10, 2003 11:25 am
by Pep
How're you resizing the Chart ? I cannot reproduce the problem here using the TeeChart Pro v5.06 and the following code :

Code: Select all

		private void Form1_Load(object sender, System.EventArgs e)
		{
			axTChart1.Series(0).FillSampleValues(10);
			axTChart1.Series(0).XValues.DateTime = true;
		}

		private void button1_Click(object sender, System.EventArgs e)
		{
			axTChart1.Size = new System.Drawing.Size(200, 140);
		}
Josep Lluis Jorge
http://support.steema.com

Posted: Wed Dec 10, 2003 6:55 pm
by 6924722
Hello Pep,

Here is the code that causes the fatal exception, pointer error or program abortion. Code was written in .Net 2000 C# with TeeChart 5.03 ocx.
The problem seems to be with setting the bottom axis maximum and then resizing the graph too small:

//set graph window properties
m_ScrollTime = 4;
m_ScrollDiv = (double)(m_ScrollTime * 1000) / DAY_FRACTION_MS;
// Load the legend
LoadParameters();
// Break the graphtest
axTChart3.Axis.Bottom.Maximum = m_ScrollDiv; // what we really want...bombs
// axTChart3.Axis.Bottom.Maximum = 0.00004; // bombs
// axTChart3.Axis.Bottom.Maximum = 0.0004; // OK
Please note that the line it bombs on is when Axis.Bottom.Maximum is assigned 0.00004 or longer of a number.

Additional info:
-Adding 3+ legend items (parameters) bombs 2 or less does not.
-Axis.Automatic property has no effect on the bug.
-Axis.Maximum is > Axis.Minimum
Thanks
Pete

Posted: Fri Dec 12, 2003 11:51 am
by Pep
Hi Pete,

yes, you're correct, this is a known bug in TeeChart Pro AX v5 which has been fixed in TeeChart Pro AX v6.

Josep Lluis Jorge
http://support.steema.com