Board index » delphi » Weard floating point error...

Weard floating point error...

Hello,
    I have a funny error....
I am using Delphi 4, and regulary I get the error 'Floating point error...',
but the thing is, this error ONLY comes up when I am using a shortcut of my
executable, never in the development environment, never from the directory
where the executable reside... only when it is install form Instalshield or
if I create a shortcut manually (and yes, the working directory if
correct...)
And another funny detail, when I can find out where it seems to be error,
and before this line I put a Messagebox(), the error won't happend, if I
remove the MessageBox(), the error come out!!!!

Any idea???

Thanks!

lbr...@aqiii.org

 

Re:Weard floating point error...


Quote
Luc Brais wrote:

> Hello,
>     I have a funny error....
> I am using Delphi 4, and regulary I get the error 'Floating point error...',

What does that regularly mean? You mean, when you write a app with
couple of Forms, and run it, you start getting those errors?

Do you have more than one PCs where to test this? Does it appear
in the same way with every machine?

If it's only with some specific computers, the problem could have
its origin in VGA-adapter. At least some S3-based adapters, and
with some specific color depth in use, have reported to give strange
error messages.

Markku Nevalainen

Re:Weard floating point error...


Luc Brais <lbr...@sympatico.ca> wrote

Quote
> Hello,
>     I have a funny error....
> I am using Delphi 4, and regulary I get the error 'Floating point error...',
> but the thing is, this error ONLY comes up when I am using a shortcut of my
> executable, never in the development environment, never from the directory
> where the executable reside... only when it is install form Instalshield or
> if I create a shortcut manually (and yes, the working directory if
> correct...)
> And another funny detail, when I can find out where it seems to be error,
> and before this line I put a Messagebox(), the error won't happend, if I
> remove the MessageBox(), the error come out!!!!

Sounds familiar, although on my machine it seems to pop up
only under the de{*word*81}. Never anywhere else. A damn nuisance,
i usually get around it somehow. Some pointers that may help.
1) Always initialize local variable. Often a local floating
point variable may have -NAN- value. Remember that stack
variable just hold random numbers, whatever the allocated
storage space contains at the moment.
Adding or removing code, changing a configuration, may then
move the procedure or function to operate in a different
memory space which will show/not show the problem.
2) Dates are stored as floating point numbers and can then
produce the same problem.
3) Certainly early versions of Delphi/BDE produced an error if
you ran a query on a table that never had *any* records in it.
IOW, a newly created one with no entries. The problem disappeared
as soon as you inserted a record and did not come back even if
you deleted *all* records.
4) I got rid of the problem in one case by renaming a component.
Not anyone, but a specific date entry one. does not make any sense
to me.
5) Markku may have a point about the VGA adapter. We had a number
of problems recently which were caused by VGA cards.

Peter Reber

Re:Weard floating point error...


I get unusual floating point errors as well. I work in NT at the office and
when I work at home in 98 I will occaisionally get floating point errors in
code that works fine in the NT environment. I traced the problem to the
"now" function and suspect it has some relation to the time conversion
routines and locales. It usually disappears after a rebuild or just on its
own. Major league weird.

Quote
Markku Nevalainen <m...@iki.fi> wrote in message news:3A70B40E.57E2@iki.fi...
> Luc Brais wrote:

> > Hello,
> >     I have a funny error....
> > I am using Delphi 4, and regulary I get the error 'Floating point
error...',

> What does that regularly mean? You mean, when you write a app with
> couple of Forms, and run it, you start getting those errors?

> Do you have more than one PCs where to test this? Does it appear
> in the same way with every machine?

> If it's only with some specific computers, the problem could have
> its origin in VGA-adapter. At least some S3-based adapters, and
> with some specific color depth in use, have reported to give strange
> error messages.

> Markku Nevalainen

Re:Weard floating point error...


Hello Luc,
I have similar problems ONLY when watching/evaluating complex variables
in the developement environment D3.0.
As this is not important to me I never invastigated it deeply, but I believe
that
it comes from the incorrect behaviour of some componets or the D3 IDE.

"Luc Brais" <lbr...@sympatico.ca> p?e v diskusnm p?spvku
news:t91c6.7849$M63.478995@news20.bellglobal.com...

Quote
> Hello,
>     I have a funny error....
> I am using Delphi 4, and regulary I get the error 'Floating point
error...',
> but the thing is, this error ONLY comes up when I am using a shortcut of
my
> executable, never in the development environment, never from the directory
> where the executable reside... only when it is install form Instalshield
or
> if I create a shortcut manually (and yes, the working directory if
> correct...)
> And another funny detail, when I can find out where it seems to be error,
> and before this line I put a Messagebox(), the error won't happend, if I
> remove the MessageBox(), the error come out!!!!

> Any idea???

> Thanks!

> lbr...@aqiii.org

Other Threads