{"record":{"id":"956157c231ecb2e5","repo":"skylot/jadx","slug":"failed-to-parse-type-string","errorCode":null,"errorMessage":"Failed to parse type string: {}","messagePattern":"Failed to parse type string: (.+?)","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"error","filePath":"jadx-core/src/main/java/jadx/core/dex/instructions/args/ArgType.java","lineNumber":744,"sourceCode":"\t\t\tcase FLOAT:\n\t\t\t\treturn FLOAT;\n\t\t\tcase LONG:\n\t\t\t\treturn LONG;\n\t\t\tcase DOUBLE:\n\t\t\t\treturn DOUBLE;\n\t\t\tcase OBJECT:\n\t\t\t\treturn OBJECT;\n\t\t\tcase ARRAY:\n\t\t\t\treturn OBJECT_ARRAY;\n\t\t\tcase VOID:\n\t\t\t\treturn ArgType.VOID;\n\t\t}\n\t\treturn OBJECT;\n\t}\n\n\tpublic static ArgType parse(String type) {\n\t\tif (type == null || type.isEmpty()) {\n\t\t\tthrow new JadxRuntimeException(\"Failed to parse type string: \" + type);\n\t\t}\n\t\tchar f = type.charAt(0);\n\t\tswitch (f) {\n\t\t\tcase 'L':\n\t\t\t\treturn object(type);\n\t\t\tcase 'T':\n\t\t\t\treturn genericType(type.substring(1, type.length() - 1));\n\t\t\tcase '[':\n\t\t\t\treturn array(parse(type.substring(1)));\n\t\t\tdefault:\n\t\t\t\tif (type.length() != 1) {\n\t\t\t\t\tthrow new JadxRuntimeException(\"Unknown type string: \\\"\" + type + '\"');\n\t\t\t\t}\n\t\t\t\treturn parse(f);\n\t\t}\n\t}\n\n\tpublic static ArgType parse(char f) {","sourceCodeStart":726,"sourceCodeEnd":762,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/dex/instructions/args/ArgType.java#L726-L762","documentation":"ArgType.parse(String) received a null or empty type string. A type descriptor must be at least one character, so null/empty is invalid. This is the first guard in the type parser.","triggerScenarios":"Any DEX metadata field (field type, method return type, parameter type, generic signature component) that is null or empty when ArgType.parse is called.","commonSituations":"Corrupt DEX type_id / proto_id / string_id tables, a packer that zeroes out type strings, or a malformed Signature attribute.","solutions":["Upgrade JADX.","Validate the DEX string/type tables with dexdump.","Re-extract the APK cleanly.","Report the class and the null/empty type location upstream."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before decompiling, sanity-check that no type-id string in the DEX is empty.\n// (Use a DEX parser like org.jf.dexlib2 to enumerate typeIds.)\nDexFile dex = DexFileFactory.loadDexFile(file, Opcodes.getDefault());\nfor (TypeIdItem t : dex.getTypeIdItems()) {\n    if (t.getTypeDescriptor() == null || t.getTypeDescriptor().isEmpty()) {\n        throw new IllegalArgumentException(\"DEX contains empty type descriptor at type_id \" + t.getIdx());\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    jadx.load();\n} catch (JadxRuntimeException e) {\n    if (e.getMessage().contains(\"Failed to parse type string\")) {\n        log.warn(\"Empty/null type descriptor in DEX; input may be corrupt\", e);\n    } else throw e;\n}","preventionTips":["Validate DEX type tables for null/empty descriptors before decompiling.","Re-extract APKs from trusted sources.","Keep JADX updated."],"tags":["argtype","type-descriptor","malformed-input"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}