{"record":{"id":"396b12baf5f2e033","repo":"oracle/graal","slug":"dump-properties-unsupported-in-format-v","errorCode":null,"errorMessage":"Dump properties unsupported in format v.","messagePattern":"Dump properties unsupported in format v\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/graphio/GraphProtocol.java","lineNumber":142,"sourceCode":"                writeString(format);\n                writeInt(args.length);\n                for (Object a : args) {\n                    writePropertyObject(graph, a);\n                }\n            } else {\n                writePoolObject(formatTitle(graph, id, format, args));\n            }\n            writeGraph(graph, properties);\n            flushEmbedded();\n            flush();\n        } finally {\n            printing = false;\n        }\n    }\n\n    public final void startDocument(Map<? extends Object, ? extends Object> documentProperties) throws IOException {\n        if (versionMajor < 7) {\n            throw new IllegalStateException(\"Dump properties unsupported in format v.\" + versionMajor);\n        }\n        printing = true;\n        try {\n            writeByte(BEGIN_DOCUMENT);\n            writeProperties(null, documentProperties);\n        } finally {\n            printing = false;\n        }\n    }\n\n    public final void beginGroup(Graph noGraph, String name, String shortName, ResolvedJavaMethod method, int bci, Map<? extends Object, ? extends Object> properties) throws IOException {\n        printing = true;\n        try {\n            writeByte(BEGIN_GROUP);\n            writePoolObject(name);\n            writePoolObject(shortName);\n            writePoolObject(method);\n            writeInt(bci);","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/graphio/GraphProtocol.java#L124-L160","documentation":"Document-level dump properties (beginDocument/startDocument metadata) were introduced in protocol version 7. GraphProtocol.startDocument checks versionMajor and refuses to emit document properties on older formats with IllegalStateException, because the reading side of v<7 has no way to parse them. The stream would be corrupt rather than merely degraded, so it fails fast.","triggerScenarios":"Building a GraphOutput pinned (explicitly or via an old default) to major < 7 and then calling startDocument(map). Common when supporting an old Ideal Graph Visualizer that only reads v6 dumps while the code emits document properties.","commonSituations":"Legacy IGV integration with a pinned protocol version. GraphOutput built by a helper that always sets an old version. Upgrading graphio where startDocument became available but the pin was never revisited.","solutions":["Ensure the builder allows version 7: call protocolVersion(7, 0) or newer, or drop the explicit pin so requireVersion can auto-upgrade.","Skip startDocument when you must stay on v6; emit graph-level properties instead.","Upgrade the consuming tool (IGV) to a version that reads v7+ dumps, then use the new API."],"exampleFix":"// before\nbuilder.protocolVersion(6, 0).build();\noutput.startDocument(props); // IllegalStateException\n\n// after\nbuilder.protocolVersion(7, 0).build();\noutput.startDocument(props);","handlingStrategy":"validation","validationCode":"// ensure the built output is on v7+ before using document properties\nbuilder.protocolVersion(7, 0);\nGraphOutput<G, N, M> out = builder.build();\nout.startDocument(props);","typeGuard":null,"tryCatchPattern":"try {\n    output.startDocument(props);\n} catch (IllegalStateException e) {\n    if (e.getMessage().contains(\"Dump properties unsupported\")) {\n        output.print(graph, props); // degrade to graph-level properties on old protocol\n    } else throw e;\n}","preventionTips":["Gate startDocument usage on a configuration flag for old-IGV compatibility.","When you pin for legacy readers, also stub out new-protocol calls in the same config."],"tags":["java","graal","graphio","protocol-version","dumping","backwards-compatibility"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}