{"record":{"id":"9b49648f11d12362","repo":"EllanJiang/GameFramework","slug":"deserialize-read-only-version-list-failure","errorCode":null,"errorMessage":"Deserialize read-only version list failure.","messagePattern":"Deserialize read-only version list failure\\.","errorType":"exception","errorClass":"GameFrameworkException","httpStatus":null,"severity":"error","filePath":"GameFramework/Resource/ResourceManager.ResourceChecker.cs","lineNumber":382,"sourceCode":"            {\n                throw new GameFrameworkException(Utility.Text.Format(\"Updatable version list '{0}' is invalid, error message is '{1}'.\", fileUri, string.IsNullOrEmpty(errorMessage) ? \"<Empty>\" : errorMessage));\n            }\n\n            private void OnLoadReadOnlyVersionListSuccess(string fileUri, byte[] bytes, float duration, object userData)\n            {\n                if (m_ReadOnlyVersionListReady)\n                {\n                    throw new GameFrameworkException(\"Read-only version list has been parsed.\");\n                }\n\n                MemoryStream memoryStream = null;\n                try\n                {\n                    memoryStream = new MemoryStream(bytes, false);\n                    LocalVersionList versionList = m_ResourceManager.m_ReadOnlyVersionListSerializer.Deserialize(memoryStream);\n                    if (!versionList.IsValid)\n                    {\n                        throw new GameFrameworkException(\"Deserialize read-only version list failure.\");\n                    }\n\n                    LocalVersionList.Resource[] resources = versionList.GetResources();\n                    LocalVersionList.FileSystem[] fileSystems = versionList.GetFileSystems();\n\n                    foreach (LocalVersionList.FileSystem fileSystem in fileSystems)\n                    {\n                        int[] resourceIndexes = fileSystem.GetResourceIndexes();\n                        foreach (int resourceIndex in resourceIndexes)\n                        {\n                            LocalVersionList.Resource resource = resources[resourceIndex];\n                            SetCachedFileSystemName(new ResourceName(resource.Name, resource.Variant, resource.Extension), fileSystem.Name);\n                        }\n                    }\n\n                    foreach (LocalVersionList.Resource resource in resources)\n                    {\n                        SetReadOnlyInfo(new ResourceName(resource.Name, resource.Variant, resource.Extension), (LoadType)resource.LoadType, resource.Length, resource.HashCode);","sourceCodeStart":364,"sourceCodeEnd":400,"githubUrl":"https://github.com/EllanJiang/GameFramework/blob/d0c010b05167c58e92350449d04864a91ca13fd2/GameFramework/Resource/ResourceManager.ResourceChecker.cs#L364-L400","documentation":"Thrown when the read-only version list bytes were loaded but the configured version list serializer either failed to produce a valid list or returned a list whose IsValid is false. GameFramework refuses to proceed with resource checking using a corrupt or unrecognized version list.","triggerScenarios":"m_ResourceManager.m_ReadOnlyVersionListSerializer.Deserialize(memoryStream) returns null/invalid data, or the deserialized LocalVersionList reports IsValid == false — e.g. bytes from a corrupted or wrong-format version list file.","commonSituations":"Version list file generated by a different game framework version or serializer; truncated/partial download of the version list; wrong file passed to the pipeline (e.g. a package file instead of the version list); serializer type mismatched with how the list was serialized.","solutions":["Regenerate the read-only version list with the framework's ResourceBuilder so its format matches the serializer","Verify m_ReadOnlyVersionListSerializer matches the format used to build the version list file","Re-download or restore the corrupted version list file and check its checksum","Confirm the correct file path/URI is being loaded (not another resource)"],"exampleFix":"// before: mismatched serializer\nresourceManager.ReadOnlyVersionListSerializer = new PackageVersionListSerializer();\n// after: use the serializer matching the built list\nresourceManager.ReadOnlyVersionListSerializer = new LocalVersionListSerializer();","handlingStrategy":"validation","validationCode":"// validate version list file before handing it to the framework\nif (!File.Exists(versionListPath) || new FileInfo(versionListPath).Length == 0)\n    throw new FileNotFoundException(\"Version list missing or empty\", versionListPath);\n// optionally verify checksum against expected","typeGuard":null,"tryCatchPattern":"try { checker.CheckResources(); }\ncatch (GameFrameworkException ex) when (ex.Message.Contains(\"Deserialize read-only version list failure\")) { RegenerateVersionList(); }","preventionTips":["Build the version list with the ResourceBuilder version matching the runtime serializer","Verify file checksum/size after download before use","Keep serializer type and build pipeline in sync","Detect truncated downloads by comparing content length"],"tags":["gameframework","resource","version-list","deserialization"],"backgroundTag":"schema-validation-failed","analyzedSha":"d0c010b05167c58e92350449d04864a91ca13fd2","analyzedAt":"2026-09-15T13:37:15.352Z","contentChangedAt":"2026-09-15T13:37:15.352Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}