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

override.cfg gets pulled into project.godot on reload when external modifications are detected #92583

Closed
dozingpip opened this issue May 31, 2024 · 3 comments · Fixed by #92633

Comments

@dozingpip
Copy link
Contributor

dozingpip commented May 31, 2024

Tested versions

3.5.3.stable.mono

System information

Windows 10 - Godot 3.5.3.stable.mono

Issue description

Related to #30912 , but not quite the same.
When Godot reloads the project due to external modification, any override.cfg changes are applied directly to project.godot. External modification can happen frequently if say, I keep the project open when I do a git pull for changes from my co-developer. ( my co-dev is #30912 (comment))
His theory as to what the problem is: "There's a parameter in the project load function "p_ignore_override" which is supposed to be set to true when loading from the editor. But they forgot to set that parameter to true specifically when reloading the file due to external modifications."

Steps to reproduce

  1. Open the minRepro project, and open Node2D.tscn
  2. Open Node2D.tscn in a text editor
  3. Modify the tscn in the text editor somehow, ie change the name of "Node2D" to "Node2Dtest" or something, and save
  4. Go back to the Godot, pick "Reload" when asked
  5. project.godot file has been modified to pull in the modified test window size I have in override.cfg.

Minimal reproduction project (MRP)

minRepro.zip

@KoBeWi KoBeWi modified the milestones: 4.2, 3.x May 31, 2024
@KoBeWi
Copy link
Member

KoBeWi commented May 31, 2024

I just had this happen in 4.3 beta1, but I have no idea how. It's related to reloading, but I couldn't reproduce it with the MRP and it doesn't seem to happen consistently.

There's a parameter in the project load function "p_ignore_override" which is supposed to be set to true when loading from the editor. But they forgot to set that parameter to true specifically when reloading the file due to external modifications.

That's not the case both on master and in 3.x

ProjectSettings::get_singleton()->setup(ProjectSettings::get_singleton()->get_resource_path(), String(), true);

Unless the reload is done elsewhere.

@ace24713
Copy link

That's not the case both on master and in 3.x

Yes, it is the case on both master and in 3.x. Unless I'm mistaken p_ignore_override is the implicit 4th parameter to ProjectSettings::setup, which defaults to false on that line of code you linked. The 3rd one that's given as true there is p_upwards

see the declaration here:

Error setup(const String &p_path, const String &p_main_pack, bool p_upwards = false, bool p_ignore_override = false);

@KoBeWi
Copy link
Member

KoBeWi commented Jun 1, 2024

I know why I couldn't reproduce. The reload dialog buttons do the opposite of what they say.

@akien-mga akien-mga added this to the 4.3 milestone Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants