Closing - despite the error message, this is not a bug in Construct 2. In all programming languages you cannot recurse too deep or you overflow the stack. For example with a value of 1000, you have 1000 simultaneous function calls, which exhausts the memory area reserved for function calls.
This is a problem with recursion in any programming language. The solution is to use a loop instead, which is easy in this case.