Ver 8.05 gives exception error in debug mode

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Tom-SE
Newbie
Newbie
Posts: 10
Joined: Tue Nov 04, 2008 12:00 am

Ver 8.05 gives exception error in debug mode

Post by Tom-SE » Thu Jun 04, 2009 2:38 pm

Hi,

I just upgraded to ver 8.05 and get the following exception error during debug mode in Delphi 2009:

"Exception class ElistError 'List index out of bounds(-1)' in
procedure TChartSeries.DrawAllValues;

I get this error when using:
Series1.AddXY( 123, 456, 'Hello', clGreen );

But this one gives no exception:
Series1.AddXY( 123, 456, 'Hello');

Note that both lines works in release mode.

Thanks,

Thomas

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

Post by Narcís » Thu Jun 04, 2009 2:54 pm

Hi Thomas,

I'm not able to reproduce the problem here. Can you please send us a simple example project we can run "as-is" to reproduce the issue here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
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

Tom-SE
Newbie
Newbie
Posts: 10
Joined: Tue Nov 04, 2008 12:00 am

Post by Tom-SE » Fri Jun 05, 2009 7:20 am

Hi Narcís,

I just uploaded the files in "addxy_exception_debug.zip" on your upload page.

The project is just a new Tchart on a form with two buttons:

procedure TForm1.Button1Click(Sender: TObject);
begin
Series1.AddXY( 123, 456, 'Hello'); //works
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
Series1.AddXY( 123, 456, 'Hello', clGreen ); //does not work
end;

The last button gives the error in debug mode for
procedure TChartSeries.DrawAllValues;

Thanks,
Thomas

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Fri Jun 05, 2009 9:26 am

Hi Thomas,

It's strange, we've tested your project in two different machines and couldn't reproduce the problem. Shall we do any specific step we may missed?
We executed you app ensuring that we do it in debug mode and that there the reference to the sources.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Tom-SE
Newbie
Newbie
Posts: 10
Joined: Tue Nov 04, 2008 12:00 am

Post by Tom-SE » Sun Jun 07, 2009 9:47 am

Hi again,

I have a rather fast new PC (Intel core 2 quad at 2.4 GHz, Nvidia GT8600). Could it be some speed issue making it non-reproducable for you?

In "Series.pas":
(procedure TCustomSeries.DrawValue(ValueIndex:Integer);)

I get the error on line 2181:
//TV52013890
if {$IFDEF CLR}(ValueIndex>0) and{$ENDIF}(IsNull(ValueIndex-1)) then if null }

If this line is change to this there is no error:
if (ValueIndex>0) and (IsNull(ValueIndex-1)) then { if null } //ok

Thanks,
Thomas

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Mon Jun 08, 2009 8:29 am

Hi Thomas,

Here we've tested with our new machines too that are pretty similar than yours (Intel core 2 quad at 2.4 GHz, Nvidia GT8500, 3.25 GB RAM) so it shouldn't be due to a hardware difference.

TV52013890 was a VCL for NET bug and that's the reason of the "IFDEF CLR".
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Ronald Hordijk
Newbie
Newbie
Posts: 1
Joined: Wed Oct 01, 2008 12:00 am

Re: Ver 8.05 gives exception error in debug mode

Post by Ronald Hordijk » Fri Jun 12, 2009 9:25 am

Try testing with range check on. I think that i got the same bug and fixed/worked around it by changing the following function in teEnging.pas testing on a negative value used to look in an array.

{ Returns True is the ValueIndex point in the Series is Null. }
Function TChartSeries.IsNull(ValueIndex:Integer):Boolean;
begin
if ValueIndex < 0 then
Result := True
else
result:=ValueColor[ValueIndex]=clNone;
end;

Hope this helps.

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Ver 8.05 gives exception error in debug mode

Post by Yeray » Tue Jun 16, 2009 8:00 am

Hi Thomas and Ronald,

We now could reproduce the problem. It seems that the bug solved for Delphi for NET (TV52013890) is also reproducible for Delphi when Range Checking is on. So we want you to know that we have changed the Series.pas as Thomas suggested the 7th of June:

Code: Select all

if (ValueIndex>0) and(IsNull(ValueIndex-1)) then { if null }
if FTreatNulls=tnDontPaint then
begin
  OldX:=X;
  OldY:=Y;
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Tom-SE
Newbie
Newbie
Posts: 10
Joined: Tue Nov 04, 2008 12:00 am

Re: Ver 8.05 gives exception error in debug mode

Post by Tom-SE » Tue Jun 16, 2009 10:19 am

Yeray and Ronald,

Thanks for your help!

Post Reply