{"record":{"id":"73c7db09d284959c","repo":"skylot/jadx","slug":"payload-for-fill-array-not-found-at","errorCode":null,"errorMessage":"Payload for fill-array not found at {}","messagePattern":"Payload for fill-array not found at (.+?)","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"error","filePath":"jadx-core/src/main/java/jadx/core/dex/visitors/ProcessInstructionsVisitor.java","lineNumber":112,"sourceCode":"\t\t\t\t\tif (insn.getResult() == null) {\n\t\t\t\t\t\tmergeMoveResult(insnByOffset, offset, insn, ArgType.STRING);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase FILLED_NEW_ARRAY:\n\t\t\t\t\tArgType arrType = ((FilledNewArrayNode) insn).getArrayType();\n\t\t\t\t\tmergeMoveResult(insnByOffset, offset, insn, arrType);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase FILL_ARRAY:\n\t\t\t\t\tFillArrayInsn fillArrayInsn = (FillArrayInsn) insn;\n\t\t\t\t\tint target = fillArrayInsn.getTarget();\n\t\t\t\t\tInsnNode arrDataInsn = getInsnAtOffset(insnByOffset, target);\n\t\t\t\t\tif (arrDataInsn != null && arrDataInsn.getType() == InsnType.FILL_ARRAY_DATA) {\n\t\t\t\t\t\tfillArrayInsn.setArrayData((FillArrayData) arrDataInsn);\n\t\t\t\t\t\tremoveInsn(insnByOffset, arrDataInsn);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new JadxRuntimeException(\"Payload for fill-array not found at \" + InsnUtils.formatOffset(target));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate static void attachSwitchData(InsnNode[] insnByOffset, int offset, SwitchInsn sw) {\n\t\tint nextInsnOffset = getNextInsnOffset(insnByOffset, offset);\n\t\tint dataTarget = sw.getDataTarget();\n\t\tInsnNode switchDataInsn = getInsnAtOffset(insnByOffset, dataTarget);\n\t\tif (switchDataInsn != null && switchDataInsn.getType() == InsnType.SWITCH_DATA) {\n\t\t\tSwitchData data = (SwitchData) switchDataInsn;\n\t\t\tdata.fixTargets(offset);\n\t\t\tsw.attachSwitchData(data, nextInsnOffset);\n\t\t\tremoveInsn(insnByOffset, switchDataInsn);","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/dex/visitors/ProcessInstructionsVisitor.java#L94-L130","documentation":"Thrown during instruction post-processing when a FILL_ARRAY instruction references a payload instruction at a specific code offset, but no FILL_ARRAY_DATA instruction exists at that offset. In Dalvik bytecode, fill-array-data instructions are followed by a data payload at a nearby offset; if that payload is missing or relocated, the instruction stream is malformed.","triggerScenarios":"A FillArrayInsn.getTarget() returns an offset where insnByOffset[offset] is either null or not of type InsnType.FILL_ARRAY_DATA. The payload was stripped, moved, or never generated by the DEX producer.","commonSituations":"Aggressive obfuscators (e.g., DEX-level packers) that split or relocate array-data payloads away from their fill-array instructions; DEX files produced by non-standard or experimental compilers; corrupted or truncated DEX sections.","solutions":["Verify the DEX file integrity with tools like dexdump or baksmali before decompiling","Update jadx — new versions add resilience to malformed instruction streams","Report the APK as a jadx issue with the method offset for investigation","Try unpacking the APK with a generic unpacker first if a packer/protector is suspected"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Validate DEX file integrity before decompiling\ntry {\n    com.android.tools.smali.dexlib2.DexFileFactory.loadDexFile(apkFile, null);\n} catch (Exception e) {\n    throw new IllegalArgumentException(\"Invalid or corrupted DEX file\", e);\n}","typeGuard":null,"tryCatchPattern":"try {\n    jadxDecompiler.load();\n    jadxDecompiler.save();\n} catch (JadxRuntimeException e) {\n    if (e.getMessage().contains(\"Payload for fill-array not found\")) {\n        LOG.warn(\"Malformed fill-array payload in input, trying fallback mode\");\n        args.setFallbackMode(true);\n        // Re-run with fallback for affected classes\n    }\n}","preventionTips":["Verify DEX file integrity with dexdump or baksmali before decompiling","Unpack protected/packed APKs before decompiling to get the original DEX","Keep jadx updated — instruction processing resilience improves each release"],"tags":["bytecode","instruction-processing","array-data","obfuscation","decompiler"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}