godotengine / godotengine/godot

"Unrecognized UID" error on first import when mouse_cursor/custom_image is set

Open
#115,205 7 comments 0 reactions 0 assignees View on GitHub
bug topic:editor
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- 4.5.1 (current stable at time of filing)
- v4.6.rc2.official.78c6632eb (latest RC at time of filing)

### System information

Godot v4.6.rc2 - Freedesktop SDK 24.08 (Flatpak runtime) on Wayland - X11 display driver, Multi-window, 2 monitors - Vulkan (Forward+) - integrated AMD Radeon 860M Graphics (RADV GFX1152) - AMD Ryzen AI 7 PRO 350 w/ Radeon 860M (16 threads) - 58.49 GiB memory

### Issue description

I have a simple project that contains one image (a mouse cursor from Tiny Swords, CC0 version) and the following `project.godot`:

```ini
config_version=5

[application]
config/name="mouse_cursor/custom_image first import error"
config/features=PackedStringArray("4.6")

[display]
mouse_cursor/custom_image="uid://dc7ypt8tqwpw5"
```

The UID is that of the image. I set this property in Project Settings > Display > Mouse Cursor > Custom Image, which is the [documented simple way to set the mouse cursor for a project](https://docs.godotengine.org/en/stable/tutorials/inputs/custom_mouse_cursor.html).

When the project is first imported into the editor, the following errors are shown:

```
Godot Engine v4.6.rc2.official.78c6632eb - https://godotengine.org

ERROR: Unrecognized UID: "uid://dc7ypt8tqwpw5".
at: get_id_path (core/io/resource_uid.cpp:208)
ERROR: Condition "local_path.is_empty()" is true. Returning: Ref()
at: _load_start (core/io/resource_loader.cpp:568)
[ 0% ] first_scan_filesystem | Started Project initialization (5 steps)
[ .... ]
```

On subsequent loads of the project, the error is not shown.

### Steps to reproduce

Import the project below, from the console so that errors early in the import process can be seen. For example:

```
Godot_v4.6-rc2_linux.x86_64 --import --headless
```

### Minimal reproduction project (MRP)

[mouse_cursor-custom_image-first-import-error.zip](https://github.com/user-attachments/files/24767403/mouse_cursor-custom_image-first-import-error.zip)

Contributor guide

Open the contributing guide

Research direction

Reproduce the first-import failure with the linked minimal project using Godot_v4.6-rc2_linux.x86_64 --import --headless. Start at core/io/resource_uid.cpp:208 and core/io/resource_loader.cpp:568, then verify that importing a project.godot with display/mouse_cursor/custom_image produces no unrecognized-UID or empty-path errors on the initial import.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, godot
Domain
game-dev, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.