On 06/28/2013 11:38 PM, Dave Coventry wrote: > The iScale variable at this point is 1.1394385252832742, so clearly the > debugger is not actually indicating the correct cause of the exception. > > Can anyone offer a way to try to seek out the cause? > 8087 style exceptions are raised on the next floating point instruction for speed optimization. If you want to raise the exception on the correct location you should insert an fwait opcode after every floating point operation which is very expensive. See what happens in the code that is calling the procedure. If any external code is involved, then you could consider masking some floating point exceptions. Freepascal (Delphi compatible) enables all exceptions which is not the default for fe. gcc. Use the SetExceptionMask function in unit mask for that.
For more info see http://www.c-jump.com/CIS77/reference/Intel/CIS77_24319002/pg_0201.htm Ludo -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus