dart · dart/StackOverflowError
StackOverflowError
StackOverflowError
Thrown when the call stack overflows, typically caused by unbounded recursion with no base case.
Also defined in
- java StackOverflowError Thrown when the call stack depth exceeds the JVM limit, almost always caused by unbounded recursion. Increase the stack size with -Xss or fix the recursion.
- julia Stack Overflow The call stack grew too deep, typically due to unbounded or missing-base-case recursion. Add a base case, increase the stack size with JULIA_THREAD_STACK_SIZE, or convert the recursion to an iterative approach.
- kotlin StackOverflowError Thrown when the call stack overflows, most often due to unbounded or mutually recursive function calls with no base case.
- scala StackOverflowError Thrown when the JVM call stack depth is exceeded, almost always due to infinite or excessively deep recursion. Methods annotated with @tailrec are compiled to loops and avoid this; ensure tail-call optimisation is applied for deeply recursive code.