{"record":{"id":"f4aa9e20e45c6446","repo":"skylot/jadx","slug":"missing-block","errorCode":null,"errorMessage":"Missing block: {}","messagePattern":"Missing block: (.+?)","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"error","filePath":"jadx-core/src/main/java/jadx/core/dex/visitors/blocks/BlockSplitter.java","lineNumber":334,"sourceCode":"\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate static boolean isDoWhile(Map<Integer, BlockNode> blocksMap, BlockNode curBlock, InsnNode insn) {\n\t\t// split 'do-while' block (last instruction: 'if', target this block)\n\t\tif (insn.getType() != InsnType.IF) {\n\t\t\treturn false;\n\t\t}\n\t\tIfNode ifs = (IfNode) insn;\n\t\tBlockNode targetBlock = blocksMap.get(ifs.getTarget());\n\t\treturn targetBlock == curBlock;\n\t}\n\n\tprivate static BlockNode getBlock(int offset, Map<Integer, BlockNode> blocksMap) {\n\t\tBlockNode block = blocksMap.get(offset);\n\t\tif (block == null) {\n\t\t\tthrow new JadxRuntimeException(\"Missing block: \" + offset);\n\t\t}\n\t\treturn block;\n\t}\n\n\tprivate static void expandMoveMulti(MethodNode mth) {\n\t\tfor (BlockNode block : mth.getBasicBlocks()) {\n\t\t\tList<InsnNode> insnsList = block.getInstructions();\n\t\t\tint len = insnsList.size();\n\t\t\tfor (int i = 0; i < len; i++) {\n\t\t\t\tInsnNode insn = insnsList.get(i);\n\t\t\t\tif (insn.getType() == InsnType.MOVE_MULTI) {\n\t\t\t\t\tint mvCount = insn.getArgsCount() / 2;\n\t\t\t\t\tfor (int j = 0; j < mvCount; j++) {\n\t\t\t\t\t\tInsnNode mv = new InsnNode(InsnType.MOVE, 1);\n\t\t\t\t\t\tint startArg = j * 2;\n\t\t\t\t\t\tmv.setResult((RegisterArg) insn.getArg(startArg));\n\t\t\t\t\t\tmv.addArg(insn.getArg(startArg + 1));\n\t\t\t\t\t\tmv.copyAttributesFrom(insn);","sourceCodeStart":316,"sourceCodeEnd":352,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/dex/visitors/blocks/BlockSplitter.java#L316-L352","documentation":"Thrown by the getBlock helper when looking up a block by code offset in the blocksMap. Every jump target, switch case, and exception handler offset must correspond to a block start. If an offset has no entry in the map, block splitting failed to create a block boundary at that offset.","triggerScenarios":"A code offset (jump target, handler offset, or data target) passed to getBlock has no corresponding BlockNode in blocksMap. The block splitter did not register a block at that instruction boundary.","commonSituations":"Misaligned instruction boundaries from obfuscation; DEX files with unusual instruction alignments; bugs in the block splitting pass where a target offset falls in the middle of an instruction or at an unsplit boundary.","solutions":["Update jadx — block splitting logic is actively maintained","Report the APK and the failing offset as a jadx issue","Verify instruction boundaries with baksmali to confirm the offset is valid","Try decompiling with --fallback mode for raw output on the problem class"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    jadxDecompiler.load();\n    jadxDecompiler.save();\n} catch (JadxRuntimeException e) {\n    if (e.getMessage().contains(\"Missing block\")) {\n        LOG.warn(\"Block offset resolution failure, trying fallback mode\");\n        args.setFallbackMode(true);\n        jadxDecompiler = new JadxDecompiler(args);\n        jadxDecompiler.load();\n        jadxDecompiler.save();\n    } else {\n        throw e;\n    }\n}","preventionTips":["Verify instruction boundaries with baksmali/dexdump before decompiling","Keep jadx updated — block splitting is actively maintained","Try --fallback mode for raw output on problematic classes","Report the APK as a jadx issue with the failing offset"],"tags":["block-splitter","offset-resolution","control-flow","decompiler"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}