Access Violation sizing TeeChart5.ocx

TeeChart for ActiveX, COM and ASP
Post Reply
Pete
Newbie
Newbie
Posts: 2
Joined: Fri Nov 15, 2002 12:00 am

Access Violation sizing TeeChart5.ocx

Post by Pete » Mon Dec 08, 2003 8:41 pm

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.

Pep
Site Admin
Site Admin
Posts: 3301
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Dec 10, 2003 11:25 am

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

Pete
Newbie
Newbie
Posts: 2
Joined: Fri Nov 15, 2002 12:00 am

Post by Pete » Wed Dec 10, 2003 6:55 pm

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

Pep
Site Admin
Site Admin
Posts: 3301
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Dec 12, 2003 11:51 am

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

Post Reply