Bevy Panics when trying to load a single mesh from gltf file containing armature
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version
0.15 (happened on 0.14 too)
## Relevant system information
os: "Linux 22.04 Ubuntu"
kernel: "6.8.0-49-generic"
cpu: "Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz"
core_count: "4"
memory: "15.5 GiB"
AdapterInfo { name: "NVIDIA GeForce GTX 1050", vendor: 4318, device: 7309, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "535.183.01", backend: Vulkan}
## What you did
Tried to use specific mesh/primitive from Gltf file, that also contains armature inside
## What went wrong
Received wgpu error:
```
2024-12-22T13:38:16.509152Z ERROR wgpu::backend::wgpu_core: Handling wgpu errors as fatal by default
thread 'Compute Task Pool (2)' panicked at /home/patrick/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-23.0.1/src/backend/wgpu_core.rs:2976:18:
wgpu error: Validation Error
Caused by:
In RenderPass::end
In a draw command, kind: Draw
The BindGroupLayout with 'mesh_layout' label of current set BindGroup with 'model_only_mesh_bind_group' label at index 1 is not compatible with the corresponding BindGroupLayout with 'skinned_mesh_layout' label of RenderPipeline with 'pbr_opaque_mesh_pipeline' label
Expected entry with binding 1 not found in assigned bind group layout
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `bevy_render::renderer::render_system`!
thread 'main' panicked at /home/patrick/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-hal-23.0.1/src/vulkan/instance.rs:173:58:
Trying to destroy a SurfaceSemaphores that is still in use by a SurfaceTexture
```
## Additional information
[Minimal reproduction app](https://github.com/PatrickChodowski/gltf_bug) (you can comment and uncomment parts to test)
It contains 2 assets: They contain same mesh and material but one of the files also contains armature. File **without** armature loads correctly inside bevy, but the one **with** armature loads only as a scene. I dont like using scenes much, so I tried extracting mesh and material manually but it causes game to crash
Similar to https://github.com/bevyengine/bevy/issues/10810.
Contributor guide
Research direction
Start by running the linked Minimal reproduction app and comparing the two assets: the one without an armature loads, while manually extracting a mesh and material from the armature-containing asset panics. Inspect the mesh extraction and rendering path involved in that reproduction. Done means the selected mesh and material load without a wgpu validation panic, while preserving the existing scene-loading behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100