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

Project manager unable to resolve icon referenced by uid before import #101749

Closed
Draradech opened this issue Jan 18, 2025 · 3 comments · Fixed by #102664
Closed

Project manager unable to resolve icon referenced by uid before import #101749

Draradech opened this issue Jan 18, 2025 · 3 comments · Fixed by #102664

Comments

@Draradech
Copy link

Draradech commented Jan 18, 2025

Tested versions

4.4-beta1

System information

(Native)
Godot v4.4.beta1 - Windows 10 (build 19045) - Multi-window, 2 monitors - OpenGL 3 (Compatibility) - NVIDIA GeForce RTX 4070 (NVIDIA; 32.0.15.6636) - AMD Ryzen 9 3950X 16-Core Processor (32 threads)

(WSL2 on above system)
Godot v4.4.beta1 - Ubuntu 24.04.1 LTS 24.04 - X11 display driver, Multi-window, 2 monitors - OpenGL 3 (Compatibility) - D3D12 (NVIDIA GeForce RTX 4070) - AMD Ryzen 9 3950X 16-Core Processor (32 threads)

Issue description

The project manager is unable to resolve an icon referenced by uid before first import:

ERROR: Unrecognized UID: "uid://b3xkos3u4jns4".
   at: get_id_path (core/io/resource_uid.cpp:157)
ERROR: Error opening file ''.
   at: load_image (core/io/image_loader.cpp:89)

Steps to reproduce

open project manager
import MRP without "Edit Now"
-> no icon, errors in console

Minimal reproduction project (MRP)

icontest44b1.zip

@AThousandShips AThousandShips moved this from Unassessed to Not Critical in 4.x Release Blockers Jan 22, 2025
@AThousandShips AThousandShips added this to the 4.4 milestone Jan 22, 2025
@akien-mga akien-mga changed the title project manager unable to resolve icon referenced by uid before import Project manager unable to resolve icon referenced by uid before import Feb 10, 2025
@akien-mga
Copy link
Member

I can reproduce it too on Linux in the latest master branch (261e7d3), including after the related #102513 was merged.

I'm afraid this can't really be solved if we save icons as UIDs, because UIDs aren't known outside the project, so the Project Manager can't resolve them.

Well actually I see @KoBeWi added some loading of the UID cache from the PM in #100717. That might have been a bit of a bazooka solution in hindsight... but we see its shortcoming here.

Another option would be to simply enforce that the icon is always saved as a path and not UID, so it can be parsed by external tools like the PM. We could even consider having that restriction for other resources in project.godot like the main scene.

@KoBeWi
Copy link
Member

KoBeWi commented Feb 10, 2025

The issue only happens when project is not imported yet, so it won't affect majority of the projects. Usually when you have a project in your project list it was already imported; unless you just batch added multiple projects, which I think does not happen that often.

We could silence the error if cache does not exist yet, because it's not useful.

@akien-mga
Copy link
Member

Yeah silencing the error and just displaying default icon might be a good compromise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Not Critical
Development

Successfully merging a pull request may close this issue.

4 participants