Stack Overflow Triggers: Deep Recursion & Large Locals
The most common causes of stack overflow errors are excessively deep or infinite recursion, where a function repeatedly calls itself without a proper base case, and allocating very large arrays or objects on the stack as local variables.