skylot/jadx · error · JadxRuntimeException

Null arg type in {} at: {} in: {}

Error message

Null arg type in {} at: {} in: {}

What it means

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.

Source

Thrown at jadx-core/src/main/java/jadx/core/dex/visitors/MethodInvokeVisitor.java:224

						InsnNode wrapInsn = ((InsnWrapArg) arg).getWrapInsn();
						if (wrapInsn.getType() == InsnType.CHECK_CAST) {
							wrapInsn.add(AFlag.EXPLICIT_CAST);
						}
					}
				}
			}
		}
	}

	private IMethodDetails resolveTypeVars(IMethodDetails mthDetails, Map<ArgType, ArgType> typeVarsMapping) {
		List<ArgType> argTypes = mthDetails.getArgTypes();
		int argsCount = argTypes.size();
		boolean fixed = false;
		List<ArgType> fixedArgTypes = new ArrayList<>(argsCount);
		for (int argNum = 0; argNum < argsCount; argNum++) {
			ArgType argType = argTypes.get(argNum);
			if (argType == null) {
				throw new JadxRuntimeException("Null arg type in " + mthDetails + " at: " + argNum + " in: " + argTypes);
			}
			if (argType.containsTypeVariable()) {
				ArgType resolvedType = root.getTypeUtils().replaceTypeVariablesUsingMap(argType, typeVarsMapping);
				if (resolvedType == null || resolvedType.equals(argType)) {
					// type variables erased from method info by compiler
					resolvedType = mthDetails.getMethodInfo().getArgumentsTypes().get(argNum);
				}
				fixedArgTypes.add(resolvedType);
				fixed = true;
			} else {
				fixedArgTypes.add(argType);
			}
		}
		ArgType returnType = mthDetails.getReturnType();
		if (returnType.containsTypeVariable()) {
			ArgType resolvedType = root.getTypeUtils().replaceTypeVariablesUsingMap(returnType, typeVarsMapping);
			if (resolvedType == null || resolvedType.containsTypeVariable()) {
				returnType = mthDetails.getMethodInfo().getReturnType();

View on GitHub (pinned to e738a26571)

Solutions

  1. Upgrade jadx — method-details construction and type-variable resolution are improved regularly.
  2. Catch JadxRuntimeException per class/method and skip.
  3. Report the issue with the method details and argTypes list from the error message.
  4. Strip the method's Signature attribute before decompiling as a workaround.
Defensive patterns

Strategy: try-catch

Try / catch

try {
    javaClass.decompile();
} catch (JadxRuntimeException e) {
    LOG.warn("Null arg type in invoke resolution for {}: {}", javaClass.getName(), e.getMessage());
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of skylot/jadx@e738a26571 (2026-08-14). Data as JSON: /api/errors/18943950ed48afd2. Report an issue: GitHub.