skylot/jadx · error · JadxRuntimeException

Live variable analysis reach iterations limit, blocks count:

Error message

Live variable analysis reach iterations limit, blocks count: {}

What it means

Thrown by LiveVarAnalysis.processLiveInfo when the backward live-variable dataflow does not converge within blocksCount * 10 iterations. The analysis is a monotone fixed-point computation over a finite lattice, so it mathematically must converge; non-convergence signals either a corrupted/inconsistent CFG (e.g. successor block ids out of range, malformed loop edges) or a jadx bug. Hitting it means liveness used by SSA/phi placement could not be computed for one method.

Source

Thrown at jadx-core/src/main/java/jadx/core/dex/visitors/ssa/LiveVarAnalysis.java:106

		int k = 0;
		do {
			changed = false;
			for (BlockNode block : blocks) {
				int blockId = block.getId();
				BitSet prevIn = liveInBlocks[blockId];
				BitSet newIn = new BitSet(regsCount);
				for (BlockNode successor : block.getSuccessors()) {
					newIn.or(liveInBlocks[successor.getId()]);
				}
				newIn.andNot(defs[blockId]);
				newIn.or(uses[blockId]);
				if (!prevIn.equals(newIn)) {
					changed = true;
					liveInBlocks[blockId] = newIn;
				}
			}
			if (k++ > iterationsLimit) {
				throw new JadxRuntimeException("Live variable analysis reach iterations limit, blocks count: " + blocksCount);
			}
		} while (changed);

		this.liveIn = liveInBlocks;
	}

	private static BitSet[] initBitSetArray(int length, int bitsCount) {
		BitSet[] array = new BitSet[length];
		for (int i = 0; i < length; i++) {
			array[i] = new BitSet(bitsCount);
		}
		return array;
	}
}

View on GitHub (pinned to e738a26571)

Solutions

  1. File a jadx bug with the input sample and the method name; this should never fire on well-formed DEX.
  2. Update to the newest jadx - block-building and SSA passes are constantly hardened.
  3. Skip the failing method/class so the rest of the batch completes.
  4. If embedding jadx, catch JadxRuntimeException per method.
Defensive patterns

Strategy: try-catch

Try / catch

try {
    cls.decompile();
} catch (JadxRuntimeException e) {
    if (e.getMessage().contains("Live variable analysis reach iterations limit")) {
        cls.addError("liveness non-convergence", e);
    } else { throw e; }
}

Prevention

When it happens

Trigger: Running SSATransform or any pass that calls LiveVarAnalysis.runAnalysis on a method whose block graph was built inconsistently (block ids not matching the liveInBlocks array indexing, or a bug in successor linking), so live-in sets keep changing every round past the 10 * block-count cap.

Common situations: Rare; usually seen on hand-edited or post-processed DEX, on outputs of unusual compilers that jadx's block builder mis-handles, or as a secondary effect of a visitor that mutated the CFG without re-indexing blocks. Often indicates a jadx internal bug rather than a problem with your input.

Related errors


AI-assisted analysis of skylot/jadx@e738a26571 (2026-08-14). Data as JSON: /api/errors/fc8ab70ddcbfc3eb. Report an issue: GitHub.