skylot/jadx · error · JadxRuntimeException
Error decode class: {}
Error message
Error decode class: {} What it means
ClassNode.load() wraps its entire class-loading body (fields, methods, attributes, static values, cache build) in a try/catch. ANY exception during class decode is re-thrown as JadxRuntimeException with the class info. This is a fatal-per-class error: the whole ClassNode fails to construct.
Source
Thrown at jadx-core/src/main/java/jadx/core/dex/nodes/ClassNode.java:144
ListConsumer<IFieldData, FieldNode> fieldsConsumer = new ListConsumer<>(fld -> FieldNode.build(this, fld));
ListConsumer<IMethodData, MethodNode> methodsConsumer = new ListConsumer<>(mth -> MethodNode.build(this, mth));
cls.visitFieldsAndMethods(fieldsConsumer, methodsConsumer);
this.fields = fieldsConsumer.getResult();
this.methods = methodsConsumer.getResult();
if (reloading) {
restoreUsageData();
}
initStaticValues(fields);
processAttributes(this);
processSpecialClasses(this);
buildCache();
// TODO: implement module attribute parsing
if (this.accessFlags.isModuleInfo()) {
this.addWarnComment("Modules not supported yet");
}
} catch (Exception e) {
throw new JadxRuntimeException("Error decode class: " + clsInfo, e);
}
}
private void restoreUsageData() {
IUsageInfoData usageInfoData = root.getArgs().getUsageInfoCache().get(root);
if (usageInfoData != null) {
usageInfoData.applyForClass(this);
} else {
LOG.warn("Can't restore usage data for class: {}", this);
}
}
private ArgType checkSuperType(IClassData cls) {
String superType = cls.getSuperType();
if (superType == null) {
if (clsInfo.getType().getObject().equals(Consts.CLASS_OBJECT)) {
// java.lang.Object don't have super class
return null;View on GitHub (pinned to e738a26571)
Solutions
- Upgrade JADX.
- Decompile class-by-class to isolate which class triggers the error.
- Use --show-bad-code and decompile the rest of the APK excluding the failing class.
- Report the class name and full nested stack trace (the cause is chained) upstream.
Defensive patterns
Strategy: try-catch
Try / catch
// When scripting, isolate class decode so one bad class does not abort the batch.
for (JavaClass cls : jadx.getClasses()) {
try {
String code = cls.getCode();
results.put(cls.getFullName(), code);
} catch (JadxRuntimeException e) {
log.error("Class decode failed: {}", cls.getFullName(), e);
results.put(cls.getFullName(), "// DECODE FAILED: " + e.getMessage());
}
} Prevention
- Decompile class-by-class to confine fatal-per-class errors.
- Examine the chained cause (getCause()) to find the real sub-parser failure.
- Keep JADX updated and report unhandled class shapes upstream.
When it happens
Trigger: An exception anywhere in class loading — field/method node construction, attribute processing, static value initialization, or special-class detection (enums, annotations, records).
Common situations: Corrupt class data, missing cross-class references, unsupported attributes, malformed signatures, or an upstream error in any sub-parser. The blast radius is the entire class.
Related errors
- Failed to decode insn: {}
- Unknown instruction: '{}'
- Failed to load method reference for insn: {}
- Failed to get call site for insn: {}
- 'invoke-custom' instruction processing error: {}
AI-assisted analysis of skylot/jadx@e738a26571 (2026-08-14).
Data as JSON: /api/errors/976e0e0b1b859559.
Report an issue: GitHub.