[Lazarus] EXC_BAD_ACCESS, Could not access memory

Bart bartjunk64 at gmail.com
Thu Apr 23 17:19:33 CEST 2009


This code works perfectly fine (at least it does not crash) with fpc 2.2.2

constructor TMyObject.Create;
begin
  DebugLn('Create');
  FItem := nil;
  DebugLn('nil');
  SetLength(FItem,3);
  DebugLn('SetLength');
  FItem[0].First:= 1.0;
  DebugLn('FItem[0].First = ',DbgS(FItem[0].First));
end;

Bart



More information about the Lazarus mailing list