Den Jean wrote:
Hi,

I have a strange problem. My Qt4 demo program worked fine with FPC 2.0.0, but crashes (div by zero) with FPC 2.0.2.
Debugging shows that indeed a div by zero is done within
the Qt4 lib. However with FPC 2.0.0 or using C++ code the library
isn't bothered with the div by zero. When I use FPC 2.0.2 however
it is.


Maybe it was FPC 2.0.0 bug (that was fixed in the meantime) that caused this SIGFPE inside qt to be ignored ? AFAIK it was always the intention of FPC that if used library causes a signal like SIGFPE, this signal *will not be ignored* and will cause our program to fail with some exception.

Maybe you can workaround this with Set8087CW, just like it has to be workarounded for OpenGL under Windows (see [http://www.freepascal.org/bugs/showrec.php3?ID=3955]). Just add "Set8087CW($133F);" at the beginning of your program (or even right inside qt unit initialization) and see if it helps.

(Note that I'm writing this without any knowledge of qt or your testcase --- I just thought that it may be helpful, sorry if it's not relevant :) ).

Michalis
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to