I've implemented negamax search in my chess engine and everything was working fine until I tried implementing quiescence search. When I don't add a depth limit to it I get a stack overflow error. And I'm unable to find the source of the issue, so I would appreciate if anyone good give some feedback. Not necessarily a concrete solution but maybe ways to debug this. All the source code can be found here. And this is the qsearch implementation:
I experienced this problem when i include check moves on quiescence search.as a simple debug technique you may want to try putting depth limit for including checks in quiescence. or exclude them to see if the problem persist