Icon View Incident Report

Serious Serious
Reported By: Ralf Mimoun
Reported On: 8/19/2022
For: Version 3.02 Build 7
# 4899 Intrinsic VarType Function Not Handling Null Object References Properly

In a largeish app, I get "Right-hand side InstanceOf is not callable" errors as soon as I call LocationServices.StartTrackingLocation via ApplicationError.

The error is caused by "procedure TLocation.Update(position: TPosition);" in WebComps. More exactly: The "VarType(altitude)" call (and probably all other VarType calls in that method) leads to that error when altitude is nil.

I added a small function (below) and use that instead of "VarType(altitude) <> VARTYPE_INSTANCE" etc. No idea if this a valid fix or just a patch. Maybe there is an issue in VarType.

function CheckVariantIsAssignedAndNotInstance(Value: Variant): boolean;
begin
  Result := False;
  if Value <> nil then begin
    Result := VarType(Value) <> VARTYPE_INSTANCE;
  end;
end;



Resolution Resolution
Fixed Problem on 8/23/2022 in version 3.02 build 8


Products Affected Products Affected
Elevate Web Builder
Elevate Web Builder Trial

Image