Skip to content

Fix Filament crash when hiding geom groups - #3543

Open
nico-bohlinger wants to merge 1 commit into
google-deepmind:mainfrom
nico-bohlinger:codex/fix-filament-geom-visibility
Open

Fix Filament crash when hiding geom groups#3543
nico-bohlinger wants to merge 1 commit into
google-deepmind:mainfrom
nico-bohlinger:codex/fix-filament-geom-visibility

Conversation

@nico-bohlinger

Copy link
Copy Markdown

Hey!

I ran into a repeatable Studio crash with the Filament renderer when toggling a geom group visibility. The program terminated with an uncaught utils::PreconditionPanic.

When a geom group was hidden, its renderables were removed from the scene and no longer prepared for the next frame. Their material instances therefore appeared unused and were destroyed, even though the hidden entities still referenced them. Filament rejected that destruction and aborted.

I simply reset the renderable to Filament's default material before removing it from the scene. I also initialized the cached material key and added a test that renders a geom, hides its group, renders again, and then shows it again.

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.

1 participant