{"record":{"id":"6fe26324c79e9d8e","repo":"bevyengine/bevy","slug":"out-of-bounds-x-x-y-y-z-z","errorCode":null,"errorMessage":"out of bounds (x: {x}, y: {y}, z: {z})","messagePattern":"out of bounds \\(x: (.+?), y: (.+?), z: (.+?)\\)","errorType":"exception","errorClass":"TextureAccessError","httpStatus":null,"severity":"error","filePath":"crates/bevy_image/src/image.rs","lineNumber":2269,"sourceCode":"    /// Attempted to access a pixel outside the texture bounds.\n    #[error(\"out of bounds (x: {x}, y: {y}, z: {z})\")]\n    OutOfBounds {\n        /// The pixel x-coordinate.\n        x: u32,\n        /// The pixel y-coordinate.\n        y: u32,\n        /// The pixel z-coordinate.\n        z: u32,\n    },\n    /// Attempted to perform an image operation on an unsupported texture format.\n    ///\n    /// Most often this is returned when attempting to access pixel data of compressed textures.\n    #[error(\"unsupported texture format: {0:?}\")]\n    UnsupportedTextureFormat(TextureFormat),\n    /// Attempted to access the data of an image before it was initialized, or after it was moved\n    /// to the GPU.\n    ///\n    /// See [`RenderAssetUsages`] for more information about when an asset's data is moved, and\n    /// how to retain it if necessary.\n    #[error(\"image data is not initialized\")]\n    Uninitialized,\n    /// The texture's dimension was different than indicated by the accessor used.\n    #[error(\"attempt to access texture with different dimension\")]\n    WrongDimension,\n}\n\n/// An error that occurs when loading a texture.\n#[derive(Error, Debug)]\npub enum TextureError {\n    /// Image MIME type is invalid.\n    #[error(\"invalid image mime type: {0}\")]\n    InvalidImageMimeType(String),\n    /// Image extension is invalid.\n    #[error(\"invalid image extension: {0}\")]\n    InvalidImageExtension(String),\n    /// Failed to load an image.","sourceCodeStart":2251,"sourceCodeEnd":2287,"githubUrl":"https://github.com/bevyengine/bevy/blob/8d743eb7dc7fcff57a7d5744d0bbf89620b1b145/crates/bevy_image/src/image.rs#L2251-L2287","documentation":"Texture access error variant fired when a caller indexes a pixel with x/y/z coordinates outside the texture's dimensions. x must be < width, y < height, z < depth_layer_or_dimension; any coordinate equal to or beyond its dimension is rejected.","triggerScenarios":"Thrown at crates/bevy_image/src/image.rs:2252 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Clamp coordinates to the image extent before access","Check the image texture_size against the coordinate before indexing","Fix off-by-one errors such as using width instead of width-1 for the max x"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8d743eb7dc7fcff57a7d5744d0bbf89620b1b145","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}