You are not logged in.
mormot.core.collections, line 902
if fDynArray.Info.ArrayRtti is nil then fDynArray.Info.ArrayRtti.Kind will cause exception
I have random errors from that
constructor TIListParent.CreateRtti(aDynArray: TRttiCustom;
aItemTypeInfo: PRttiInfo; aOptions: TListOptions; aSortAs: TRttiParserType);
begin
fDynArray.InitRtti(aDynArray, fValue, @fCount);
aSortAs := fDynArray.SetParserType(aSortAs, // aSortAs=ptNone->RTTI
loCaseInsensitive in fOptions);
if (fDynArray.Info.ArrayRtti = nil) or
(fDynArray.Info.ArrayRtti.Kind <> aItemTypeInfo^.Kind) then
EIList.RaiseUtf8('%.Create<%> (%) does not match % (%)',
[self, aItemTypeInfo^.RawName, ToText(aItemTypeInfo^.Kind)^,
aDynArray.Info^.RawName, ToText(fDynArray.Info.ArrayRtti.Kind)^]);
Offline
@ab, Delphi 11.3 in a Torm class
but:
if (fDynArray.Info.ArrayRtti = nil) or
(fDynArray.Info.ArrayRtti.Kind <> aItemTypeInfo^.Kind) then
EIList.RaiseUtf8('%.Create<%> (%) does not match % (%)',
[self, aItemTypeInfo^.RawName, ToText(aItemTypeInfo^.Kind)^,
aDynArray.Info^.RawName, ToText(fDynArray.Info.ArrayRtti.Kind)^]);
Offline