Page 1 of 1

Access Violation when removing custom axis

Posted: Fri Dec 05, 2003 3:26 pm
by 9078921
Hi everyone,

I tried to create some custom axes in my graphic. When removing those afterwards I get an error:

"Access violation at address 504C125E in module 'TeeChart6.ocs'. Read of address 00000285."

This seems to occur when the last custom axis is removed, no matter if RemoveAllCustom or RemoveCustom 0 is used.

I found that this issue was already posted by someone for version 5 some months ago in the newsgroup:
http://216.101.185.148/scripts/isapi.dl ... le=4385727

Btw, I'm using Teechart 6 ActiveX with Visual FoxPro.

Posted: Fri Dec 05, 2003 4:27 pm
by Pep
Which TeeChart Pro version are you using ?
It works fine using the TeeChart Pro v6.04 and the following code :

Code: Select all

With TChart1
    .Axis.RemoveAllCustom
End With
' or ..
With TChart1
    Do While .Axis.CustomCount > 0
        .Axis.RemoveCustom 0
    Loop
End With
Josep Lluis Jorge
http://support.steema.com

Posted: Mon Dec 08, 2003 10:13 am
by 9078921
Hi Pep,

I had 6.03 indeed. I upgraded to 6.04, but the problem still persists (with both coding ways).

Maybe I should tell you that the error did not occur from the beginning. When I wrote the part of the program that's using custom axes it worked quite well for a while.
Since then I worked on the program for some time, adding more and more to the TeeChart, like some differenct tools etc. Now I wanted to do a final test on all parts, and this special graphic did not work any more, now always crashing with this error. Perhaps there's some conflict with one of the tools or something. If I should find out, I'll let you know...

At the moment the only workaround to get rid of these axes would be resetting the chart (with ClearChart) or even generate a new chart object (which I both don't want to do for several reasons) or - well - not use that special graphic at all... :(



edit:
Found the problem. It was an active ColorLine tool linked to a (not visible) default axis. Deactivating this ColorLine before calling Repaint makes the error not occur.
So, now, I can live with it for a while. ;)
Hope this info is enough to catch that bug anyway.

regards

Posted: Tue Dec 09, 2003 12:45 pm
by Pep
>Found the problem. It was an active ColorLine tool linked to a (not >visible) default axis.
Ok, thanks for the report, we'll review this and will try to solve it for the next maintenance releases.

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