{"record":{"id":"b55b5cffa00eb5a9","repo":"stride3d/stride","slug":"unable-to-decode-objectid-0-when-reading-asset-index","errorCode":null,"errorMessage":"Unable to decode objectid [{0}] when reading asset index","messagePattern":"Unable to decode objectid \\[(.+?)\\] when reading asset index","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/core/Stride.Core.Serialization/Serialization/Contents/ContentIndexMap.cs","lineNumber":130,"sourceCode":"            var match = regexEntry.Match(line);\n            if (!match.Success)\n            {\n                throw new InvalidOperationException(\"Unable to read asset index entry [{0}]. Expecting: [path objectId]\".ToFormat(line));\n            }\n\n            var url = match.Groups[1].Value;\n            var objectIdStr = match.Groups[2].Value;\n\n            // Test if the name has leading or ending spaces\n            var matchSpace = regexEntrySpace.Match(line);\n            if (matchSpace.Success && !matchSpace.Groups[1].Value.Equals(url))\n            {\n                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));\n            }\n\n            if (!ObjectId.TryParse(objectIdStr, out var objectId))\n            {\n                throw new InvalidOperationException(\"Unable to decode objectid [{0}] when reading asset index\".ToFormat(objectIdStr));\n            }\n\n            var entry = new KeyValuePair<string, ObjectId>(url, objectId);\n            entries.Add(entry);\n        }\n        return entries;\n    }\n\n    protected override void WriteEntry(Stream localStream, KeyValuePair<string, ObjectId> value)\n    {\n        ArgumentNullException.ThrowIfNull(localStream);\n\n        var line = $\"{value.Key} {value.Value}\\n\";\n        var bytes = Encoding.UTF8.GetBytes(line);\n        localStream.Write(bytes, 0, bytes.Length);\n    }\n\n    [GeneratedRegex(@\"^(.*?)\\s+(\\w+)$\")]","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/core/Stride.Core.Serialization/Serialization/Contents/ContentIndexMap.cs#L112-L148","documentation":"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.","triggerScenarios":"Thrown at sources/core/Stride.Core.Serialization/Serialization/Contents/ContentIndexMap.cs:130 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}