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 crash when using BVH animations #188

Merged
merged 1 commit into from
Mar 25, 2021
Merged

Conversation

chapulina
Copy link
Contributor

🦟 Bug fix

Summary

Actors using BVH animations have been crashing ign-gazebo, probably since #136, see #136 (comment).

The problem is that we were creating a temporary Skeleton, getting a pointer to its animation, and then deleting the original skeleton. Now that the skeleton is properly destroyed, we also destroy that pointer. The solution is to make a copy so we can keep ownership.

This needs to be backported to ign-common3, I'm targeting main so we can get it into Edifice's first release. I believe this is a critical bug fix.

@adlarkin , I believe you've been looking into this. Maybe you can see if this works?

Checklist

  • Signed all commits for DCO
  • Added tests - I suggest we just manually test this right now, and after Edifice's release we come back to add proper tests.
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

@chapulina chapulina added bug Something isn't working beta Targeting beta release of upcoming collection labels Mar 25, 2021
@chapulina chapulina requested a review from adlarkin March 25, 2021 20:53
@github-actions github-actions bot added the 🏢 edifice Ignition Edifice label Mar 25, 2021
@codecov
Copy link

codecov bot commented Mar 25, 2021

Codecov Report

Merging #188 (650892d) into main (b68fd3a) will decrease coverage by 0.01%.
The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #188      +/-   ##
==========================================
- Coverage   75.49%   75.48%   -0.02%     
==========================================
  Files          73       73              
  Lines       10346    10349       +3     
==========================================
+ Hits         7811     7812       +1     
- Misses       2535     2537       +2     
Impacted Files Coverage Δ
graphics/src/Skeleton.cc 42.22% <57.14%> (-0.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b68fd3a...650892d. Read the comment docs.

Copy link
Contributor

@adlarkin adlarkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to fix the actor crashing issue. However, I still see this error that was mentioned in gazebosim/gz-sim#647 when I run one of the example actor worlds (for example, actor.sdf or actor_crowd.sdf):

[GUI] [Err] [RenderUtil.cc:919] invalid animation update data

It looks like this is coming from the RenderUtil class in ign-gazebo, so I'm not sure if this issue can be fixed in this PR or not. Any thoughts? Should we just merge this first to fix the critical bug, and then try to resolve this error message later?

Also, this PR may be able to close gazebosim/gz-sim#647, unless we want to leave that issue open while we resolve the RenderUtil error message.

@chapulina
Copy link
Contributor Author

this PR may be able to close gazebosim/gz-sim#647

Oh thanks! I totally forgot there was an issue for this!

It looks like this is coming from the RenderUtil class in ign-gazebo

I also see that. Yeah I suspect that's something to be fixed on the ign-gazebo side. The animation seems to work for me even when the error is printed, so I think that's not critical to fix.

leave that issue open while we resolve the RenderUtil error message.

That works for me. I think we also shouldn't close it until this is backported and we add some tests.

Copy link
Contributor

@adlarkin adlarkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All that sounds good, let's get this merged in and fix the crash before the release 🚢 🚀

@chapulina chapulina enabled auto-merge (squash) March 25, 2021 22:35
@chapulina chapulina merged commit d3cd29a into main Mar 25, 2021
@chapulina chapulina deleted the chapulina/4/skel_crash branch March 25, 2021 22:49
adlarkin added a commit that referenced this pull request Apr 12, 2021
adlarkin added a commit that referenced this pull request Apr 28, 2021
adlarkin added a commit that referenced this pull request Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta Targeting beta release of upcoming collection bug Something isn't working 🏢 edifice Ignition Edifice
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants