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.
mousePos.x:=X;
mousePos.y:=Y;
xr:=trunc(x/iScale+PanVect.x);
yr:=trunc(y/iScale+PanVect.y);
if middleDown=1 then
begin
SrcRect:=Rect(0,0,ImageWidth,ImageHeight);
dx:=X-MouseClkDn.x;
dy:=Y-MouseClkDn.y;
DestRect:=Rect(dx,dy,ImageWidth+dx,ImageHeight+dy);
Image1.Canvas.CopyRect(DestRect,ImageBuffer.Canvas,SrcRect);
end;
end;
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?
Many thanks,
Dave Coventry
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus