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 uid:// paths fail to load at editor startup #95689

Merged

Conversation

Hilderin
Copy link
Contributor

@Hilderin Hilderin commented Aug 17, 2024

The issue was caused by a call deferred to ResourceUID::get_singleton()->clear in the constructor of EditorFileSystem. Now that the plugin are created after the creation of EditorFileSystem the uid loaded from cache were removed before the plugins were created in the first scan process.

Note: Even in 4.2.2 when the uid cache file uid_cache.bin is missing, the same error occurs: Condition "!unique_ids.has(p_id)" is true because the uid are loaded only from the cache before the plugins are created. The same problem still occurs with this PR and short of scanning all the .import files before loading the plugins just for the uid, I don't see an solution for that.

Edit: Added the issue #95535

@akien-mga akien-mga changed the title Fix uid:// Paths Fail to Load at Editor Startup Fix uid:// paths fail to load at editor startup Aug 17, 2024
@akien-mga
Copy link
Member

Might also solve #95535 which may be a duplicate of the other issue, CC @TheDuriel.

@Hilderin
Copy link
Contributor Author

Indeed, I tested this PR with the MRP from #95535 (comment) and the issue is fixed. Same here, the first time loading the project, I got the errors and restarting the editor fixes them.

@TheDuriel
Copy link
Contributor

Will gladly test if someone can provide a windows build. Still suffering build errors on my end.

@Hilderin
Copy link
Contributor Author

Hilderin commented Aug 17, 2024

@TheDuriel
You can always find built executable (artifact) for each PR on Github. I don't know if there's an easier way to access them, but I use the Checks tab:
image

Click on summary link on the left:
image

At the bottom you have all the artifacts:
image

For windows:
https://github.com/godotengine/godot/actions/runs/10431889561/artifacts/1822912370

@TheDuriel
Copy link
Contributor

TheDuriel commented Aug 17, 2024

Awesome.

Can confirm then, this PR fixes all my errors, including ones not caused by autoloads.

@mpewsey
Copy link

mpewsey commented Aug 19, 2024

Looks good from my standpoint on #95562 as well.

Thanks for taking the time to fix this 😄

@akien-mga akien-mga added the cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release label Aug 19, 2024
@akien-mga akien-mga merged commit 846f43c into godotengine:master Aug 19, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 4.3.1.

@akien-mga akien-mga removed the cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants