stride3d/stride · error · ContentStreamingException

Data chunk is missing.

Error message

Data chunk is missing.

What it means

While streaming in higher-resolution mips, StreamingTask fetches each mip's data from a chunk in the asset's ContentStorage. GetChunk(totalMipIndex) returning null means the storage container does not contain a chunk for that mip index — the file's chunk table is missing the expected entry — so the streaming operation aborts with a ContentStreamingException.

Solutions

  1. Recompile the affected texture asset so all mip chunks exist and match mipInfos
  2. Redeploy/re-copy the content storage files completely (don't partially copy .bin chunk files)
  3. Ensure the ImageDescription used to register the texture matches the compiled asset's description (same mip count)
  4. Clear the game's asset cache and rebuild content to remove stale storage files

Example fix

// before
var chunk = Storage.GetChunk(totalMipIndex); // null for some mip
// after
if (Storage.ChunkCount < mipInfos.Length)
{
    Log.Error("Storage missing mip chunks; falling back to full reload");
    await ReloadTextureAsync();
    return;
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (storage.ChunkCount < expectedMipCount)
    Logger.Error("Storage missing mip chunks; recompile the asset.");

Try / catch

try
{
    await StreamAsync(mipIndex);
}
catch (ContentStreamingException)
{
    Logger.Warning("Missing chunk; falling back to full texture reload");
    await ReloadTextureAsync();
}

Prevention

When it happens

Trigger: Storage.GetChunk(mipIndex) returning null during StreamingTask for a mip index derived from newHighestResidentMipIndex; assets whose stored mip count doesn't match the mipInfos the streamer derived (mismatched ImageDescription vs compiled data), truncated or partially copied .bin storage files, or assets compiled by a different version.

Common situations: Corrupted or incompletely copied game content; mixing compiled assets and headers from different builds; manually regenerated storage files that dropped mip chunks.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14). Data as JSON: /api/errors/2e354a5bc504e8fe. Report an issue: GitHub.

Appendix: source

Thrown at sources/engine/Stride.Rendering/Streaming/StreamingTexture.cs:300

            {
                Storage.LockChunks();

                // Setup texture description
                TextureDescription newDesc = description;
                var newHighestResidentMipIndex = TotalMipLevels - mipsCount;
                newDesc.MipLevelCount = mipsCount;
                var topMip = mipInfos[description.MipLevels - newDesc.MipLevelCount];
                newDesc.Width = topMip.Width;
                newDesc.Height = topMip.Height;

                // Load chunks
                var mipsData = new IntPtr[mipsCount];
                for (var mipIndex = 0; mipIndex < mipsCount; mipIndex++)
                {
                    var totalMipIndex = newHighestResidentMipIndex + mipIndex;
                    var chunk = Storage.GetChunk(totalMipIndex);
                    if (chunk == null)
                        throw new ContentStreamingException("Data chunk is missing.", Storage);

                    if (chunk.Size != mipInfos[totalMipIndex].TotalSize)
                        throw new ContentStreamingException("Data chunk has invalid size.", Storage);

                    var data = chunk.GetData(fileProvider);
                    if (!chunk.IsLoaded)
                        throw new ContentStreamingException("Data chunk is not loaded.", Storage);

                    if (cancellationToken.IsCancellationRequested)
                        return;

                    mipsData[mipIndex] = data;
                }

                // Get data boxes
                var dataBoxIndex = 0;
                var dataBoxes = new DataBox[newDesc.MipLevelCount * newDesc.ArraySize];
                for (var arrayIndex = 0; arrayIndex < newDesc.ArraySize; arrayIndex++)

View on GitHub (pinned to 96fad776d2)