EllanJiang/GameFramework · error · GameFrameworkException

Parse read-only version list exception

Error message

Parse read-only version list exception '{0}'.

What it means

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.

Solutions

  1. Inspect the InnerException (appended in the message) to identify the root cause
  2. Validate the version list file integrity (size, checksum) before loading
  3. Regenerate the version list with the matching ResourceBuilder version
  4. Catch this exception around CheckResources/UpdateResources and trigger a re-download of the version list

Example fix

// before
checker.CheckResources();
// after
try { checker.CheckResources(); }
catch (GameFrameworkException ex) { Log.Error("Version list parse failed: " + ex.Message); redownloadVersionList(); }
Defensive patterns

Strategy: try-catch

Try / catch

try { checker.CheckResources(); }
catch (GameFrameworkException ex) when (ex.Message.StartsWith("Parse read-only version list exception")) {
    Log.Error(ex.InnerException ?? ex);
    RedownloadReadOnlyVersionList();
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: JSON parse error: "Unexpected token" / "not valid JSON" / "failed to parse" — what JSON parsers are really complaining about — this error's family across 45 libraries.

Related errors


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

Appendix: source

Thrown at GameFramework/Resource/ResourceManager.ResourceChecker.cs:413

                        }
                    }

                    foreach (LocalVersionList.Resource resource in resources)
                    {
                        SetReadOnlyInfo(new ResourceName(resource.Name, resource.Variant, resource.Extension), (LoadType)resource.LoadType, resource.Length, resource.HashCode);
                    }

                    m_ReadOnlyVersionListReady = true;
                    RefreshCheckInfoStatus();
                }
                catch (Exception exception)
                {
                    if (exception is GameFrameworkException)
                    {
                        throw;
                    }

                    throw new GameFrameworkException(Utility.Text.Format("Parse read-only version list exception '{0}'.", exception), exception);
                }
                finally
                {
                    if (memoryStream != null)
                    {
                        memoryStream.Dispose();
                        memoryStream = null;
                    }
                }
            }

            private void OnLoadReadOnlyVersionListFailure(string fileUri, string errorMessage, object userData)
            {
                if (m_ReadOnlyVersionListReady)
                {
                    throw new GameFrameworkException("Read-only version list has been parsed.");
                }

View on GitHub (pinned to d0c010b051)