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 - The chart hangs in win64 when the IRange is close to zero
Summary: The chart hangs in win64 when the IRange is close to zero
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Axis (show other bugs)
Version: 24.180321
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-13 06:44 EDT by yeray alonso
Modified: 2023-03-17 11:58 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.