oracle/graal · error · IOException
Unknown type
Error message
Unknown type
What it means
While reading a PROPERTY_ARRAY property, BinaryReader reads a sub-type tag that selects the element encoding (PROPERTY_INT, PROPERTY_DOUBLE, PROPERTY_POOL). An unrecognized sub-type byte produces IOException('Unknown type'): the property section is malformed or was written by a producer using an array encoding this reader does not implement.
Source
Thrown at compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/graphio/parsing/BinaryReader.java:805
case PROPERTY_DOUBLE:
return dataSource.readDouble();
case PROPERTY_TRUE:
return Boolean.TRUE;
case PROPERTY_FALSE:
return Boolean.FALSE;
case PROPERTY_POOL:
return readPoolObject(Object.class);
case PROPERTY_ARRAY:
int subType = dataSource.readByte();
switch (subType) {
case PROPERTY_INT:
return dataSource.readInts();
case PROPERTY_DOUBLE:
return dataSource.readDoubles();
case PROPERTY_POOL:
return readPoolObjects();
default:
throw new IOException("Unknown type");
}
case PROPERTY_SUBGRAPH:
reporter.pushContext(ContextStrings::propertyGraph, key); // NOI18N
builder.startNestedProperty(key);
// will pop the name in its finally
return parseGraph("", false);
default:
throw new IOException("Unknown type");
}
}
private void closeDanglingGroups() throws IOException {
while (folderLevel > 0) {
// the builder may need to record the root position to close the group's entry
builder.startRoot();
doCloseGroup();
}
builder.end();View on GitHub (pinned to a66e9ccd1d)
Solutions
- Parse with a reader from the same or newer graphio version than the producer.
- Regenerate the dump with a stock producer and retry.
- If extending array encodings, add the case to both GraphProtocol writePropertyObject and BinaryReader readPropertyObject.
Defensive patterns
Strategy: try-catch
Try / catch
try { reader.parse(); } catch (IOException e) { if ("Unknown type".equals(e.getMessage())) { /* array property encoding unknown: upgrade reader or re-dump */ } } Prevention
- Use a reader at least as new as the writer.
- When extending array property encodings, patch both writer and reader.
- Treat property-section errors as corruption evidence and verify the source dump.
When it happens
Trigger: A dump containing an array property whose sub-type byte is not one of int/double/pool; corrupt property data shifting the reader by one byte; a custom GraphProtocol extension emitting new array element types without reader support.
Common situations: Dumps from customized compilers, partial file transfers, or a reader older than the writer's array-property encoding.
Related errors
- Document properties unexpected in version < 7
- Invalid constant pool index :
- unknown klass type :
- unknown pool type
- File header is missing
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/63a6f7d26a1e0ced.
Report an issue: GitHub.