{"record":{"id":"fcf6ef83a9ad7f93","repo":"bevyengine/bevy","slug":"data-buffer-should-exist-with-that-bindless-index","errorCode":null,"errorMessage":"Data buffer should exist with that bindless index","messagePattern":"Data buffer should exist with that bindless index","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/bevy_render/src/material_bind_groups.rs","lineNumber":1412,"sourceCode":"            // Free the binding. If the resource in question was anything other\n            // than a data buffer, then it has a reference count and\n            // consequently we need to decrement it.\n            let decrement_allocated_resource_count = match *bindless_resource_type {\n                BindlessResourceType::None => false,\n                BindlessResourceType::Buffer => self\n                    .buffers\n                    .get_mut(&bindless_index)\n                    .expect(\"Buffer should exist with that bindless index\")\n                    .remove(bindless_binding),\n                BindlessResourceType::ShaderBuffer => self\n                    .shader_buffers\n                    .get_mut(&bindless_index)\n                    .expect(\"Shader buffer should exist with that bindless index\")\n                    .remove(bindless_binding),\n                BindlessResourceType::DataBuffer => {\n                    self.data_buffers\n                        .get_mut(&bindless_index)\n                        .expect(\"Data buffer should exist with that bindless index\")\n                        .remove(bindless_binding);\n                    false\n                }\n                BindlessResourceType::SamplerFiltering\n                | BindlessResourceType::SamplerNonFiltering\n                | BindlessResourceType::SamplerComparison => self\n                    .samplers\n                    .get_mut(bindless_resource_type)\n                    .expect(\"Sampler array should exist\")\n                    .remove(bindless_binding),\n                BindlessResourceType::Texture1d\n                | BindlessResourceType::Texture2d\n                | BindlessResourceType::Texture2dArray\n                | BindlessResourceType::Texture3d\n                | BindlessResourceType::TextureCube\n                | BindlessResourceType::TextureCubeArray => self\n                    .textures\n                    .get_mut(bindless_resource_type)","sourceCodeStart":1394,"sourceCodeEnd":1430,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_render/src/material_bind_groups.rs#L1394-L1430","documentation":"Internal invariant expect in the bindless allocator's free path: a shader-data buffer entry was being freed under a bindless index that has no recorded data buffer, indicating allocator state corruption.","triggerScenarios":"Thrown at crates/bevy_render/src/material_bind_groups.rs:1412 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Report as a Bevy engine bug with a reproducing project","Avoid the sequence of material add/remove operations that triggers it"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}