← Back
java.lang.StackOverflowError
COAL-013 · Stack overflow
Something called itself without stopping. How to read the repeating stack trace and find the data pack, script, or mod loop behind it.
What it looks like in the logjava.lang.StackOverflowError: null at com.example.somemod.Handler.process(Handler.java:88) at com.example.somemod.Handler.process(Handler.java:91) at com.example.somemod.Handler.process(Handler.java:91)
What it means
Java ran out of call stack, which in practice always means infinite recursion: something called itself, directly or in a loop, with nothing to end it. The giveaway is the stack trace - the same handful of lines repeat hundreds of times.
How to fix it
- Read the repeating frames. The package name in the loop tells you which mod, data pack, or script owns the bug.
- Data pack functions are a frequent cause: a function that calls itself, or two that call each other, with no condition to stop. Check anything added recently under
datapacks/. - Automation and scripting mods loop the same way when one event triggers another - a block-break handler that breaks a block, for instance.
- Raising
-Xssis not a fix. A deeper stack only delays a genuine infinite loop. Find the recursion instead.

