Large-object slab creation fails for index buffers whose size is not a multiple of 4
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
Research direction
Start in slab_allocator.rs at the Slab::LargeObject branch around line 1050 and compare its buffer sizing with the general slab path. Check how COPY_BUFFER_ALIGNMENT is applied, then reproduce with an odd number of u16 indices and mapped-at-creation buffers. Done means large-object slab buffers satisfy the 4-byte alignment requirement and the reported validation failure is covered.
Written by the indexing model from the issue text.
Description
Version: bevy 0.20.1 (slab_allocator.rs, Slab::LargeObject branch, about line 1050).
What happens: with SlabAllocatorSettings { large_threshold: 0, .. }, or any mesh above
the threshold with an odd number of u16 indices, create_buffer with
mapped_at_creation: true fails validation: "Buffers that are mapped at creation have to be
aligned to COPY_BUFFER_ALIGNMENT". The next line, get_mapped_range_mut().unwrap(), then
panics: MapRangeError(... Buffer with 'large mesh slab N (index buffer)' label is invalid).
Suggested fix: round the buffer size up to COPY_BUFFER_ALIGNMENT (4) when creating
large-object slabs, as the general slabs presumably do.
- Dominant language
- Rust
- Stars
- 49.8k
- Forks
- 5.1k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 136
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bevyengine/bevy
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
bevyengine/bevy#26642 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
bevyengine/bevy#26641 ·
Maintainers usually reply within 2 days
-
A-Animation AI-Assisted C-Bug D-Trivial S-Needs-Triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bevyengine/bevy#26637 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bevyengine/bevy#26635 ·
Maintainers usually reply within 2 days
-
Feathers checkbox outline should have flex_shrink: 0Possibly taken @Tatsuya0330 claimed this today. OpenC-Bug S-Needs-Triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
bevyengine/bevy#26630 ·
Maintainers usually reply within 2 days
Similar issues
-
go good first issue test
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
bug triaged tui ux wontfix
Difficulty 2/5 Half a day Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day