Recursion too deep, the stack overflowed

I am working on a scenery and I started to play around with the terraforming using the Rectangle and height map. I initially tried to create a height map with 600x600 points but it seems the SDK will only support 256x256.

I used this and did some terraforming but the issues came when I tried to compile the project. I get the Compiler error seen below.

ERROR: line=90, col=776988, Recursion too deep; the stack overflowed.

Line 90 has the array with all the height map coordinates.

  1. Am I using a heigh t map that is too large?
  2. Is this a bug?

If anyone has any idea, I am willing to try it to fix the issue.