Strange internal error with TBytes helper |
|
I created a helper for TBytes in my unit BSTypes.pas. I don't use it anywhere, but I get a strange
error message at the end of a different unit.
[dcc32 Fatal Error] BSMapLayers.pas(1716): F2084 Internal Error: URW1163
I then comment out the helper code, but before I restart Delphi, I always get another error:
[dcc32 Fatal Error] F2084 Internal Error: AV0B412C83-R244D6C48-0
The strange thing is, I cannot isolate the problem in a sample application. The error only happens
if I add the code in my library.
And something else: If I use TIdBytes, I don't get an error as well.
cu Christian
type
TBSBytesHelper = record helper for TBytes
public
function Count: Integer;
function IsSame(const AOther: TBytes): Boolean;
end;
function TBSBytesHelper.Count: Integer;
begin
Result := Length(Self);
end;
function TBSBytesHelper.IsSame(const AOther: TBytes): Boolean;
var
l1 : Integer;
begin
l1 := Length(Self);
Result := (l1 = Length(AOther));
if Result and (l1 > 0)
then Result := CompareMem(Pointer(Self), Pointer(AOther), l1);
end;
|