{"record":{"id":"a0840b849522848f","repo":"bevyengine/bevy","slug":"fallback-buffer-should-exist","errorCode":null,"errorMessage":"Fallback buffer should exist","messagePattern":"Fallback buffer should exist","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/bevy_render/src/material_bind_groups.rs","lineNumber":1960,"sourceCode":"\n    /// Accumulates buffer binding arrays into binding resource arrays suitable\n    /// for `wgpu`.\n    fn create_buffer_binding_resource_arrays<'a, 'b>(\n        &'a self,\n        binding_resource_arrays: &'b mut Vec<(&'a u32, BindingResourceArray<'a>)>,\n        fallback_buffers: &'a HashMap<BindlessIndex, Buffer>,\n        shader_buffer_assets: &'a RenderAssets<GpuShaderBuffer>,\n        bindless_descriptor: &'a BindlessDescriptor,\n        required_binding_array_size: Option<u32>,\n    ) {\n        for bindless_buffer_descriptor in bindless_descriptor.buffers.iter() {\n            // If this is a raw buffer, create the binding.\n            if let Some(buffer_bindless_binding_array) =\n                self.buffers.get(&bindless_buffer_descriptor.bindless_index)\n            {\n                let fallback_buffer = fallback_buffers\n                    .get(&bindless_buffer_descriptor.bindless_index)\n                    .expect(\"Fallback buffer should exist\");\n\n                let mut buffer_bindings: Vec<_> = buffer_bindless_binding_array\n                    .bindings\n                    .iter()\n                    .map(|maybe_bindless_binding| {\n                        let buffer = match *maybe_bindless_binding {\n                            None => fallback_buffer,\n                            Some(ref bindless_binding) => &bindless_binding.resource,\n                        };\n                        BufferBinding {\n                            buffer,\n                            offset: 0,\n                            size: None,\n                        }\n                    })\n                    .collect();\n\n                if let Some(required_binding_array_size) = required_binding_array_size {","sourceCodeStart":1942,"sourceCodeEnd":1978,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_render/src/material_bind_groups.rs#L1942-L1978","documentation":"Panic in create_buffer_binding_resource_arrays: a bindless descriptor references a fallback buffer index that has no entry in the fallback_buffers map. Fallback buffers are created for every bindless slot at startup, so absence indicates initialization was skipped or corrupted.","triggerScenarios":"Thrown at crates/bevy_render/src/material_bind_groups.rs:1960 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Report as a Bevy engine bug with a reproducing project","Avoid the buffer-heavy bindless material setup 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"}