{"record":{"id":"0b4f30d1b4e2f49d","repo":"skylot/jadx","slug":"unreachable-block","errorCode":null,"errorMessage":"Unreachable block: {}","messagePattern":"Unreachable block: (.+?)","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"error","filePath":"jadx-core/src/main/java/jadx/core/dex/visitors/blocks/BlockProcessor.java","lineNumber":143,"sourceCode":"\tstatic void updateCleanSuccessors(MethodNode mth) {\n\t\tmth.getBasicBlocks().forEach(BlockNode::updateCleanSuccessors);\n\t}\n\n\tprivate static void checkForUnreachableBlocks(MethodNode mth) {\n\t\twhile (true) {\n\t\t\tboolean fixed = false;\n\t\t\tfor (BlockNode block : mth.getBasicBlocks()) {\n\t\t\t\tif (block.getPredecessors().isEmpty() && block != mth.getEnterBlock()) {\n\t\t\t\t\t// Sometimes a split cross block will have all it's predecessors moved elsewhere after it's been\n\t\t\t\t\t// created. This is usually detected at the time of it's creation, but in certain edge cases it\n\t\t\t\t\t// is difficult to do so. In those cases it will be cleanly removed here, along with the associated\n\t\t\t\t\t// bottom splitter.\n\t\t\t\t\tif (block.contains(AType.EXC_SPLIT_CROSS) && fixUnreachableSplitCross(mth, block)) {\n\t\t\t\t\t\tmth.addInfoComment(\"Removed unreachable split cross block \" + block);\n\t\t\t\t\t\tfixed = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthrow new JadxRuntimeException(\"Unreachable block: \" + block);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!fixed) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Attempts to remove an unreachable synthetic split cross block that has been added previously,\n\t * along with the associated bottom splitter.\n\t *\n\t * @param mth        the method containing the unreachable block\n\t * @param splitCross the unreachable block\n\t * @return true if the operation was successful, false if a precondition was not satisfied and no\n\t *         changes were made.\n\t */\n\tprivate static boolean fixUnreachableSplitCross(MethodNode mth, BlockNode splitCross) {","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/dex/visitors/blocks/BlockProcessor.java#L125-L161","documentation":"Thrown during block processing when a basic block has no predecessors and is not the method entry block. Jadx first attempts to explain it as a known synthetic pattern (EXC_SPLIT_CROSS), but if that fix doesn't apply, the block is genuinely orphaned and the CFG is inconsistent.","triggerScenarios":"After block splitting and initial processing, a BlockNode with empty predecessors and != enterBlock survives. fixUnreachableSplitCross returns false, meaning the block is not a removable synthetic split-cross artifact.","commonSituations":"Bugs in block-splitting or block-processing passes that leave orphaned blocks; unusual branch or jump patterns from obfuscators that create unreachable code islands; dead code not properly removed by earlier cleanup passes.","solutions":["Update jadx — unreachable block handling is frequently patched","Report the failing method and APK as a jadx issue","Try with different deobfuscation settings that may affect block structure","Decompile the class individually to isolate which method triggers it"],"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(\"Unreachable block\")) {\n        LOG.warn(\"Unreachable block in CFG, skipping class\");\n        for (ClassNode cls : jadxDecompiler.getClasses()) {\n            try {\n                jadxDecompiler.decompileClass(cls);\n            } catch (JadxRuntimeException ex) {\n                LOG.warn(\"Skipped: {}\", cls.getFullName());\n            }\n        }\n    } else {\n        throw e;\n    }\n}","preventionTips":["Keep jadx updated — unreachable block handling is frequently patched","Report the APK as a jadx issue","Decompile classes individually to isolate the problematic method","Try different deobfuscation settings that may affect block structure"],"tags":["block-processing","unreachable-code","control-flow","decompiler"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}