StackOverflowError
Infinite recursion in a plugin or mod: what it looks like, what most often causes it, and why the server crashes after it.
Updated August 13, 2026
java.lang.StackOverflowError
at com.example.plugin.Handler.process(Handler.java:88)
at com.example.plugin.Handler.process(Handler.java:92)
at com.example.plugin.Handler.process(Handler.java:88)
...
Repeating identical lines in the stack are a sign of infinite recursion: the code calls itself until the stack runs out.
Common causes
| Situation | Example |
|---|---|
| Plugins that trigger each other's events | Plugin A catches an event and calls an action that fires the same event |
| A chat plugin that processes its own output | Message → filter → message |
| Scripts — Skript | An event calls a command that calls the event |
| Custom recipes and items | A craft that produces a craft |
What to do
- Find the top class in the stack — that's the culprit.
- If it's a pair of plugins, remove one and test.
- In scripts, look for a loop: it's usually obvious once you know where to look.
After the error
The thread where it happened terminates. If that's the main thread, the server crashes or freezes. A restart is mandatory: you can't keep running after a StackOverflow — Server crashed.
Minecraft hostingYour server runs while you are offlineCreate server
