Addition of new column to definition of structure generate range error

#1

If I add a new column to the structure definition, the forms (schemas) and the server events will crash with a range error. Only the restart of the processes (HI or EVH) will help. Here is the example with this error generated from ESL.

//BEGIN EVENT//

RECORD NOALIAS (SD.TestStructure) _globalValues

RPC PROCEDURE CopyData (RECORD NOALIAS (SD.TestStructure) _localValues)
REDIM globalValues[localValues\DIM]
SET globalValues WITH localValues
END CopyData

//END EVENT//

Is it D2000 bug? Or have you any workarround for this situation?
I use D2000 V11.2 R57

#2

A possible solution would be to save the offending server event - without restarting the whole event handler process (event.exe). As you can see, there is a definition of local variable _globalValues:

RECORD NOALIAS (SD.TestStructure) _globalValues

when later a definition of SD.TestStructure is changed (adding new columns), then the script will crash on line
SET globalValues WITH localValues
as sizes of structures do not match.

Generally speaking; adding columns to a structure may be a risky operation as long as scripts are concerned and this operation can result in similar problems.