{"record":{"id":"1402e98cc3becca5","repo":"oracle/graal","slug":"file-format-version","errorCode":null,"errorMessage":"File format version ","messagePattern":"File format version ","errorType":"exception","errorClass":"VersionMismatchException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/graphio/parsing/BinarySource.java","lineNumber":103,"sourceCode":"        try {\n            // Parfait_ALLOW weak-hash\n            this.digest = MessageDigest.getInstance(\"SHA-1\"); // NOI18N\n        } catch (NoSuchAlgorithmException e) {\n            // ignore\n        }\n    }\n\n    public Object getSourceId() {\n        return sourceId;\n    }\n\n    public void useDigest(MessageDigest newDigest) {\n        this.digest = newDigest;\n    }\n\n    private void setVersion(int newMajorVersion, int newMinorVersion) throws IOException {\n        if (newMajorVersion > CURRENT_MAJOR_VERSION || (newMajorVersion == CURRENT_MAJOR_VERSION && newMinorVersion > CURRENT_MINOR_VERSION)) {\n            throw new VersionMismatchException(\"File format version \" + versionPair(newMajorVersion, newMinorVersion) + \" unsupported.  Current version is \" + CURRENT_VERSION);\n        }\n        majorVersion = newMajorVersion;\n        minorVersion = newMinorVersion;\n    }\n\n    @Override\n    public int getMajorVersion() {\n        return majorVersion;\n    }\n\n    public int getMinorVersion() {\n        return minorVersion;\n    }\n\n    /**\n     * @return Returns absolute position of the source stream\n     */\n    @Override","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/graphio/parsing/BinarySource.java#L85-L121","documentation":"BinarySource.setVersion rejects any file whose declared format version is newer than the reader's compiled maximum (CURRENT_MAJOR_VERSION.CURRENT_MINOR_VERSION, e.g. 8.0). VersionMismatchException('File format version X.Y unsupported...') means the dump was written by a newer graphio implementation whose encoding this reader cannot safely interpret.","triggerScenarios":"Opening a BGV file produced by a newer GraalVM/graphio with a viewer or library built against an older version; pinning an old reader for compatibility while producers auto-update.","commonSituations":"Version skew between a compiler that dumps graphs and the IGV/tooling used to inspect them; CI pipelines reusing cached readers on freshly generated dumps.","solutions":["Upgrade the reading side (IGV / graphio dependency) to at least the version shown in the message.","Re-dump the graphs using a producer matching the reader's supported version.","Catch VersionMismatchException at the call site and surface a clear 'upgrade your viewer' message instead of a generic failure."],"exampleFix":"// reader side\ntry {\n    new BinaryReader(source, builder).parse();\n} catch (VersionMismatchException e) {\n    throw new IllegalStateException(\"Dump written by a newer format; upgrade graphio/IGV: \" + e.getMessage(), e);\n}","handlingStrategy":"try-catch","validationCode":"int[] v = readVersionHeader(file); // parse BIGV + major.minor\nif (v[0] > SUPPORTED_MAJOR) { throw new UnsupportedOperationException(\"Upgrade graphio/IGV to read version \" + v[0] + \".\" + v[1]); }","typeGuard":null,"tryCatchPattern":"try { reader.parse(); } catch (VersionMismatchException e) { promptUserToUpgrade(e.getMessage()); }","preventionTips":["Ship the reader that matches the newest producer in your pipeline.","Surface VersionMismatchException distinctly from generic IOException in tooling UX.","Record the writer's graphio version alongside dump files in CI."],"tags":["graphio","versioning","parsing","compatibility"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}