Page 1 of 1
AV after creating horizontal series with no values
Posted: Tue Jan 27, 2015 4:57 pm
by 10546565
TChart Pro 2015.14.150120 32 bit VCL
See the attached demo that raises an exception as soon as the "Update Chart" button is clicked. The button simply creates a series for the chart but doesn't add any data to the series.
I have Pro version, and need to get this fixed so I can get it out to my customers. I would appreciate a code fix.
Ed Dressel
Re: AV after creating horizontal series with no values
Posted: Wed Jan 28, 2015 1:23 pm
by yeray
Hi Ed,
This bug was already found and fixed.
I've added it to the public tracker so other customers can find it if they try to report it:
http://bugs.teechart.net/show_bug.cgi?id=1106
The fix is, at Chart.pas, where says:
Code: Select all
function TCustomChartLegend.CalcItemWidth(const ACol,AIndex:Integer):Integer;
var tmpSt : String;
tmpLines : Integer;
begin
if FItems.Custom and (FItems.Count>AIndex-FirstValue) then
if ACol=0 then
tmpSt:=FItems[AIndex-FirstValue].FText
else
tmpSt:=FItems[AIndex-FirstValue].FText2
else
tmpSt:=IItems[AIndex-FirstValue,ACol];
if tmpSt='' then
result:=0
else
result:=ParentChart.MultiLineTextWidth(tmpSt,tmpLines,TextFormat)+FTextSymbolGap;
end;
Change it for this:
Code: Select all
function TCustomChartLegend.CalcItemWidth(const ACol,AIndex:Integer):Integer;
var tmpSt : String;
tmpLines : Integer;
begin
if FItems.Custom and (FItems.Count>AIndex-FirstValue) then
if ACol=0 then
tmpSt:=FItems[AIndex-FirstValue].FText
else
tmpSt:=FItems[AIndex-FirstValue].FText2
else if (Length(IItems)>0) then
tmpSt:=IItems[AIndex-FirstValue,ACol]
else
tmpSt:= '';
if tmpSt='' then
result:=0
else
result:=ParentChart.MultiLineTextWidth(tmpSt,tmpLines,TextFormat)+FTextSymbolGap;
end;
Re: AV after creating horizontal series with no values
Posted: Wed Jan 28, 2015 3:55 pm
by 10546565
Thank you.
Is there any way to get a list of patches for 2015.14? This would be embarrassing if our internal testing did not pick this up and a customer did. If there are other items like this, I would like to get them fixed.
Thank you,
Ed Dressel
Re: AV after creating horizontal series with no values
Posted: Thu Jan 29, 2015 9:12 am
by yeray
Hi Ed,
I'm not sure to understand what do you exactly mean.
Bugzilla allows you to do customizable searches like:
- Tickets created after 20th January 2015, when v2015.14 was published:
link
- Tickets closed as "fixed" since 20th January 2015, when v2015.14 was published:
link