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 physics platform crash #88947

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

lawnjelly
Copy link
Member

@lawnjelly lawnjelly commented Feb 28, 2024

Physics body previously stored the RID of a collision object and accessed it on the next frame, leading to a crash if the object had been deleted. This PR checks the object still exists via the ObjectID prior to access.

Fixes 4.x version of #74732
4.x port of #88946

Notes

Physics body previously stored the RID of a collision object and accessed it on the next frame, leading to a crash if the object had been deleted.
This PR checks the object still exists via the ObjectID prior to access.
@lawnjelly lawnjelly requested a review from a team as a code owner February 28, 2024 08:29
@akien-mga akien-mga added this to the 4.3 milestone Feb 28, 2024
@akien-mga akien-mga requested a review from a team February 28, 2024 09:05
Copy link
Contributor

@fabriceci fabriceci left a comment

Choose a reason for hiding this comment

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

I can't speak for the best approach, but the solution is simple and fixes the bug, despite its drawbacks. I'll let someone else choose the best approach.

@akien-mga
Copy link
Member

Let's go with this for now and revisit a potential better / more core solution in the future.

@akien-mga akien-mga merged commit 7900597 into godotengine:master Mar 1, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants