Delphi / Object Pascal · Exception

Runtime Error 202: Stack overflow error

What does Runtime Error 202: Stack overflow error mean in Delphi / Object Pascal?

The call stack exceeded its allocated size, almost always from unbounded or runaway recursion.

Runtime Error 202: Stack overflow errorDelphi (VCL) · Delphi (FireMonkey)

Condition

The call stack exceeded its allocated size, almost always from unbounded or runaway recursion.

Fix

Check the recursive function involved for a base case that is not actually being reached, and confirm the recursion depth is bounded by something under the program's control, not by external input.

Pending source verification. Not yet checked against official documentation.

Related exception