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

All external resource IDs change on save after restarting Godot #77797

Closed
lostminds opened this issue Jun 3, 2023 · 6 comments
Closed

All external resource IDs change on save after restarting Godot #77797

lostminds opened this issue Jun 3, 2023 · 6 comments
Labels

Comments

@lostminds
Copy link

Godot version

4.1.dev4

System information

macOS 13.3.1

Issue description

When trying out the new 4.1.dev4 build (having tried previous 4.1 versions) I noticed I was getting a lot of resource ID updates in my git diffs, even though I wasn't making any changes to the files in question. See for example:

Screenshot 2023-06-03 at 12 16 38

At first I figured it might be normal after updating the project to 4.1 (from 4.0.3) but the ids kept changing, and after a little investigation I think I've found a way to reproduce the issue, and I think it's a bug. Probably mostly harmless, but annoying as it will cause a lot of pointless updates in your repository.

Steps to reproduce

  • Have a project with a scene open that has some linked external resources (maybe textures, packed scenes, whatever) so any non-empty scene will do scene.
  • Observe the "external resource IDs" (if that's the proper term) for each resource and linked scene.
  • Quit Godot
  • Restart Godot
  • Without making any changes, save the open scene (or run the project which also saves the scen)
  • Observe that all "external resource IDs" for the scene and all linked resources have changed.

Saving again without restarting will not change the IDs again. But they always change the first time you save after restarting Godot. So it seems like an issue with how resource IDs are generated or assigned, and that this generator is somehow reset on editor restart. So that it will not generate/assign the same IDs next time you save after a restart.

Minimal reproduction project

In my testing it affects all scenes I've tried and you should be able to test this by just quitting and restarting then saving any scene you have with external resources to see if you get the same issue.

@AThousandShips
Copy link
Member

AThousandShips commented Jun 3, 2023

Fixed but not in time for latest snapshot

@lostminds
Copy link
Author

@AThousandShips are you sure this is a duplicate? While they seem related #77172 seems to indicate that the IDs are changed on each save. I'm not seeing that issue in 4.0.dev4, I only see the issue if I restart the editor in between saves?

@AThousandShips
Copy link
Member

Okay! have you tested latest version to check that this isn't fixed by the same fix?

@lostminds
Copy link
Author

No, I've only tested in the 4.1dev4 build, I've never built Godot from source and I'm not sure I'm ready to do that. But if someone has an up to date build it should be relatively easy to test: just save, restart the editor and save a scene again and see if the IDs are changed. If you don't get the issue I guess we can assume it was fixed by the same fix and close this issue too.

@AThousandShips
Copy link
Member

I can't reproduce on latest version so seems to be fixed

@lostminds
Copy link
Author

That's great! Thanks for the quick feedback, I'll close this then.

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

No branches or pull requests

3 participants