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

Prevent GDExtensions from trying to remove editor plugins at shutdown #79492

Conversation

dsnopek
Copy link
Contributor

@dsnopek dsnopek commented Jul 14, 2023

@Zylann
Copy link
Contributor

Zylann commented Jul 16, 2023

If it would be a mistake from extension devs trying to remove plugins when they shouldnt, would it possible to log an error to indicate that something is wrong?

@dsnopek
Copy link
Contributor Author

dsnopek commented Jul 16, 2023

It's not necessarily a mistake from devs. If a GDExtension is getting unloaded at shutdown, the extension shouldn't remove it's editor plugins (it should be a no-op), but if it's getting unloaded at any other time (even though you'd never do that currently because it'd break in other ways :-)) then it should remove them. But the dev really has no way to tell the difference.

@YuriSizov YuriSizov modified the milestones: 4.x, 4.2 Jul 17, 2023
Copy link
Contributor

@YuriSizov YuriSizov left a comment

Choose a reason for hiding this comment

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

Makes sense to me

@YuriSizov YuriSizov merged commit 6237870 into godotengine:master Jul 25, 2023
13 checks passed
@YuriSizov
Copy link
Contributor

Thanks!

@dsnopek dsnopek deleted the gdextension-remove-editor-plugins-at-shutdown branch July 22, 2024 15:27
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.

Removing an EditorPlugin results in a use-after-free
3 participants