{"record":{"id":"d4a340d06752d670","repo":"stride3d/stride","slug":"missing-content-storage","errorCode":null,"errorMessage":"Missing content storage.","messagePattern":"Missing content storage\\.","errorType":"exception","errorClass":"ContentStreamingException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Graphics/Data/ImageTextureSerializer.cs","lineNumber":60,"sourceCode":"            else\n            {\n                textureData.Save(stream.UnderlyingStream, ImageFileType.Stride);\n            }\n        }\n\n        public override object Construct(ContentSerializerContext context)\n        {\n            return new Image();\n        }\n\n        private static unsafe void DeserializeImage(ContentManager contentManager, Image obj, ref ImageDescription imageDescription, ref ContentStorageHeader storageHeader)\n        {\n            using (var content = new ContentStreamingService())\n            {\n                // Get content storage container\n                var storage = content.GetStorage(ref storageHeader);\n                if (storage == null)\n                    throw new ContentStreamingException(\"Missing content storage.\");\n                storage.LockChunks();\n\n                // Cache data\n                var fileProvider = contentManager.FileProvider;\n                var format = imageDescription.Format;\n\n                // Calculate total size\n                int size = 0;\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\n                    size += slicePitch;","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Graphics/Data/ImageTextureSerializer.cs#L42-L78","documentation":"ImageTextureSerializer.DeserializeImage resolves texture data through a ContentStreamingService, which must yield a non-null content storage container via GetStorage. A null storage means the content URL/header could not be resolved against any registered storage, so a ContentStreamingException is thrown before reading image chunks.","triggerScenarios":"Deserializing a texture asset whose content URL cannot be matched to a mounted content storage (missing/incorrect database/mount), or a corrupted content header (ContentContentHeader) with no matching storage container.","commonSituations":"Loading a game package where the raw asset files were not included in the build; a renamed or moved Assets/ content directory; mounting a database that does not contain the referenced texture.","solutions":["Verify the content storage/database containing the texture is mounted on the ContentManager's file provider.","Check that the asset's content URL matches an entry in the content database (rebuild the asset package).","Ensure all referenced assets were compiled and shipped with the build (check .pkg bundles).","Inspect the storage header for corruption and re-export the affected asset."],"exampleFix":"// before\nvar provider = new VirtualFileProviderFactory(); // no database mounted\n// after\nvar provider = new FileSystemProvider(String.Empty, ContentDirectory);\ncontentManager.FileProvider = provider; // storage resolvable before DeserializeImage","handlingStrategy":"try-catch","validationCode":"// before deserialization, verify the content database is mounted\nif (!contentManager.FileProvider.FileExists(url))\n    throw new FileNotFoundException(url);","typeGuard":"bool HasStorage(object storage) => storage != null;","tryCatchPattern":"try { image = DeserializeImage(...); }\ncatch (ContentStreamingException ex) when (ex.Message == \"Missing content storage.\")\n{\n    // remount the content database / rebuild asset package, then retry\n}","preventionTips":["Mount all content databases before loading assets.","Rebuild asset packages after renaming assets.","Verify shipped builds include all referenced textures."],"tags":["graphics","content","texture","asset-loading"],"backgroundTag":"resource-not-found","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"}