{"record":{"id":"64bff1e1b95a84d8","repo":"stride3d/stride","slug":"data-chunk-is-not-loaded","errorCode":null,"errorMessage":"Data chunk is not loaded.","messagePattern":"Data chunk is not loaded\\.","errorType":"exception","errorClass":"ContentStreamingException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Graphics/Data/ImageTextureSerializer.cs","lineNumber":108,"sourceCode":"                {\n                    // Load image data to the buffer\n                    var bufferPtr = buffer;\n                    for (int arrayIndex = 0; arrayIndex < imageDescription.ArraySize; arrayIndex++)\n                    {\n                        for (int mipIndex = 0; mipIndex < imageDescription.MipLevels; mipIndex++)\n                        {\n                            var (mipWidth, mipHeight) = Image.GetMipDimensions(format, imageDescription.Width, imageDescription.Height, mipIndex);\n\n                            int rowPitch, slicePitch;\n                            int widthPacked;\n                            int heightPacked;\n                            Image.ComputePitch(format, mipWidth, mipHeight, out rowPitch, out slicePitch, out widthPacked, out heightPacked);\n                            var chunk = storage.GetChunk(mipIndex);\n                            if (chunk == null || chunk.Size != slicePitch * imageDescription.ArraySize)\n                                throw new ContentStreamingException(\"Data chunk is missing or has invalid size.\", storage);\n                            var data = chunk.GetData(fileProvider);\n                            if (!chunk.IsLoaded)\n                                throw new ContentStreamingException(\"Data chunk is not loaded.\", storage);\n\n                            MemoryUtilities.CopyWithAlignmentFallback((void*)bufferPtr, (void*)data, (uint)chunk.Size);\n                            bufferPtr += chunk.Size;\n                        }\n                    }\n\n                    // Initialize image\n                    var image = new Image(imageDescription, buffer, 0, null, true);\n                    obj.InitializeFrom(image);\n                }\n                catch\n                {\n                    // Free memory in case of error\n                    MemoryUtilities.Free(buffer);\n\n                    throw;\n                }\n","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Graphics/Data/ImageTextureSerializer.cs#L90-L126","documentation":"After fetching the mip-level chunk's data pointer via GetData, the serializer verifies chunk.IsLoaded. If the chunk's data is not actually resident in memory (GetData did not successfully load it from the underlying file provider), the load is aborted with this error. It means the content storage promised the chunk but the data could not be materialized from the file provider.","triggerScenarios":"Calling DeserializeImage when storage.GetChunk(mipIndex).GetData(fileProvider) fails to load data (file provider cannot read/locate the underlying data stream), leaving IsLoaded false.","commonSituations":"Missing or unreadable asset data files on disk; file provider misconfigured (wrong mount/base path) in a packaged game; deleted intermediate content files; permission issues preventing the content loader from reading asset data.","solutions":["Verify the data files the file provider resolves actually exist and are readable at the path used at runtime.","Check ContentManager/file provider setup (asset mounts, database file paths) matches where content was deployed.","Rebuild/repackage content so chunk data files are regenerated and present.","Check file permissions and that nothing (antivirus, cleaner) deletes asset data at runtime."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"var chunk = storage.GetChunk(mipIndex);\nchunk?.GetData(fileProvider); // force load and surface IO errors early\nbool loaded = chunk?.IsLoaded == true;","typeGuard":"bool IsChunkLoaded(StorageChunk chunk) => chunk?.IsLoaded == true;","tryCatchPattern":"try\n{\n    texture = DeserializeImage(stream, ...);\n}\ncatch (ContentStreamingException ex)\n{\n    log.Error(ex, \"Chunk data not loaded; check file provider and asset files\");\n    // re-deploy or rebuild content, or use fallback texture\n}","preventionTips":["Verify the runtime file provider points at the deployed content directory","Do not delete or clean asset data files while the app runs","Wrap content loading with existence checks on the data files","Package content with the matching build tool version"],"tags":["content-pipeline","textures","file-io","stride"],"backgroundTag":"file-read-failed","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}