[fpc-devel] MacOSX: EXC_ARITHMETIC in PerformHIConversion

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Aug 15 11:21:48 CEST 2005


On 14 aug 2005, at 17:40, Marc Weustink wrote:

> In XCode i've created a Carbon app with the given in main.c. When  
> running this, everything works as expected. However when I replace  
> Hello.app/Contents/MacOS/Hello with a version created by FPC from  
> hello.pp, I get an exception when I hover with the mouse over the  
> Hello - Services - FileMerge menuitem (this is an empty submenu)
> Now what I don't get is what this has to do with the fpc generated  
> exe. AFAIK this menu is handled by the OS internally.
> Am I missing something ?

There is a bug in the Carbon framework under Mac OS X 10.4.x which  
causes it to generate invalid floating point operation exceptions in  
some cases. You can work around it by disabling these exceptions,  
using the following piece of code (just add it at the start of your  
main program)

   asm
     mtfsfi 6,1
   end;


Jonas




More information about the fpc-devel mailing list