{"record":{"id":"6ddcfa0c416af3c6","repo":"EllanJiang/GameFramework","slug":"parse-read-only-version-list-exception-0","errorCode":null,"errorMessage":"Parse read-only version list exception '{0}'.","messagePattern":"Parse read-only version list exception '(.+?)'\\.","errorType":"exception","errorClass":"GameFrameworkException","httpStatus":null,"severity":"error","filePath":"GameFramework/Resource/ResourceManager.ResourceChecker.cs","lineNumber":413,"sourceCode":"                        }\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);\n                    }\n\n                    m_ReadOnlyVersionListReady = true;\n                    RefreshCheckInfoStatus();\n                }\n                catch (Exception exception)\n                {\n                    if (exception is GameFrameworkException)\n                    {\n                        throw;\n                    }\n\n                    throw new GameFrameworkException(Utility.Text.Format(\"Parse read-only version list exception '{0}'.\", exception), exception);\n                }\n                finally\n                {\n                    if (memoryStream != null)\n                    {\n                        memoryStream.Dispose();\n                        memoryStream = null;\n                    }\n                }\n            }\n\n            private void OnLoadReadOnlyVersionListFailure(string fileUri, string errorMessage, object userData)\n            {\n                if (m_ReadOnlyVersionListReady)\n                {\n                    throw new GameFrameworkException(\"Read-only version list has been parsed.\");\n                }\n","sourceCodeStart":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/EllanJiang/GameFramework/blob/d0c010b05167c58e92350449d04864a91ca13fd2/GameFramework/Resource/ResourceManager.ResourceChecker.cs#L395-L431","documentation":"This wraps any unexpected exception thrown while parsing the read-only version list into a GameFrameworkException, preserving the original exception as InnerException and appending its text to the message. GameFrameworkException instances are re-thrown unchanged, so only non-framework errors (e.g. EndOfStreamException from a truncated stream) get wrapped.","triggerScenarios":"OnLoadReadOnlyVersionListSuccess's parsing block throws a non-GameFrameworkException — commonly MemoryStream/Deserialize failures on malformed bytes, or exceptions from fileSystem lookup logic in the loop over resources/fileSystems.","commonSituations":"Truncated version list file causing read-past-end during deserialization; null bytes array; an exception thrown inside the resource/fileSystem processing loop; disk I/O errors surfacing through the stream.","solutions":["Inspect the InnerException (appended in the message) to identify the root cause","Validate the version list file integrity (size, checksum) before loading","Regenerate the version list with the matching ResourceBuilder version","Catch this exception around CheckResources/UpdateResources and trigger a re-download of the version list"],"exampleFix":"// before\nchecker.CheckResources();\n// after\ntry { checker.CheckResources(); }\ncatch (GameFrameworkException ex) { Log.Error(\"Version list parse failed: \" + ex.Message); redownloadVersionList(); }","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { checker.CheckResources(); }\ncatch (GameFrameworkException ex) when (ex.Message.StartsWith(\"Parse read-only version list exception\")) {\n    Log.Error(ex.InnerException ?? ex);\n    RedownloadReadOnlyVersionList();\n}","preventionTips":["Always inspect InnerException to diagnose the root cause","Validate version list integrity before loading","Regenerate lists after framework upgrades","Wrap check startup in a recoverable catch that triggers re-download"],"tags":["gameframework","resource","version-list","parse-exception"],"backgroundTag":"json-parse-error","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"}