Bug:TSurfaceSeries access violation, Teechart pro 7, BDS2006
Posted: Fri Jan 16, 2009 9:03 pm
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?
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?