skylot/jadx · error · JadxRuntimeException

Failed to parse type string: {}

Error message

Failed to parse type string: {}

What it means

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.

Source

Thrown at jadx-core/src/main/java/jadx/core/dex/instructions/args/ArgType.java:744

			case FLOAT:
				return FLOAT;
			case LONG:
				return LONG;
			case DOUBLE:
				return DOUBLE;
			case OBJECT:
				return OBJECT;
			case ARRAY:
				return OBJECT_ARRAY;
			case VOID:
				return ArgType.VOID;
		}
		return OBJECT;
	}

	public static ArgType parse(String type) {
		if (type == null || type.isEmpty()) {
			throw new JadxRuntimeException("Failed to parse type string: " + type);
		}
		char f = type.charAt(0);
		switch (f) {
			case 'L':
				return object(type);
			case 'T':
				return genericType(type.substring(1, type.length() - 1));
			case '[':
				return array(parse(type.substring(1)));
			default:
				if (type.length() != 1) {
					throw new JadxRuntimeException("Unknown type string: \"" + type + '"');
				}
				return parse(f);
		}
	}

	public static ArgType parse(char f) {

View on GitHub (pinned to e738a26571)

Solutions

  1. Upgrade JADX.
  2. Validate the DEX string/type tables with dexdump.
  3. Re-extract the APK cleanly.
  4. Report the class and the null/empty type location upstream.
Defensive patterns

Strategy: validation

Validate before calling

// Before decompiling, sanity-check that no type-id string in the DEX is empty.
// (Use a DEX parser like org.jf.dexlib2 to enumerate typeIds.)
DexFile dex = DexFileFactory.loadDexFile(file, Opcodes.getDefault());
for (TypeIdItem t : dex.getTypeIdItems()) {
    if (t.getTypeDescriptor() == null || t.getTypeDescriptor().isEmpty()) {
        throw new IllegalArgumentException("DEX contains empty type descriptor at type_id " + t.getIdx());
    }
}

Try / catch

try {
    jadx.load();
} catch (JadxRuntimeException e) {
    if (e.getMessage().contains("Failed to parse type string")) {
        log.warn("Empty/null type descriptor in DEX; input may be corrupt", e);
    } else throw e;
}

Prevention

When it happens

Trigger: Any DEX metadata field (field type, method return type, parameter type, generic signature component) that is null or empty when ArgType.parse is called.

Common situations: Corrupt DEX type_id / proto_id / string_id tables, a packer that zeroes out type strings, or a malformed Signature attribute.

Understand the failure class

Related errors


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