{"record":{"id":"f8d1d1085ea3932c","repo":"EllanJiang/GameFramework","slug":"deserialize-read-write-version-list-failure","errorCode":null,"errorMessage":"Deserialize read-write version list failure.","messagePattern":"Deserialize read-write version list failure\\.","errorType":"exception","errorClass":"GameFrameworkException","httpStatus":null,"severity":"error","filePath":"GameFramework/Resource/ResourceManager.ResourceChecker.cs","lineNumber":450,"sourceCode":"                m_ReadOnlyVersionListReady = true;\n                RefreshCheckInfoStatus();\n            }\n\n            private void OnLoadReadWriteVersionListSuccess(string fileUri, byte[] bytes, float duration, object userData)\n            {\n                if (m_ReadWriteVersionListReady)\n                {\n                    throw new GameFrameworkException(\"Read-write 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_ReadWriteVersionListSerializer.Deserialize(memoryStream);\n                    if (!versionList.IsValid)\n                    {\n                        throw new GameFrameworkException(\"Deserialize read-write 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                        SetReadWriteInfo(new ResourceName(resource.Name, resource.Variant, resource.Extension), (LoadType)resource.LoadType, resource.Length, resource.HashCode);","sourceCodeStart":432,"sourceCodeEnd":468,"githubUrl":"https://github.com/EllanJiang/GameFramework/blob/d0c010b05167c58e92350449d04864a91ca13fd2/GameFramework/Resource/ResourceManager.ResourceChecker.cs#L432-L468","documentation":"Thrown when the read-write version list bytes cannot be deserialized or the resulting LocalVersionList has IsValid == false. The framework treats a corrupt sandbox version list as fatal for the update/check flow.","triggerScenarios":"m_ResourceManager.m_ReadWriteVersionListSerializer.Deserialize(memoryStream) returns an invalid list, or versionList.IsValid is false — bad bytes written to the read-write area or serializer mismatch.","commonSituations":"Interrupted previous update left a truncated read-write version list on disk; serializer type changed between app versions; file written by a different framework build; storage corruption on the device.","solutions":["Delete the read-write version list from the persistent data path so it is re-generated/re-downloaded","Regenerate the list with the matching ResourceBuilder/serializer","Ensure ReadWriteVersionListSerializer matches the serialization format actually used","Check disk space and write integrity in the sandbox area"],"exampleFix":"// before: stale corrupt list used blindly\nchecker.CheckResources();\n// after: clear sandbox list when format version changed\nif (storedFormatVersion != currentFormatVersion) File.Delete(rwVersionListPath);\nchecker.CheckResources();","handlingStrategy":"validation","validationCode":"var fi = new FileInfo(rwVersionListPath);\nif (!fi.Exists || fi.Length == 0 || fi.Length < minimumExpectedSize) File.Delete(rwVersionListPath); // force rebuild","typeGuard":null,"tryCatchPattern":"try { checker.CheckResources(); }\ncatch (GameFrameworkException ex) when (ex.Message.Contains(\"Deserialize read-write version list failure\")) { DeleteSandboxVersionList(); RestartCheck(); }","preventionTips":["Delete the sandbox version list when the serialization format version changes","Use the serializer matching the build pipeline","Verify writes completed fully before restarting the app","Check storage health/free space on device"],"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"}