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?


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to