Board index » cppbuilder » floating point exception when calling Application->ProcessMessages() ????

floating point exception when calling Application->ProcessMessages() ????

I have an application that uses many floating point numbers, for the
purpose of charting values on an x-y plot.

When I call Application->ProcessMessages();, I get a floating point
exception. If I comment out that line of code, the exception does not
occur.

has this happened to anyone before? I'm not even really sure where to
start looking.

thanks,
michael

 

Re:floating point exception when calling Application->ProcessMessages() ????


Try tracing in to the call and see where it leads.
It is most likely causing one of your functions to be called when it is not
expected.  This Could specially happen if you do some processing in a OnTimer
event where the processing function gets called several time on the same stack.

What I usually do in a case like this is to set a break point at the beginning
of every function that does anything :O) than place a break point at the
beginning of the function which calls the Application->ProcessMessage() and
place a break point at the end of the same function.. then when you run that
function you can see if the program flow some how reaches another function or
even the same function between the two break points.

- Tolga
Systems Administrator
Post Time Research

"Michael J. Archambault" <m...@email.com> wrote in message
news:39356E71.1EA09B1B@email.com...

Quote

> I have an application that uses many floating point numbers, for the
> purpose of charting values on an x-y plot.

> When I call Application->ProcessMessages();, I get a floating point
> exception. If I comment out that line of code, the exception does not
> occur.

> has this happened to anyone before? I'm not even really sure where to
> start looking.

> thanks,
> michael

Re:floating point exception when calling Application->ProcessMessages() ????


You can also use the call stack (Debug -> Call stack) that can trace you
latest funciton calls, or if you are desperate, trace into asm code and look
for the last function you called there..

Other Threads