[Lazarus] External SigFPE
Dave Coventry
dgcoventry at gmail.com
Fri Jun 28 23:38:03 CEST 2013
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130628/30c8d07c/attachment-0002.html>
More information about the Lazarus
mailing list