{"record":{"id":"25acbe355fea9e4e","repo":"antlr/antlr4","slug":"antlr-installation-corrupted-antlr-messages-forma","errorCode":null,"errorMessage":"ANTLR installation corrupted; ANTLR messages format file  + formatName + .stg incomplete","messagePattern":"ANTLR installation corrupted; ANTLR messages format file  \\+ formatName \\+ \\.stg incomplete","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"tool/src/org/antlr/v4/tool/ErrorManager.java","lineNumber":258,"sourceCode":"\t\t\t\tloadedFormat = new STGroupFile(url, \"UTF-8\", '<', '>');\n\t\t\t\tloadedFormat.load();\n\n\t\t\t\tloadedFormats.put(formatName, loadedFormat);\n\t\t\t}\n\t\t}\n\n\t\tthis.formatName = formatName;\n\t\tthis.format = loadedFormat;\n\n\t\tif (!initSTListener.errors.isEmpty()) {\n\t\t\trawError(\"ANTLR installation corrupted; can't load messages format file:\\n\" +\n\t\t\t\t\tinitSTListener.toString());\n\t\t\tpanic();\n\t\t}\n\n\t\tboolean formatOK = verifyFormat();\n\t\tif (!formatOK && formatName.equals(\"antlr\")) {\n\t\t\trawError(\"ANTLR installation corrupted; ANTLR messages format file \" + formatName + \".stg incomplete\");\n\t\t\tpanic();\n\t\t}\n\t\telse if (!formatOK) {\n\t\t\tsetFormat(\"antlr\"); // recurse on this rule, trying the default message format\n\t\t}\n\t}\n\n    /** Verify the message format template group */\n    protected boolean verifyFormat() {\n        boolean ok = true;\n        if (!format.isDefined(\"location\")) {\n            System.err.println(\"Format template 'location' not found in \" + formatName);\n            ok = false;\n        }\n        if (!format.isDefined(\"message\")) {\n            System.err.println(\"Format template 'message' not found in \" + formatName);\n            ok = false;\n        }","sourceCodeStart":240,"sourceCodeEnd":276,"githubUrl":"https://github.com/antlr/antlr4/blob/7d5770395bb7b02eb56e7c62662cb1d7c08f42a3/tool/src/org/antlr/v4/tool/ErrorManager.java#L240-L276","documentation":"Error \"ANTLR installation corrupted; ANTLR messages format file  + formatName + .stg incomplete\" thrown in antlr/antlr4.","triggerScenarios":"The loaded messages format .stg file is missing required templates (incomplete).","commonSituations":"Reinstall ANTLR; ensure the complete messages .stg ships inside the tool jar.","solutions":["Reinstall the ANTLR tool; the named messages format .stg file is incomplete or truncated.","Restore the original .stg files from the ANTLR distribution matching your tool version.","If the file was edited locally, revert it to the released version."],"exampleFix":"// re-download the antlr-4.x-complete.jar for your version and replace the corrupted one","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d5770395bb7b02eb56e7c62662cb1d7c08f42a3","analyzedAt":"2026-08-14T14:47:56.354Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}