до первого setlength идет, а дальше падает...
ошибка якобы в строке юнита System, вызываемого setlength:
Код:
procedure DynArraySetLength(var a: Pointer; typeInfo: Pointer; dimCnt: NativeInt; lengthVec: PNativeint);
var
i,j: NativeInt;
newLength, oldLength, minLength: NativeInt;
elSize: NativeInt;
neededSize: NativeInt;
p, pp: Pointer;
begin
p := a;
// Fetch the new length of the array in this dimension, and the old length
newLength := lengthVec^;
if newLength <= 0 then
begin
if newLength < 0 then
Error(reRangeError);
DynArrayClear(a, typeInfo);
exit;
end;
oldLength := 0;
if p <> nil then
begin
Dec(PByte(p), SizeOf(TDynArrayRec));
oldLength := PDynArrayRec(p).Length;
end;
падает на
oldLength := PDynArrayRec(p).Length; удивляет то что при обращении с другой кнопки работает...