{"record":{"id":"976e0e0b1b859559","repo":"skylot/jadx","slug":"error-decode-class","errorCode":null,"errorMessage":"Error decode class: {}","messagePattern":"Error decode class: (.+?)","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"error","filePath":"jadx-core/src/main/java/jadx/core/dex/nodes/ClassNode.java","lineNumber":144,"sourceCode":"\t\t\tListConsumer<IFieldData, FieldNode> fieldsConsumer = new ListConsumer<>(fld -> FieldNode.build(this, fld));\n\t\t\tListConsumer<IMethodData, MethodNode> methodsConsumer = new ListConsumer<>(mth -> MethodNode.build(this, mth));\n\t\t\tcls.visitFieldsAndMethods(fieldsConsumer, methodsConsumer);\n\t\t\tthis.fields = fieldsConsumer.getResult();\n\t\t\tthis.methods = methodsConsumer.getResult();\n\t\t\tif (reloading) {\n\t\t\t\trestoreUsageData();\n\t\t\t}\n\t\t\tinitStaticValues(fields);\n\t\t\tprocessAttributes(this);\n\t\t\tprocessSpecialClasses(this);\n\t\t\tbuildCache();\n\n\t\t\t// TODO: implement module attribute parsing\n\t\t\tif (this.accessFlags.isModuleInfo()) {\n\t\t\t\tthis.addWarnComment(\"Modules not supported yet\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new JadxRuntimeException(\"Error decode class: \" + clsInfo, e);\n\t\t}\n\t}\n\n\tprivate void restoreUsageData() {\n\t\tIUsageInfoData usageInfoData = root.getArgs().getUsageInfoCache().get(root);\n\t\tif (usageInfoData != null) {\n\t\t\tusageInfoData.applyForClass(this);\n\t\t} else {\n\t\t\tLOG.warn(\"Can't restore usage data for class: {}\", this);\n\t\t}\n\t}\n\n\tprivate ArgType checkSuperType(IClassData cls) {\n\t\tString superType = cls.getSuperType();\n\t\tif (superType == null) {\n\t\t\tif (clsInfo.getType().getObject().equals(Consts.CLASS_OBJECT)) {\n\t\t\t\t// java.lang.Object don't have super class\n\t\t\t\treturn null;","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/dex/nodes/ClassNode.java#L126-L162","documentation":"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.","triggerScenarios":"An exception anywhere in class loading — field/method node construction, attribute processing, static value initialization, or special-class detection (enums, annotations, records).","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// When scripting, isolate class decode so one bad class does not abort the batch.\nfor (JavaClass cls : jadx.getClasses()) {\n    try {\n        String code = cls.getCode();\n        results.put(cls.getFullName(), code);\n    } catch (JadxRuntimeException e) {\n        log.error(\"Class decode failed: {}\", cls.getFullName(), e);\n        results.put(cls.getFullName(), \"// DECODE FAILED: \" + e.getMessage());\n    }\n}","preventionTips":["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."],"tags":["class-decode","fatal-per-class","malformed-input"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}