Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2059

Summary: The chart hangs in win64 when the IRange is close to zero
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: AxisAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: normal CC: david
Priority: ---    
Version: 24.180321   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2018-07-13 06:44:55 EDT
This works fine in win32 but hangs in win64:

procedure TForm1.FormCreate(Sender: TObject);
var X1, Y1, X2: double;
begin
  X1 := 10.5;
  Y1 := 289;
  X2 := (10.5 * 9.81 * 821) / (821 * 9.81);

  with Chart1.AddSeries(TPointSeries) do
  begin
    AddXY( X1, Y1 ) ;
    AddXY( X2, Y1 ) ;
  end;
end;

In win32, the IRange calculated at TChartAxis.InternalCalcRange is zero.
In win64, the IRange is 1,77635683940025e-15 and the chart hangs when trying to draw the labels.
Comment 1 david berneda 2023-03-17 11:58:01 EDT
Fixed by detecting an infinite loop when painting the axis labels (DoDefaultLabels method) and breaking it.

The problem is in x64 the subtraction of a Double float value with that small IRange, returns the same float value. 

To investigate: how to detect x64 epsilon/precision to perform the subtraction better.