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

crash in debug filament where the scene gets deleted before the assets #130

Open
hannojg opened this issue Apr 20, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@hannojg
Copy link
Member

hannojg commented Apr 20, 2024

Steps to reproduce:

  • Build filament in debug mode
  • Run the example app, open Animation Transition example
  • Press reload
  • The app will crash with an assert error saying that we tried to call destroyMaterials although there are still active instances.

Details

For some reason it seems that the scenes shared_ptr deleter function is called before the assets deleter functions. Thats odd because the assets deleter function depends on the scene by copy, meaning it still holds a reference to the scene, so it shouldn't be deleted yet.

Note

We ship filament as release version, and there the assert is ignored. Additionally when we destroy the engine it's actually so kind to cleanup any left over resources for us, since it's not that much of a concern.
However, we should build everything in a way that it won't crash on the filament debug build, to ensure we are using it correctly! Plus it makes debugging better (as otherwise you will get crashes in your debugging session like this one that might not be related to your actual issue at hand).

@hannojg hannojg added the bug Something isn't working label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant