Page 1 of 1

CalcXPos access violation

Posted: Mon May 23, 2005 3:55 pm
by 9082891
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...

Posted: Tue May 24, 2005 8:12 am
by narcis
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.

Posted: Tue May 24, 2005 9:06 am
by 9082891
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.

Posted: Tue May 24, 2005 9:38 am
by narcis
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?