Page 1 of 1

Exception: Floating Point Overflow

Posted: Tue Sep 12, 2006 3:11 pm
by 9341007
Hi,
I'm having a problem with floating point overflow exceptions with the TChart object. I think I have isolated why it's happening, but not how to avoid it. Our appilcation has a graph that updates periodically, and the floating point overflow seems to happen when zooming in/out (out mostly). If I turn off the updating then the problem seems to go away. The exception is thrown from several places, one of which is in TChartAxis.InternalCalcRange code.
Is there some lockout mechanism that I'm supposed to be using to avoid changing data in the middle of TChart's event handling?
Any pointers or directions to look would be greatly appreciated,
Mike

Posted: Tue Sep 12, 2006 3:13 pm
by narcis
Hi Mike,

Could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.

Exception: Floating Point Overflow

Posted: Tue Sep 12, 2006 3:31 pm
by 9341007
I'll put together an example program and post it as quick as I can. It also seems to only happen if there are multiple Vertical Axes with some of them set to "Custom" as well.

Exception: Floating Point Overflow

Posted: Tue Sep 12, 2006 4:33 pm
by 9341007
Posted.

Posted: Thu Sep 14, 2006 11:06 am
by Pep
Hi Mike,

using the following code in the OnUndoEvent solves the problem here :

Code: Select all

procedure TForm1.ChartUndoZoom(Sender: TObject);
begin
chart.Axes.Reset;
end;
Could you please check if it works fine for you ?

Exception: Floating Point Overflow

Posted: Fri Sep 15, 2006 6:33 pm
by 9341007
That seems to fix the problem. Thanks so much for your help.