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

Track mesh dependencies in Dummy RenderingServer #102261

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

clayjohn
Copy link
Member

@clayjohn clayjohn commented Jan 31, 2025

Fixes: #86806

The root of the problem here is that there is that the mesh is getting freed before the MeshInstance. When the MeshInstance is freed, it has to flush pending updates. In that update it attempts to read info from the mesh, but the mesh is already freed. The solution is to use the dependency tracking system that already exists for this purpose.

This PR only solves the problem for MeshInstance/Mesh, but the problem exists for all the VisualInstance derived nodes. I checked out the other node types quickly and I can't recreate the problem with them. Most likely since their dependencies are of a different nature

@clayjohn clayjohn added this to the 4.4 milestone Jan 31, 2025
@clayjohn clayjohn requested a review from a team as a code owner January 31, 2025 21:01
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Looks straightforward.

@akien-mga akien-mga added the cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release label Jan 31, 2025
@akien-mga
Copy link
Member

@clayjohn I expect this should work as a 4.3 cherry-pick, right?

@clayjohn
Copy link
Member Author

I haven't checked, but I expect that it would, yes

@Repiteo Repiteo merged commit f230b9c into godotengine:master Feb 3, 2025
19 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Feb 3, 2025

Thanks!

@clayjohn clayjohn deleted the dummyrs-mesh-dependency branch February 3, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release topic:rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Parameter "m" is null." when creating then destroying a scene with a MeshInstance3D while headless.
3 participants