{"record":{"id":"7455e0350ff5b07e","repo":"skylot/jadx","slug":"unexpected-type","errorCode":null,"errorMessage":"Unexpected type: {}","messagePattern":"Unexpected type: (.+?)","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"error","filePath":"jadx-gui/src/main/java/jadx/gui/device/debugger/DebugController.java","lineNumber":247,"sourceCode":"\t\tif (type == ArgType.INT) {\n\t\t\treturn RuntimeType.INT;\n\t\t}\n\t\tif (type == ArgType.STRING) {\n\t\t\treturn RuntimeType.STRING;\n\t\t}\n\t\tif (type == ArgType.LONG) {\n\t\t\treturn RuntimeType.LONG;\n\t\t}\n\t\tif (type == ArgType.FLOAT) {\n\t\t\treturn RuntimeType.FLOAT;\n\t\t}\n\t\tif (type == ArgType.DOUBLE) {\n\t\t\treturn RuntimeType.DOUBLE;\n\t\t}\n\t\tif (type == ArgType.OBJECT) {\n\t\t\treturn RuntimeType.OBJECT;\n\t\t}\n\t\tthrow new JadxRuntimeException(\"Unexpected type: \" + type);\n\t}\n\n\tprotected static RuntimeType castType(String type) {\n\t\tRuntimeType rt = null;\n\t\tif (!StringUtils.isEmpty(type)) {\n\t\t\trt = TYPE_MAP.get(type);\n\t\t}\n\t\tif (rt == null) {\n\t\t\trt = POSSIBLE_TYPES[0];\n\t\t}\n\t\treturn rt;\n\t}\n\n\tprivate void checkType(ArgType type, Object value) {\n\t\tif (!(type == ArgType.INT && value instanceof Integer)\n\t\t\t\t&& !(type == ArgType.STRING && value instanceof String)\n\t\t\t\t&& !(type == ArgType.LONG && value instanceof Long)\n\t\t\t\t&& !(type == ArgType.FLOAT && value instanceof Float)","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-gui/src/main/java/jadx/gui/device/debugger/DebugController.java#L229-L265","documentation":"Error \"Unexpected type: {}\" thrown in skylot/jadx.","triggerScenarios":"Thrown at jadx-gui/src/main/java/jadx/gui/device/debugger/DebugController.java:247 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Guard the type dispatch with an explicit default branch that throws a descriptive exception including the offending type value.","Restrict inputs to the RuntimeType enum values actually supported by the debugger before reaching this switch."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}