FabricMC 1.20.xMC 1.21.x

StackOverflowError: DependencyTracker.containsReverseDependency

When two mods that manage resource packs declare themselves as each other's dependencies, the dependency walker recurses until the JVM stack is exhausted. The crash fires on the server thread — often when opening or clicking inside the resource-pack menu — and the trace names DependencyTracker. It looks exotic; the cause is almost always duplicate jars.

Fastest path: paste your crash report into the Crash Doctor — it identifies this pattern and 40+ others automatically. No signup.

How to fix it

  1. 1

    Deduplicate fabric-api and fabric-resource-loader

    Keep exactly one jar of each. A pack that bundles fabric-api plus a standalone copy is the single most common trigger.

  2. 2

    Disable resource-pack-management mods one at a time

    globalpacks, accessories_compat_layer and any mod that ships a bundled compatibility pack are the usual suspects. Disable one, restart, re-test.

  3. 3

    Re-add with the manifest

    Once the server boots, restore mods from the pack manifest rather than by hand — the manifest's versions are the tested combination.

  4. 4

    Report the pair

    If two specific third-party mods circularly declare each other, that is their bug. File it with both authors listing the two mod ids from the trace.

Alternative causes

These can produce the same error message — worth ruling out if the steps above don't resolve it.

A plain mod bug causing StackOverflowError

If the trace does not name DependencyTracker, it is an ordinary infinite recursion — see the general StackOverflowError article for the mod-isolation workflow.

Frequently asked

Why does it crash in the resource-pack menu?

The dependency walk runs when pack selection refreshes. The menu is just where the recursion gets triggered — the cause lives in the mods folder.

Is my world damaged?

No. Nothing world-related was touched. This is purely a mod-loading stack failure.

Want this auto-fixed on your server?

CoalHosting's Minecraft hosting runs the same pattern database against every crash and applies the known fix before your players notice. Free crash diagnosis works on any server, hosted or not.

Related crashes

Last reviewed 2026-09-06. If a step is wrong or out of date, tell us — we'll fix the article and the auto-pattern at the same time.