EllanJiang/GameFramework · critical · GameFrameworkException

Deserialize package version list failure.

Error message

Deserialize package version list failure.

What it means

Thrown in OnLoadPackageVersionListSuccess after the version list bytes were loaded successfully, when the deserialized PackageVersionList fails its IsValid check. It means the data was readable but structurally wrong or from an incompatible version-list format. The library treats this as a fatal resource-system initialization error.

Solutions

  1. Rebuild the package version list with the matching GameFramework ResourceEditor/builder version and redeploy.
  2. Verify the serializer set on ResourceManager (e.g. PackageVersionListSerializer) matches the format of the deployed version list file.
  3. Check that the file at ReadOnlyPath/RemoteVersionListFileName is the package version list (not the remote/updatable variant) and is not truncated.

Example fix

// before
resourceComponent.m_ResourceManager.m_PackageVersionListSerializer = new PackageVersionListSerializer_V0(); // old format
// after
resourceComponent.m_ResourceManager.m_PackageVersionListSerializer = new PackageVersionListSerializer(); // matches builder output
Defensive patterns

Strategy: try-catch

Validate before calling

// No pre-call API; validate after load: keep a copy of version list bytes and verify length > 0 and built with the current builder version.

Try / catch

try { resourceComponent.InitResources(); }
catch (GameFrameworkException ex) { Log.Fatal("Version list invalid: {0}", ex); /* fallback to rebuild/re-download */ }

Prevention

When it happens

Trigger: ResourceManager.InitResources loads the package version list, m_PackageVersionListSerializer.Deserialize succeeds but returns a PackageVersionList whose IsValid property is false (wrong magic/version header, empty data, or corrupted serialization).

Common situations: Using a version list built by a different GameFramework version or built for editable-mode instead of package mode; the build pipeline produced an empty/corrupt PackageVersionList file; wrong serializer registered for the version list format.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of EllanJiang/GameFramework@d0c010b051 (2026-09-15). Data as JSON: /api/errors/0dcd5b4be3c118f5. Report an issue: GitHub.

Appendix: source

Thrown at GameFramework/Resource/ResourceManager.ResourceIniter.cs:76

                if (string.IsNullOrEmpty(m_ResourceManager.m_ReadOnlyPath))
                {
                    throw new GameFrameworkException("Read-only path is invalid.");
                }

                m_ResourceManager.m_ResourceHelper.LoadBytes(Utility.Path.GetRemotePath(Path.Combine(m_ResourceManager.m_ReadOnlyPath, RemoteVersionListFileName)), new LoadBytesCallbacks(OnLoadPackageVersionListSuccess, OnLoadPackageVersionListFailure), null);
            }

            private void OnLoadPackageVersionListSuccess(string fileUri, byte[] bytes, float duration, object userData)
            {
                MemoryStream memoryStream = null;
                try
                {
                    memoryStream = new MemoryStream(bytes, false);
                    PackageVersionList versionList = m_ResourceManager.m_PackageVersionListSerializer.Deserialize(memoryStream);
                    if (!versionList.IsValid)
                    {
                        throw new GameFrameworkException("Deserialize package version list failure.");
                    }

                    PackageVersionList.Asset[] assets = versionList.GetAssets();
                    PackageVersionList.Resource[] resources = versionList.GetResources();
                    PackageVersionList.FileSystem[] fileSystems = versionList.GetFileSystems();
                    PackageVersionList.ResourceGroup[] resourceGroups = versionList.GetResourceGroups();
                    m_ResourceManager.m_ApplicableGameVersion = versionList.ApplicableGameVersion;
                    m_ResourceManager.m_InternalResourceVersion = versionList.InternalResourceVersion;
                    m_ResourceManager.m_AssetInfos = new Dictionary<string, AssetInfo>(assets.Length, StringComparer.Ordinal);
                    m_ResourceManager.m_ResourceInfos = new Dictionary<ResourceName, ResourceInfo>(resources.Length, new ResourceNameComparer());
                    ResourceGroup defaultResourceGroup = m_ResourceManager.GetOrAddResourceGroup(string.Empty);

                    foreach (PackageVersionList.FileSystem fileSystem in fileSystems)
                    {
                        int[] resourceIndexes = fileSystem.GetResourceIndexes();
                        foreach (int resourceIndex in resourceIndexes)
                        {
                            PackageVersionList.Resource resource = resources[resourceIndex];

View on GitHub (pinned to d0c010b051)