Known issue in ROD RTM 9.6.112.1413

RTTI support was broken in Delphi Tokyo 10.2 for Linux plaftorm.

Simple testcase that illustrates this issue:

code
program Project1;

{$APPTYPE CONSOLE}
{$R *.res}

uses
  System.RTTI,
  System.SysUtils;

type
  TMyAttribute = class(TCustomAttribute)
  end;

var
  g_ctx: TRttiContext;
  obj: TRTTIType;
  p: TCustomAttribute;
  a:TMyAttribute;
begin
  try
    g_ctx := TRttiContext.Create;
    try
      for obj in g_ctx.GetTypes do begin
        a := nil;
        for p in obj.GetAttributes() do
          if p is TMyAttribute then begin
            a := TMyAttribute(p);
            break;
          end;
        if a <> nil then begin
          Writeln(obj.QualifiedName+ ': detected');
        end;
      end;
    finally
      g_ctx.Free;
    end;
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
end.

as a result, RO/DA servers will fail with Segmentation fault (11) error during generation of RODL.

workarounds:

  • for RODL-based servers: disable {$DEFINE RO_RTTI_Support} condition in RemObjects.inc and DataAbstract.inc
  • disable request of RODL via server properties (ServeRodl and ServeInfoPage)
  • switch to Delphi 10.3.1 Rio, where this issue isn’t reproduced