Array index values and field overlays are the possible source of uncontrolled program crashes (i.e. not handled by standard Visual LANSA error handling).
On the IBM i, LANSA generates RPG code that is translated into an intermediate machine language. The intermediate machine language actually implements high speed array index boundary checking (at run time).
Visual LANSA, however, generates C code and C compilers do not typically generate array index boundary checking.
If you get this type of error, run the function again using the Visual LANSA debugger in animate mode until the point of failure. At this point, use the Show Fields pull down option and check that all array indexes are valid.