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

Prevent crash on Animation #3237

Merged
merged 1 commit into from
Oct 3, 2024
Merged

Prevent crash on Animation #3237

merged 1 commit into from
Oct 3, 2024

Conversation

HadesD
Copy link
Contributor

@HadesD HadesD commented Sep 29, 2024

No description provided.

@paroj
Copy link
Member

paroj commented Sep 29, 2024

can you provide some details where this crash happens? inside _getTimeIndex?

Also this is only triggered, if the animation is active without having any keyframes, right?

@HadesD
Copy link
Contributor Author

HadesD commented Sep 30, 2024

I'm not check so deep in to that crash, but i'm using old skel and maybe it is issue that make this crash happened
anyway, it crash at this line

auto it = std::lower_bound(mKeyFrameTimes.begin(), mKeyFrameTimes.end() - 1, timePos);

so I think in every case, we should check mKeyFrameTimes is empty or not.

@paroj
Copy link
Member

paroj commented Sep 30, 2024

I could not reproduce the crash with no keyframes on libstdc++ on linux. But maybe libc++ on android behaves differently.

Could you attach the skeleton for me to verify?

@HadesD
Copy link
Contributor Author

HadesD commented Oct 2, 2024

sorry for the project 's security, that can not share skeleton
But I think you can check UT if mKeyFrameTimes.empty() == true then I think it will be exception

@paroj paroj merged commit 03b0f23 into OGRECave:master Oct 3, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants