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

Defer creating new editor process in "Quit to Project List" just like in "Reload Current Project" #85654

Merged

Conversation

Listwon
Copy link
Contributor

@Listwon Listwon commented Dec 2, 2023

Possible fix for #40968
Reload Current Project creates new editor process when all of the files used by editor are closed (as in FileAccess closed).
I was investigating the issue #40968 - why Quit to Project List was wiping my editor settings and the list of recently opened projects. I've noticed that my debug logs from closing files were mixed with new editor instance logs, meaning that in some cases they could collide in file locks.
Using the solution from Reload Current Project (deferring with OS::get_singleton()->set_restart_on_exit(true, args);) prevents it.

It has to be applied to 3.x too, originally I've encountered the #40968 issue in multiple 3.x versions (recently in 3.5.2 Mono).

Bugsquad edit:

Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

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

Looks like a safe fix. We could look into unifying the code in restart_editor() and RUN_PROJECT_MANAGER, because they are very similar. That's for later though.

@akien-mga akien-mga merged commit 1ad905c into godotengine:master Jul 28, 2024
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@akien-mga akien-mga added cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release topic:editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When quitting the editor to the project list, editor settings are lost
4 participants