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: "<T:Ljava/lang/Exception;:Ljava/lang/Object;>"
*/
@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
- Upgrade jadx for the latest parser improvements.
- Catch JadxRuntimeException around per-class decompilation and continue.
- Report the issue with the full signature from the error message.
- 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
- Use the latest jadx release.
- Catch JadxRuntimeException per class to avoid batch failure.
- Report corrupted type-parameter signatures with the debug string.
- Strip the class's Signature attribute if generics info is expendable.
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
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- Bad name for type variable: {}
- No inner type found: {}
- Unexpected inner type found: {}
- Unexpected end of signature
- Can't parse type: {}, unexpected: {}
AI-assisted analysis of skylot/jadx@e738a26571 (2026-08-14).
Data as JSON: /api/errors/a16782256b8b6c66.
Report an issue: GitHub.