skylot/jadx · error · JadxRuntimeException

Failed to parse generic types map

Error message

Failed to parse generic types map

What it means

Thrown by consumeGenericTypeParameters() when parsing the '<...>' block that declares type parameters (e.g. '<T:Ljava/lang/Object;>'). After consuming '<' and the first identifier character, consumeUntil(':') returns null — meaning no ':' boundary was found before the end of the signature. Without a ':' the parser cannot separate the type-variable name from its bound, so it aborts.

Source

Thrown at jadx-core/src/main/java/jadx/core/dex/nodes/parser/SignatureParser.java:289

	/**
	 * Map of generic types names to extends classes.
	 * <p>
	 * Example: "&lt;T:Ljava/lang/Exception;:Ljava/lang/Object;&gt;"
	 */
	@SuppressWarnings("ConditionalBreakInInfiniteLoop")
	public List<ArgType> consumeGenericTypeParameters() {
		if (!lookAhead('<')) {
			return Collections.emptyList();
		}
		List<ArgType> list = new ArrayList<>();
		consume('<');
		while (true) {
			if (lookAhead('>') || next() == STOP_CHAR) {
				break;
			}
			String id = consumeUntil(':');
			if (id == null) {
				throw new JadxRuntimeException("Failed to parse generic types map");
			}
			consume(':');
			tryConsume(':');
			List<ArgType> types = consumeExtendsTypesList();
			list.add(ArgType.genericType(id, types));
		}
		consume('>');
		return list;
	}

	/**
	 * List of types separated by ':' last type is 'java.lang.Object'.
	 * <p/>
	 * Example: "Ljava/lang/Exception;:Ljava/lang/Object;"
	 */
	private List<ArgType> consumeExtendsTypesList() {
		List<ArgType> types = Collections.emptyList();
		boolean next;

View on GitHub (pinned to e738a26571)

Solutions

  1. Upgrade jadx for the latest parser improvements.
  2. Catch JadxRuntimeException around per-class decompilation and continue.
  3. Report the issue with the full signature from the error message.
  4. Strip the class's Signature attribute before decompiling as a workaround.
Defensive patterns

Strategy: try-catch

Try / catch

try {
    javaClass.decompile();
} catch (JadxRuntimeException e) {
    LOG.warn("Generic type-param parse failed in {}: {}", javaClass.getName(), e.getMessage());
}

Prevention

When it happens

Trigger: consumeGenericTypeParameters() enters the loop, consumeUntil(':') scans for ':' but hits STOP_CHAR first (signature ended or is malformed). The signature has a '<' with type-parameter content but no ':' separator, e.g. '<T' with no bound colon.

Common situations: Corrupt or truncated generic type-parameter declarations in Signature attributes, usually from obfuscators or faulty bytecode transformers. A class signature that opens a '<' but never properly delimits type parameters.

Understand the failure class

Related errors


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