Delphi / Object Pascal · Exception

Runtime Error 210: Object not initialized

What does Runtime Error 210: Object not initialized mean in Delphi / Object Pascal?

An object was used before its constructor ran, or a virtual method was called during construction before the part of the object that implements it was ready.

Runtime Error 210: Object not initializedDelphi (VCL) · Delphi (FireMonkey)

Condition

An object was used before its constructor ran, or a virtual method was called during construction before the part of the object that implements it was ready.

Fix

Check for a call to a virtual method from inside a constructor, which can dispatch to a descendant class's override before that descendant's own fields are initialized.

Pending source verification. Not yet checked against official documentation.

Related exception