Iterating through my data by calling AddXYZ like this:
for z := 25000 downto 0 do
for x := 1 to 1000 do
AddXYZ(x, y, z);
will cause an access violation. This is not the case if the loop on Z ascends rather than descends, ie.
for z := 0 to 25000 do...
works fine. This is because in TeeSurfa.TCustom3DGridSeries.FillGridIndex,
the call to SearchZvalue calls SearchSorted in order to avoid adding duplicate values to the ZVals array. But since ZVals is sorted in reverse, many duplicates are added to this array, overflowing your 20000 limit.
The IrregularGrid property must also be set to TRUE for this access violation to occur.
I haven't seen anything in the docs requiring that the calls to AddXYZ must occur with an ascending Z value.
Is there something I missed?
Bug:TSurfaceSeries access violation, Teechart pro 7, BDS2006
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Alan,
I've been able to reproduce the issue here and added it (TV52013753) to the defect list to be fixed for future releases. In the meantime you should populate the series in an ascending loop without the need to use IrregularGrid=true here:
I've been able to reproduce the issue here and added it (TV52013753) to the defect list to be fixed for future releases. In the meantime you should populate the series in an ascending loop without the need to use IrregularGrid=true here:
Code: Select all
for z := 0 to 25000 do
for x := 1 to 1000 do
Series1.AddXYZ(x, random, z);
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |