Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix find_current_keyframe panic #12931

Merged
merged 1 commit into from Apr 13, 2024

Conversation

blukai
Copy link
Contributor

@blukai blukai commented Apr 11, 2024

Objective

i downloaded a random model from sketchfab (https://sketchfab.com/3d-models/dragon-glass-fe00cb0ecaca4e4595874b70de7e116b) to fiddle with bevy and encountered a panic when attempted to play animations:

thread 'Compute Task Pool (3)' panicked at /home/username/code/bevy/crates/bevy_animation/src/lib.rs:848:58:
index out of bounds: the len is 40 but the index is 40

"Animation / Animated Fox" (https://github.com/bevyengine/bevy/blob/5caf085dacf74bf553a0428a5eb7f4574a9bb99c/examples/animation/animated_fox.rs) example can be used for reproduction. to reproduce download a model from sketchfab (link above) and load it instead of loading fox.glb, keep only dragon_glass.glb#Animation0 and remove 1 and 2 -> run and wait 1-2 seconds for crash to happen.

Solution

correct keyframe indexing, i guess

i downloaded a random model from sketchfab (https://sketchfab.com/3d-models/dragon-glass-fe00cb0ecaca4e4595874b70de7e116b) to fiddle with bevy and encountered a panic when attempted to play animations:
```
thread 'Compute Task Pool (3)' panicked at /home/username/code/bevy/crates/bevy_animation/src/lib.rs:848:58:
index out of bounds: the len is 40 but the index is 40
```

"Animation / Animated Fox" (https://github.com/bevyengine/bevy/blob/5caf085dacf74bf553a0428a5eb7f4574a9bb99c/examples/animation/animated_fox.rs) example can be used for reproduction.
to reproduce download a model from sketchfab (link above) and load it instead of loading fox.glb, keep only `dragon_glass.glb#Animation0` and remove `1` and `2` -> run and wait 1-2 seconds for crash to happen.
Copy link
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@NthTensor NthTensor added C-Crash A sudden unexpected crash A-Animation Make things move and change over time labels Apr 12, 2024
@mockersf mockersf added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Apr 13, 2024
@mockersf mockersf added this pull request to the merge queue Apr 13, 2024
Merged via the queue into bevyengine:main with commit 9622557 Apr 13, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Animation Make things move and change over time C-Crash A sudden unexpected crash S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants