EllanJiang/GameFramework · error · GameFrameworkException

Load data failure in data provider helper, data asset name

Error message

Load data failure in data provider helper, data asset name '{0}'.

What it means

After successfully loading the binary bytes, ReadData hands them to IDataProviderHelper.ReadData to parse. If the helper returns false — meaning it could not interpret the bytes for this owner/asset — the provider wraps that failure in this exception naming the data asset. This indicates the data content is unreadable by the configured helper.

Solutions

  1. Re-export the data asset so its format matches the helper's parser version.
  2. Verify the correct IDataProviderHelper implementation is assigned for this provider type.
  3. Check userData requirements of the helper and pass compatible user data.
  4. Inspect helper logs to see why parsing returned false.

Example fix

// before
helper.ReadData(owner, name, bytes, 0, length, userData); // returns false, old format
// after
// re-export asset with matching GameFramework DataProvider version, then retry ReadData
Defensive patterns

Strategy: try-catch

Try / catch

try { dataProvider.ReadData(name, 0, userData); }
catch (GameFrameworkException e) when (e.Message.StartsWith("Load data failure")) { Log.Error("Helper could not parse '{0}'; check asset format/version.", name); }

Prevention

When it happens

Trigger: DataProviderHelper.ReadData(owner, dataAssetName, bytes, 0, length, userData) returns false — typically a format/version mismatch between the asset file and the helper's parser, or userData the helper cannot accept.

Common situations: Asset was re-exported with a newer table/config format while the runtime helper expects an older layout; wrong helper type assigned for the asset kind; passing incompatible userData to ReadData.

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/1983516260a921b7. Report an issue: GitHub.

Appendix: source

Thrown at GameFramework/Base/DataProvider/DataProvider.cs:218

                    break;

                case HasAssetResult.BinaryOnDisk:
                    m_ResourceManager.LoadBinary(dataAssetName, m_LoadBinaryCallbacks, userData);
                    break;

                case HasAssetResult.BinaryOnFileSystem:
                    int dataLength = m_ResourceManager.GetBinaryLength(dataAssetName);
                    EnsureCachedBytesSize(dataLength);
                    if (dataLength != m_ResourceManager.LoadBinaryFromFileSystem(dataAssetName, s_CachedBytes))
                    {
                        throw new GameFrameworkException(Utility.Text.Format("Load binary '{0}' from file system with internal error.", dataAssetName));
                    }

                    try
                    {
                        if (!m_DataProviderHelper.ReadData(m_Owner, dataAssetName, s_CachedBytes, 0, dataLength, userData))
                        {
                            throw new GameFrameworkException(Utility.Text.Format("Load data failure in data provider helper, data asset name '{0}'.", dataAssetName));
                        }

                        if (m_ReadDataSuccessEventHandler != null)
                        {
                            ReadDataSuccessEventArgs loadDataSuccessEventArgs = ReadDataSuccessEventArgs.Create(dataAssetName, 0f, userData);
                            m_ReadDataSuccessEventHandler(this, loadDataSuccessEventArgs);
                            ReferencePool.Release(loadDataSuccessEventArgs);
                        }
                    }
                    catch (Exception exception)
                    {
                        if (m_ReadDataFailureEventHandler != null)
                        {
                            ReadDataFailureEventArgs loadDataFailureEventArgs = ReadDataFailureEventArgs.Create(dataAssetName, exception.ToString(), userData);
                            m_ReadDataFailureEventHandler(this, loadDataFailureEventArgs);
                            ReferencePool.Release(loadDataFailureEventArgs);
                            return;
                        }

View on GitHub (pinned to d0c010b051)