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 Headless --import --quit crashes editor #98063

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

TCROC
Copy link
Contributor

@TCROC TCROC commented Oct 10, 2024

Fixes this issue here:

#98062

addon_name_to_plugin.clear(); should be called due to the fact each plugin in addon_name_to_plugin was just deleted in the preceding for loop. Future attempts to access the items in addon_name_to_plugin after memdelete was called result in crashes.

@TCROC TCROC requested a review from a team as a code owner October 10, 2024 15:33
@AThousandShips AThousandShips modified the milestones: 4.x, 4.4 Oct 11, 2024
@Repiteo Repiteo requested review from a team and removed request for a team October 12, 2024 13:34
@clayjohn clayjohn requested a review from bruvzg October 23, 2024 23:52
Copy link
Member

@clayjohn clayjohn 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. Would be good to have @bruvzg's approval too before merging

@jamie-pate
Copy link
Contributor

jamie-pate commented Oct 24, 2024

I can confirm that this patch fixes the crash.

@bruvzg
Copy link
Member

bruvzg commented Oct 24, 2024

If Main::iteration() has deleted all the plugns then it seems like import tasks relying on those plugins will either

It is deleting plugins only when exiting, and Main::iteration have a check to wait for running importers and unset exit flag, this should not be possible.

@Repiteo Repiteo merged commit da01b2a into godotengine:master Oct 24, 2024
19 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Oct 24, 2024

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.

Headless --import --quit crashes editor
6 participants