<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>SYSTEM_HAS_FEATURE_MONITOR seems to be on by default - I never
explicitly turned it on, so it probably is the default.</p>
<p>Turning SYSTEM_HAS_FEATURE_MONITOR off may be a good way to show
that this is the problem and a short term workaround, but if you
are providing source code that you expect to be widely used then
you probably need to fix the issue with SYSTEM_HAS_FEATURE_MONITOR
turned on.</p>
<div class="moz-cite-prefix">On 18/02/2026 16:25, Adriaan van Os via
fpc-pascal wrote:<br>
</div>
<blockquote type="cite" cite="mid:6995E807.4070201@adriaan.biz">Tony
Whyman via fpc-pascal wrote:
<br>
<blockquote type="cite" style="color: #007cff;">
<br>
<br>
Supplementing my point below, I went back and checked my notes.
The TObject layout post 3.2 (in my copy of trunk) is now
<br>
<br>
TObject = class
<br>
{$IFDEF SYSTEM_HAS_FEATURE_MONITOR}
<br>
strict private
<br>
_MonitorData : Pointer;
<br>
private
<br>
function SetMonitorData(aData,aCheckOld : Pointer) :
Pointer; inline;
<br>
function GetMonitorData: Pointer; inline;
<br>
{$ENDIF}
<br>
protected
<br>
function GetDisposed : Boolean; inline;
<br>
Property Disposed : Boolean Read GetDisposed;
<br>
public
<br>
<br>
with everything before "public" having been added. The big
change is the addition of "_MonitorData". This bumps the offset
of all later fields up by sizeof(pointer). If you have code that
makes assumptions about the object layout - and this very much
applies to code that tries to import an object from C++ then
your previous assumptions are invalid.
<br>
</blockquote>
<br>
Is SYSTEM_HAS_FEATURE_MONITOR defined by default in the build
process ? I assume, the compiler can be built without it ?
<br>
<br>
Regards,
<br>
<br>
Adriaan van Os
</blockquote>
</body>
</html>