stride3d/stride · error · InvalidOperationException
Unable to decode objectid
Error message
Unable to decode objectid [{0}] when reading asset index What it means
Data validation in ContentIndexMap.ReadEntries: the second token of an index-map line (the object id GUID) could not be parsed, meaning the file contains a malformed or truncated entry. The url parsed fine, but the asset id is not a valid GUID.
Solutions
- Fix or remove the malformed line in the index map file so the object id is a valid GUID
- Regenerate the index map by recompiling the assets
- Restore from a backup if the file was hand-edited and partially corrupted
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at sources/core/Stride.Core.Serialization/Serialization/Contents/ContentIndexMap.cs:130 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/b55b5cffa00eb5a9.
Report an issue: GitHub.
Appendix: source
Thrown at sources/core/Stride.Core.Serialization/Serialization/Contents/ContentIndexMap.cs:130
var match = regexEntry.Match(line);
if (!match.Success)
{
throw new InvalidOperationException("Unable to read asset index entry [{0}]. Expecting: [path objectId]".ToFormat(line));
}
var url = match.Groups[1].Value;
var objectIdStr = match.Groups[2].Value;
// Test if the name has leading or ending spaces
var matchSpace = regexEntrySpace.Match(line);
if (matchSpace.Success && !matchSpace.Groups[1].Value.Equals(url))
{
throw new InvalidOperationException("Assets names cannot have empty spaces before or after the name. Please rename [{0}] and compile again.".ToFormat(matchSpace.Groups[1].Value));
}
if (!ObjectId.TryParse(objectIdStr, out var objectId))
{
throw new InvalidOperationException("Unable to decode objectid [{0}] when reading asset index".ToFormat(objectIdStr));
}
var entry = new KeyValuePair<string, ObjectId>(url, objectId);
entries.Add(entry);
}
return entries;
}
protected override void WriteEntry(Stream localStream, KeyValuePair<string, ObjectId> value)
{
ArgumentNullException.ThrowIfNull(localStream);
var line = $"{value.Key} {value.Value}\n";
var bytes = Encoding.UTF8.GetBytes(line);
localStream.Write(bytes, 0, bytes.Length);
}
[GeneratedRegex(@"^(.*?)\s+(\w+)$")]View on GitHub (pinned to 96fad776d2)