{"record":{"id":"2ac2179a1593dd93","repo":"NationalSecurityAgency/ghidra","slug":"error-2ac217","errorCode":null,"errorMessage":"{}","messagePattern":"\\{\\}","errorType":"exception","errorClass":"MalformedURLException","httpStatus":null,"severity":"error","filePath":"Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java","lineNumber":271,"sourceCode":"\t\tif (ghidraURLString != null) {\n\t\t\tsetupGhidraURL(ghidraURLString);\n\t\t}\n\n\t\tif (bsimURLString != null) {\n\t\t\tbsimURL = BSimClientFactory.deriveBSimURL(bsimURLString);\n\t\t\tif (ghidraURL == null) {\n\t\t\t\tif (\"file\".equals(bsimURL.getProtocol())) {\n\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\"Unable to infer ghidra URL from BSim file DB URL\");\n\t\t\t\t}\n\n\t\t\t\t// Derive Ghidra URL from BSim DB host and dbName\n\t\t\t\tString path = bsimURL.getPath();\n\t\t\t\ttry {\n\t\t\t\t\tpath = URLDecoder.decode(path, \"UTF-8\");\n\t\t\t\t}\n\t\t\t\tcatch (UnsupportedEncodingException e) {\n\t\t\t\t\tthrow new MalformedURLException(e.getMessage());\n\t\t\t\t}\n\t\t\t\tString dbName = path.substring(path.lastIndexOf('/') + 1);\n\n\t\t\t\tghidraURL = GhidraURL.makeURL(bsimURL.getHost(), -1, dbName);\n\t\t\t}\n\t\t}\n\t\telse if (ghidraURLString != null) {\n\t\t\tbsimURL = BSimClientFactory.deriveBSimURL(ghidraURLString);\n\t\t}\n\t}\n\n\t/**\n\t * Read in any optional parameters, strip them from the parameter stream\n\t * @param command command name\n\t * @param params is the original array of command line parameters\n\t * @param discard number of params already consumed\n\t * @return an array of parameters with optional ones stripped\n\t */","sourceCodeStart":253,"sourceCodeEnd":289,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java#L253-L289","documentation":"This wraps an UnsupportedEncodingException from URLDecoder.decode(path, \"UTF-8\") during ghidra URL derivation. UTF-8 is a mandatory charset on every compliant JVM (per the Java specification), so this exception is effectively unreachable. It exists only as a compiler-satisfying catch for a checked exception that cannot occur in practice.","triggerScenarios":"Running on a non-spec-compliant JVM that does not register the UTF-8 CharsetProvider. This would indicate a severely broken runtime environment, not a normal user error.","commonSituations":"Effectively never seen in practice. Could theoretically occur on a minimal custom JVM build that strips standard charset providers.","solutions":["Ensure you are running a standard, spec-compliant JVM (OpenJDK, Oracle JDK, or equivalent).","If using a minimal/embedded JVM, verify that java.nio.charset.StandardCharsets.UTF_8 is available.","Upgrade to a full JDK distribution if using a stripped-down runtime."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    launchable.setupURLs(ghidraURLString, bsimURLString);\n} catch (MalformedURLException e) {\n    // In practice unreachable (UTF-8 is always supported)\n    // If hit, the JVM environment is fundamentally broken\n    throw new RuntimeException(\"JVM does not support UTF-8 charset — environment is non-compliant\", e);\n}","preventionTips":["Use a standard spec-compliant JVM distribution.","Do not strip charset providers from custom JVM builds."],"tags":["bsim","ghidra","jvm","encoding","unreachable"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}