oracle/graal · error · IllegalStateException

Feature unsupported in version

Error message

Feature unsupported in version 

What it means

GraphOutput.Builder.requireVersion(int,int) is called internally when a feature needs a minimum graph-dumping protocol version. If the user explicitly pinned a version with protocolVersion(), that pin is authoritative; using a feature that needs a newer protocol then throws IllegalStateException('Feature unsupported in version X.Y'). Without an explicit pin the builder silently auto-upgrades, so this error only occurs for pinned configurations.

Source

Thrown at compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/graphio/GraphOutput.java:216

            this.major = majorVersion;
            this.minor = minorVersion;
            explicitVersionSet = true;
            return this;
        }

        /**
         * Asserts a specific version of the protocol. If not specified explicitly, upgrades the
         * protocol version.
         *
         * @param reqMajor The required major version
         * @param reqMinor the required minor version
         */
        private void requireVersion(int reqMajor, int reqMinor) {
            assert reqMajor >= 1 : "Major must be positive";
            assert reqMinor >= 0 : "Minor must not be negative";
            if (explicitVersionSet) {
                if (major < reqMajor || (major == reqMajor && minor < reqMinor)) {
                    throw new IllegalStateException("Feature unsupported in version " + major + "." + minor);
                }
            } else {
                if (major < reqMajor) {
                    major = reqMajor;
                    minor = reqMinor;
                } else if (major == reqMajor) {
                    minor = Math.max(minor, reqMinor);
                }
            }
        }

        /**
         * Sets {@link GraphOutput} as embedded. The embedded {@link GraphOutput} shares
         * {@link WritableByteChannel channel} with another already open non parent
         * {@link GraphOutput}. The embedded {@link GraphOutput} flushes data after each
         * {@link GraphOutput#print print}, {@link GraphOutput#beginGroup beginGroup} and
         * {@link GraphOutput#endGroup endGroup} call.
         *

View on GitHub (pinned to a66e9ccd1d)

Solutions

  1. Remove the explicit protocolVersion() pin so the builder can auto-upgrade to what the features need.
  2. Raise the pin to at least the version named by the failing feature's requirement (e.g. 7.0 for dump properties).
  3. Drop the feature that requires the newer protocol from your dumping path when the old pinned client must be supported.
  4. Update the consuming tool (IGV) to a release that understands the newer protocol, then unpin.

Example fix

// before
builder.protocolVersion(6, 0).build();
output.startDocument(props); // needs v7 -> IllegalStateException

// after
builder.protocolVersion(7, 0).build();
output.startDocument(props);
Defensive patterns

Strategy: validation

Validate before calling

// know the feature floors: dump properties need 7.0. If you must pin, pin at/above every feature you use:
builder.protocolVersion(7, 0); // >= 7.0 for startDocument properties

Try / catch

try {
    output.startDocument(props);
} catch (IllegalStateException e) {
    if (e.getMessage().startsWith("Feature unsupported")) {
        // rebuild output without the pin or without this feature
    } else throw e;
}

Prevention

When it happens

Trigger: Calling builder.protocolVersion(6, 0) and then enabling a feature whose requireVersion needs 7.x (e.g. dump properties via startDocument). Building a GraphOutput for an embedded/legacy consumer that forces an old version, then dumping graphs that exercise newer protocol elements.

Common situations: Supporting an old Ideal Graph Visualizer client by pinning the protocol, while the dumping code uses newer APIs. Library upgrades that raise feature requirements past a version the integrator pinned years ago. Partial migration: some dump sites updated to new features, pin left in place.

Related errors


AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14). Data as JSON: /api/errors/619bf3d5c4e6e290. Report an issue: GitHub.