[Lazarus] External SigFPE

Martin lazarus at mfriebe.de
Sat Jun 29 01:01:01 CEST 2013


On 28/06/2013 22:38, Dave Coventry wrote:
> I have a Procedure as follows.
>
> procedure TForm_DB.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
>   Y: Integer);
> var
>   xr,yr: Real;
>   dx,dy: integer;
>   SrcRect,DestRect: TRect;
> begin
>   if iScale=0 then exit;<- External SigFPE occurs here.
...
> Mostly it works as expected.
>
> However, after some reasonably complex computing, mostly involving 
> TStringLists, it throws up an error:
>
> "Project project1 raised exception class 'External SigFPE'
> in file 'unit5.pas' at line 435:
>  if iScale=0 then exit;"
>
> 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?
>

Maybe memory got corrupted at some point  before, then errors can happen 
at seemingly random locations.

Check your dbg setup http://wiki.lazarus.freepascal.org/Debugger_Setup

use all avaailable compiler checks
-Criot
-gh (heaptrace/linking)
-gt


What does the stack window show?





More information about the Lazarus mailing list