Bug:TSurfaceSeries access violation, Teechart pro 7, BDS2006

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Alan
Newbie
Newbie
Posts: 5
Joined: Thu Mar 01, 2007 12:00 am

Bug:TSurfaceSeries access violation, Teechart pro 7, BDS2006

Post by Alan » 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?

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

Post by Narcís » Mon Jan 19, 2009 10:07 am

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:

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
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply