Board index » delphi » What can cause an invalid floating point operation?
NoSpa
![]() Delphi Developer |
Mon, 06 Oct 2003 21:21:19 GMT
|
NoSpa
![]() Delphi Developer |
Mon, 06 Oct 2003 21:21:19 GMT
What can cause an invalid floating point operation?
re Delphi 4 Std
My application is causing a fatal error - Invalid Floating Point operation. The procedure which is causing the error has no real calculations, no real Any ideas? TIA |
Vladimir Konono
![]() Delphi Developer |
Mon, 06 Oct 2003 23:24:45 GMT
Re:What can cause an invalid floating point operation?Quote> My application is causing a fatal error - Invalid Floating Point operation. Vladimir
|
Bob Richardso
![]() Delphi Developer |
Tue, 07 Oct 2003 01:22:00 GMT
Re:What can cause an invalid floating point operation?Quote"NoSpam" <nos...@nospam.com> wrote in message Quote> re Delphi 4 Std Are you stepping through your program with F7's and F8's, with several *Some say the problem is a Windows problem, but that's immaterial, AFAIK - |
Bj?rge S?the
![]() Delphi Developer |
Tue, 07 Oct 2003 01:37:44 GMT
Re:What can cause an invalid floating point operation?"Bob Richardson" <b...@whidbey.com> skrev i melding news:tdu7jkaca53p06@corp.supernews.com... Quote
driver - ISTM that this allways occurs in code involving GDI calls (painting). -- |
NoSpa
![]() Delphi Developer |
Tue, 07 Oct 2003 02:56:09 GMT
Re:What can cause an invalid floating point operation?No the error occurs on certain machines and is caught with my global exception handler. I know which procedure it happens in as to try to track the problem down I So it happens at run-time not whilst debugging with F8 etc. I can not reproduce on my set-up which makes it even more difficult. Any further ideas? |
Duncan Murdoc
![]() Delphi Developer |
Tue, 07 Oct 2003 08:58:16 GMT
Re:What can cause an invalid floating point operation?On Thu, 19 Apr 2001 19:56:09 +0100, "NoSpam" <nos...@nospam.com> wrote: Quote>No the error occurs on certain machines and is caught with my global be doing floating point operations unintentionally. One common place to have this error show up is in the rounding One thing that might fix it is to put Set8087CW(Default8087CW); into your code before the spot where it blows up. This will work if It's also possible that code leaves floating point exceptions asm will clear those (but I haven't tried this particular solution). Duncan Murdoch |
Steve Par
![]() Delphi Developer |
Tue, 07 Oct 2003 21:46:15 GMT
Re:What can cause an invalid floating point operation?I've seen a floating point error (log(negative number) that occured earlier in code not actually show up until later. I was even able to have the program give several showmessages beyond the point where the error was actually taking place. Quote>> My application is causing a fatal error - Invalid Floating Point |
Duncan Murdoc
![]() Delphi Developer |
Tue, 07 Oct 2003 21:49:44 GMT
Re:What can cause an invalid floating point operation?On Fri, 20 Apr 2001 13:46:15 GMT, spa...@umich.edu (Steve Parus) wrote: Quote>I've seen a floating point error (log(negative number) that occured and later changed back to unmask them. Video drivers or poorly written DLLs will often make the first change; the RTL will make the second change. Duncan Murdoch |
NoSpa
![]() Delphi Developer |
Wed, 08 Oct 2003 01:52:48 GMT
Re:What can cause an invalid floating point operation?Quote> That's what happens when the control word is changed to mask errors, |
Duncan Murdoc
![]() Delphi Developer |
Wed, 08 Oct 2003 07:12:28 GMT
Re:What can cause an invalid floating point operation?On Fri, 20 Apr 2001 18:52:48 +0100, "NoSpam" <nos...@nospam.com> wrote: Quote>> That's what happens when the control word is changed to mask errors, know that errors are masked. Duncan Murdoch |
NoSpa
![]() Delphi Developer |
Thu, 09 Oct 2003 17:41:53 GMT
Re:What can cause an invalid floating point operation?I have tracked down that the command trunc seems to be causing the problem. I am gradually going through the program and if I remove the trunc command However, I can not remove the remaining trunc commands as real division is Any ideas what could be causing trunc to fail? Delphi 4 Std |
Bj?rge S?the
![]() Delphi Developer |
Thu, 09 Oct 2003 19:14:17 GMT
Re:What can cause an invalid floating point operation?"NoSpam" <nos...@nospam.com> skrev i melding news:QHxE6.119944$g63.14038291@nnrp3.clara.net... Quote> I have tracked down that the command trunc seems to be causing the problem. time to time that uninitialized float variables (containing more or less random bit patterns) may cause errors. -- |
Duncan Murdoc
![]() Delphi Developer |
Thu, 09 Oct 2003 21:23:50 GMT
Re:What can cause an invalid floating point operation?On Sun, 22 Apr 2001 10:41:53 +0100, "NoSpam" <nos...@nospam.com> wrote: Quote>Any ideas what could be causing trunc to fail? getting bad data and failing for that reason, I'd look for other code messing up the FPU. Trunc is one of the functions that is sensitive to that. Here's a couple of routines that can detect a messed up control word: function Get8087CW:word; function Okay8087CW:boolean; Put assert(Okay8087CW, 'Someone messed up the control word!') just before the bad call to trunc, and compile with assertions on Set8087CW(Default8087CW); just before the trunc, but what you should really do is track down who Duncan Murdoch |
Andreas Kyriaco
![]() Delphi Developer |
Fri, 10 Oct 2003 12:19:25 GMT
Re:What can cause an invalid floating point operation?The message <QHxE6.119944$g63.14038...@nnrp3.clara.net> from "NoSpam" <nos...@nospam.com> contains these words: Quote> I have tracked down that the command trunc seems to be causing the problem. Someone else mentioned the exact same problem with Trunc a few weeks ago, I think it ought to produce a compiler warning of some kind, I am sure that -- Andreas Kyriacou |
John
![]() Delphi Developer |
Mon, 13 Oct 2003 19:41:23 GMT
Re:What can cause an invalid floating point operation?This may be a leetle bit off topic, but I've had a similar sort of thing occur using D4/5 on Win98 when I'm playing with FormatDateTime() and stuff like that... J. QuoteNoSpam wrote: |
1. Error 207 - Invalid Floating Point Operation
2. Error 207 - Invalid floating point operation
3. DbiGetProcs Oracle 7.2 Invalid Floating Point Operation
4. TQuery error: Invalid floating point operation???
5. invalid floating-point operation
6. Invalid Floating Point Operation
7. Invalid Floating Point Operation
8. Help with Invalid Floating Point Operation
9. Invalid Floating Point Operation!
10. Invalid floating point operation when tracing through program