{"record":{"id":"008940ce8dea900b","repo":"oracle/graal","slug":"invalid-marker-type","errorCode":null,"errorMessage":"Invalid marker type.","messagePattern":"Invalid marker type\\.","errorType":"exception","errorClass":"DeserializationException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/replaycomp/JsonReplayCodec.java","lineNumber":534,"sourceCode":"            } else {\n                throw new IllegalArgumentException(\"Cannot serialize result marker \" + instance);\n            }\n            objectBuilder.append(\"type\", type);\n        }\n\n        @Override\n        public Object deserialize(EconomicMap<String, Object> json, RecursiveDeserializer deserializer, CompilationProxies.ProxyFactory proxyFactory) throws DeserializationException {\n            switch ((String) json.get(\"type\")) {\n                case \"noResult\" -> {\n                    return SpecialResultMarker.NO_RESULT_MARKER;\n                }\n                case \"null\" -> {\n                    return SpecialResultMarker.NULL_RESULT_MARKER;\n                }\n                case \"exception\" -> {\n                    return new SpecialResultMarker.ExceptionThrownMarker((Throwable) deserializer.deserialize(json.get(\"throwable\"), proxyFactory));\n                }\n                case null, default -> throw new DeserializationException(this, json, \"Invalid marker type.\");\n            }\n        }\n    }\n\n    private static final class EnumSerializer implements ObjectSerializer {\n        @Override\n        public boolean serializesSubclasses() {\n            return true;\n        }\n\n        @Override\n        public Class<?> clazz() {\n            return Enum.class;\n        }\n\n        @Override\n        public String tag() {\n            return \"enum\";","sourceCodeStart":516,"sourceCodeEnd":552,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/replaycomp/JsonReplayCodec.java#L516-L552","documentation":"Deserialization counterpart of 146: the 'type' string of a result-marker JSON object must be 'noResult', 'null', or 'exception'. The case null, default branch throws DeserializationException('Invalid marker type.'), attaching this serializer and the offending JSON map for diagnostics.","triggerScenarios":"Replaying a JSON replay file whose result-marker object has a type string that is missing, misspelled, or from a newer codec (e.g. 'myMarker' written by an extended writer).","commonSituations":"Hand-edited JSON; replay-file written by a newer GraalVM with extra marker types; version skew between record and replay builds.","solutions":["Open the replay JSON and locate the entry with the bad 'type' (the DeserializationException context includes the map)","Re-record with the same build you replay on","If you extended the writer (error 146), add the matching case here"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"static final Set<String> VALID_MARKER_TYPES = Set.of(\"noResult\", \"null\", \"exception\");\n\nif (!VALID_MARKER_TYPES.contains(json.get(\"type\"))) {\n    throw new DeserializationException(this, json, \"Invalid marker type: \" + json.get(\"type\"));\n}","typeGuard":null,"tryCatchPattern":"catch (DeserializationException e) {\n    // e carries the offending map; extract json.get(\"type\") for a precise error report\n}","preventionTips":["Treat marker type strings as a schema: validate them before deserialization when ingesting external files","Regenerate replay files rather than hand-editing them"],"tags":["graalvm","replay","deserialization","result-marker"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}