CalcXPos access violation

TeeChart for ActiveX, COM and ASP
Post Reply
Schateau
Newbie
Newbie
Posts: 2
Joined: Wed Jun 16, 2004 4:00 am

CalcXPos access violation

Post by Schateau » Mon May 23, 2005 3:55 pm

I have the c++ code :

int iFirstValueIndex = m_Serie.GetFirstValueIndex();
int iLastValueIndex = m_Serie.GetLastValueIndex();

if((iFirstValueIndex < 0) || (iLastValueIndex < 0))
return;

int iWidth = m_Serie.CalcXPos(iLastValueIndex) - m_Serie.CalcXPos(iFirstValueIndex);


Sometimes : its make an access violation. Do you find a bugg for it ?

When the window is destroyed and the activeX is released, access violation too (sometimes) !

Version of teechart : 6.0.0.5

Hope it is a bugg into the 6.0.0.5 version, have installed 6.0.0.6.
Testing...

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue May 24, 2005 8:12 am

Hi Schateau,

It works fine for me using both versions. If the problem persist please send us an example we can run "as-is" to reproduce the problem here. You can post your examples 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
Image Image Image Image Image Image
Instructions - How to post in this forum

Schateau
Newbie
Newbie
Posts: 2
Joined: Wed Jun 16, 2004 4:00 am

Post by Schateau » Tue May 24, 2005 9:06 am

I think it is not the CalcXPos that have a bugg but the CalcXPos that crash because the index returned by :
int iFirstValueIndex = m_Serie.GetFirstValueIndex();
or / and
int iLastValueIndex = m_Serie.GetLastValueIndex();
are sometimes wrong (looks good but make CalcXPos crash).

The application is too much complex to send you a source code example.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue May 24, 2005 9:38 am

Hi Schateau,

Are you using that code at chart's AfterDraw event? Using the code at that event the indexes seem to be ok for me.
The application is too much complex to send you a source code example.
Couldn't you please make an example application reproducing this problem we can run "as-is" to reproduce the problem here?
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply