{"record":{"id":"18943950ed48afd2","repo":"skylot/jadx","slug":"null-arg-type-in-at-in","errorCode":null,"errorMessage":"Null arg type in {} at: {} in: {}","messagePattern":"Null arg type in (.+?) at: (.+?) in: (.+?)","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"error","filePath":"jadx-core/src/main/java/jadx/core/dex/visitors/MethodInvokeVisitor.java","lineNumber":224,"sourceCode":"\t\t\t\t\t\tInsnNode wrapInsn = ((InsnWrapArg) arg).getWrapInsn();\n\t\t\t\t\t\tif (wrapInsn.getType() == InsnType.CHECK_CAST) {\n\t\t\t\t\t\t\twrapInsn.add(AFlag.EXPLICIT_CAST);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate IMethodDetails resolveTypeVars(IMethodDetails mthDetails, Map<ArgType, ArgType> typeVarsMapping) {\n\t\tList<ArgType> argTypes = mthDetails.getArgTypes();\n\t\tint argsCount = argTypes.size();\n\t\tboolean fixed = false;\n\t\tList<ArgType> fixedArgTypes = new ArrayList<>(argsCount);\n\t\tfor (int argNum = 0; argNum < argsCount; argNum++) {\n\t\t\tArgType argType = argTypes.get(argNum);\n\t\t\tif (argType == null) {\n\t\t\t\tthrow new JadxRuntimeException(\"Null arg type in \" + mthDetails + \" at: \" + argNum + \" in: \" + argTypes);\n\t\t\t}\n\t\t\tif (argType.containsTypeVariable()) {\n\t\t\t\tArgType resolvedType = root.getTypeUtils().replaceTypeVariablesUsingMap(argType, typeVarsMapping);\n\t\t\t\tif (resolvedType == null || resolvedType.equals(argType)) {\n\t\t\t\t\t// type variables erased from method info by compiler\n\t\t\t\t\tresolvedType = mthDetails.getMethodInfo().getArgumentsTypes().get(argNum);\n\t\t\t\t}\n\t\t\t\tfixedArgTypes.add(resolvedType);\n\t\t\t\tfixed = true;\n\t\t\t} else {\n\t\t\t\tfixedArgTypes.add(argType);\n\t\t\t}\n\t\t}\n\t\tArgType returnType = mthDetails.getReturnType();\n\t\tif (returnType.containsTypeVariable()) {\n\t\t\tArgType resolvedType = root.getTypeUtils().replaceTypeVariablesUsingMap(returnType, typeVarsMapping);\n\t\t\tif (resolvedType == null || resolvedType.containsTypeVariable()) {\n\t\t\t\treturnType = mthDetails.getMethodInfo().getReturnType();","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/dex/visitors/MethodInvokeVisitor.java#L206-L242","documentation":"Thrown by MethodInvokeVisitor.resolveTypeVars() when iterating a method's argument type list and encountering a null entry. The argTypes list (from IMethodDetails) should be fully populated; a null element indicates the method details were built with incomplete or corrupt type information, making type-variable resolution impossible.","triggerScenarios":"resolveTypeVars() loops over mthDetails.getArgTypes(), and for some argNum, argTypes.get(argNum) is null. This means the method details object has a gap in its argument type array — likely from a method signature with fewer types than expected, or a partially-constructed MethodDetails.","commonSituations":"Methods with complex generic signatures where type information could not be fully resolved during earlier passes. Also possible with obfuscated methods whose Signature attribute and descriptor disagree, leaving holes in the argTypes list.","solutions":["Upgrade jadx — method-details construction and type-variable resolution are improved regularly.","Catch JadxRuntimeException per class/method and skip.","Report the issue with the method details and argTypes list from the error message.","Strip the method's Signature attribute before decompiling as a workaround."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    javaClass.decompile();\n} catch (JadxRuntimeException e) {\n    LOG.warn(\"Null arg type in invoke resolution for {}: {}\", javaClass.getName(), e.getMessage());\n}","preventionTips":["Upgrade jadx for method-details and type-variable resolution fixes.","Catch per class to continue decompilation.","Report the method details and argTypes list from the error message.","Strip Signature attributes from affected methods if generics info is expendable."],"tags":["jadx","decompiler","method-invoke","type-variable","generics","null-check"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}