I am getting an exception with the message "External: STACK OVERFLOW" in file uCommon.pas at line 238. begin"
When I click on OK, line 238 is indeed the "begin" of an initialisation procedure; which contains a number of calls to default(), which initialise various arrays in the program.
Recently, I've been reworking how I calculate the distance from a point to other positions on a game board / map.
Interestingly, the exception is occuring at the beginning of the procedure, not at one of the default() calls.
procedure GameInitialisation;
var
a : integer;
begin
debugform.AddMessage('begin GameInitialisation');
GameBoard := default(TGameBoard);
debugform.AddMessage(' a');
CityList := default(TCityList);
debugform.AddMessage(' b');
...
The program is not displaying the "begin ..." message.
Any help / suggestions would be very welcome. I am thinking that the distance data is making the GameBoard variable too large...?
cheers
S.