{"record":{"id":"4878ec439e484fc5","repo":"EllanJiang/GameFramework","slug":"parse-package-version-list-exception-0","errorCode":null,"errorMessage":"Parse package version list exception '{0}'.","messagePattern":"Parse package version list exception '(.+?)'\\.","errorType":"exception","errorClass":"GameFrameworkException","httpStatus":null,"severity":"critical","filePath":"GameFramework/Resource/ResourceManager.ResourceIniter.cs","lineNumber":162,"sourceCode":"                            if (resource.Variant != null && resource.Variant != m_CurrentVariant)\n                            {\n                                continue;\n                            }\n\n                            group.AddResource(new ResourceName(resource.Name, resource.Variant, resource.Extension), resource.Length, resource.Length);\n                        }\n                    }\n\n                    ResourceInitComplete();\n                }\n                catch (Exception exception)\n                {\n                    if (exception is GameFrameworkException)\n                    {\n                        throw;\n                    }\n\n                    throw new GameFrameworkException(Utility.Text.Format(\"Parse package version list exception '{0}'.\", exception), exception);\n                }\n                finally\n                {\n                    m_CachedFileSystemNames.Clear();\n                    if (memoryStream != null)\n                    {\n                        memoryStream.Dispose();\n                        memoryStream = null;\n                    }\n                }\n            }\n\n            private void OnLoadPackageVersionListFailure(string fileUri, string errorMessage, object userData)\n            {\n                throw new GameFrameworkException(Utility.Text.Format(\"Package version list '{0}' is invalid, error message is '{1}'.\", fileUri, string.IsNullOrEmpty(errorMessage) ? \"<Empty>\" : errorMessage));\n            }\n        }\n    }","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/EllanJiang/GameFramework/blob/d0c010b05167c58e92350449d04864a91ca13fd2/GameFramework/Resource/ResourceManager.ResourceIniter.cs#L144-L180","documentation":"Wraps any non-GameFrameworkException thrown while parsing/deserializing the package version list into a GameFrameworkException with the original exception message appended. It preserves the inner exception as InnerException. Any unexpected parsing error (corrupt stream, out-of-range reads, format bugs) surfaces this way in OnLoadPackageVersionListSuccess's catch block.","triggerScenarios":"PackageVersionListSerializer.Deserialize throws (e.g. end-of-stream while reading, bad binary layout) or the post-deserialization processing code throws any non-GameFrameworkException inside the try block.","commonSituations":"Version list file truncated during copy to the device; version list built with mismatched binary layout/endianness or different framework version; LoadBytes returned bytes of an HTML error page instead of the binary list when loading a remote URL.","solutions":["Inspect the InnerException of this GameFrameworkException to find the real parse failure.","Rebuild and redeploy the version list to eliminate corruption/truncation.","Confirm the downloaded/loaded bytes are the version list binary (log bytes.Length and first bytes) and that the URL/path is correct.","Pin GameFramework and resource-builder versions so the binary layout matches the serializer."],"exampleFix":"// before\ncatch (GameFrameworkException ex) { Log.Error(ex.Message); } // inner cause lost\n// after\ncatch (GameFrameworkException ex) { Log.Error(\"{0} | inner: {1}\", ex.Message, ex.InnerException); }","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { resourceComponent.InitResources(); }\ncatch (GameFrameworkException ex) when (ex.InnerException != null)\n{ Log.Error(\"Parse failed: {0} caused by {1}\", ex.Message, ex.InnerException); }","preventionTips":["Always inspect InnerException for the real parse cause.","Verify downloaded bytes are binary, not an error page.","Pin framework and resource-builder versions together."],"tags":["resource","deserialization","version-list","gameframework"],"backgroundTag":"json-unmarshal-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"}