Показать сообщение отдельно
  #3  
Старый 21.11.2013, 18:14
mustimur mustimur вне форума
Прохожий
 
Регистрация: 20.11.2013
Сообщения: 17
Версия Delphi: Delphi xe4
Репутация: 10
По умолчанию

до первого 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; удивляет то что при обращении с другой кнопки работает...
Ответить с цитированием