{"record":{"id":"41e7df8b671dccb7","repo":"skylot/jadx","slug":"unknown-container-type","errorCode":null,"errorMessage":"Unknown container type: {}","messagePattern":"Unknown container type: (.+?)","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"error","filePath":"jadx-core/src/main/java/jadx/core/utils/RegionUtils.java","lineNumber":60,"sourceCode":"\n\tpublic static boolean hasExitEdge(IContainer container) {\n\t\tif (container instanceof IBlock) {\n\t\t\treturn BlockUtils.containsExitInsn((IBlock) container);\n\t\t}\n\t\tif (container instanceof IBranchRegion) {\n\t\t\t// all branches must have exit edge\n\t\t\tfor (IContainer br : ((IBranchRegion) container).getBranches()) {\n\t\t\t\tif (br == null || !hasExitEdge(br)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\tif (container instanceof IRegion) {\n\t\t\tIContainer last = Utils.last(((IRegion) container).getSubBlocks());\n\t\t\treturn last != null && hasExitEdge(last);\n\t\t}\n\t\tthrow new JadxRuntimeException(unknownContainerType(container));\n\t}\n\n\t@Nullable\n\tpublic static InsnNode getFirstInsn(IContainer container) {\n\t\tif (container instanceof IBlock) {\n\t\t\tIBlock block = (IBlock) container;\n\t\t\tList<InsnNode> insnList = block.getInstructions();\n\t\t\tif (insnList.isEmpty()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn insnList.get(0);\n\t\t} else if (container instanceof IBranchRegion) {\n\t\t\treturn null;\n\t\t} else if (container instanceof IRegion) {\n\t\t\tIRegion region = (IRegion) container;\n\t\t\tList<IContainer> blocks = region.getSubBlocks();\n\t\t\tif (blocks.isEmpty()) {\n\t\t\t\treturn null;","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/utils/RegionUtils.java#L42-L78","documentation":"RegionUtils.hasExitEdge(IContainer) handles IBlock, IBranchRegion, and IRegion; any other IContainer implementation triggers this. unknownContainerType() formats it as 'Unknown container type: <class>' (or 'Null container variable' for null). This is an internal jadx decompiler invariant: the region graph produced a container node the traversal does not recognize. It indicates a defect in region building or an unusual region subtype, not a user configuration error.","triggerScenarios":"Calling RegionUtils.hasExitEdge(container) on an IContainer that is not IBlock, IBranchRegion, or IRegion (or a null that reached the final throw rather than earlier checks). Encountered during decompilation of a method whose region structure contains an unexpected container type.","commonSituations":"Decompiling heavily obfuscated or malformed DEX bytecode that yields a region tree jadx does not expect; a jadx version regression in a region-building pass; a custom region type introduced by a plugin but not handled by RegionUtils.","solutions":["Report the failing class/method to the jadx issue tracker with the input sample; this is an internal decompiler error.","Upgrade jadx to the latest release (region-handling bugs are fixed frequently).","Skip the failing class via the CLI exclude filter (-e/--single-class on others) to continue decompiling the rest of the APK.","If a plugin introduces a new IContainer subtype, extend RegionUtils or avoid passing it to hasExitEdge."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"// Narrow to handled container types before calling hasExitEdge.\nboolean isHandled = container instanceof IBlock\n    || container instanceof IBranchRegion\n    || container instanceof IRegion;\n// only call when isHandled is true","tryCatchPattern":"try {\n    boolean exit = RegionUtils.hasExitEdge(container);\n} catch (JadxRuntimeException e) {\n    LOG.warn(\"Skipping region, unhandled container type: {}\", container.getClass(), e);\n    // treat as no-exit / skip method\n}","preventionTips":["Treat these as internal jadx defects; report reproducible samples upstream.","Keep jadx updated to pick up region-analysis fixes.","Use exclude/single-class filters to skip problematic classes in batch runs.","Do not pass custom IContainer subtypes to RegionUtils without extending it."],"tags":["jadx","decompiler-internal","region-model","dex"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}