Stack overflow mean that you do not end the recursion.
The capacity of the stack for the program is limited.
Every time you recurse,the program will push the data into the stack.
when you've recursed too many levels,the stack will be full and overflow.
There are two possibilities. One is that your program is buggy, which means you didn't put an end condition for the recursion. The other is the problem you are dealing with is way too complex. If it's the latter case, I'd suggest you implement your program in non-recursive manner.