godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.97k stars 20.18k forks source link

Every time I start a new project, a warning is printed about an unavailable file (due to it being referenced in `editor_layout.cfg`) #95472

Open inhalt120g opened 1 month ago

inhalt120g commented 1 month ago

Tested versions

v4.3.rc3.official [03afb92ef] But I had it happening since 4.1 or so

System information

Mac Mini M1 with newest MacOS

Issue description

Every time I start a new project an error is printed in the console: image

Again, this is when starting a completely empty project. The file Godot is looking for was indeed used in one of my old projects and it exists somewhere in some other folder and I don't see why would it be invoked. The file Godot is looking for is nothing special, it's just a special effect that is drawn on screen when the player character uses a weapon (basically a Sprite2D with maybe an audio component or something similar).

The projects work normally after I save them the first time (at least I haven't noticed anything strange) and the error message goes away after a while without me doing anything special.

This doesn't really block my work or anything but it's really annoying and slightly worrying.

Steps to reproduce

I open a new project and get the error message. I assume it's specific to something on my end.

Minimal reproduction project (MRP)

Godot project manager -> New project

akien-mga commented 1 month ago

The file might be referenced in your editor configuration for some reason.

Can you check if you find references to it in (IIRC) ~/Library/Application Support/Godot? Might be in editor_settings-4.tres and editor_settings-4.3.tres.

inhalt120g commented 1 month ago

I found this (together with some other stuff from some old project) referenced in

editor_layouts.cfg

image

All these files are not in use anymore. Can I somehow refresh the cfg file or should I delete these lines manually or something else?

akien-mga commented 1 month ago

You can delete or rename the files and they will be recreated as needed with default config.

On our end, we should improve the code that parses this config to discard invalid entries instead of trying to select them. CC @KoBeWi @Calinou

KoBeWi commented 1 month ago

This was once reported on the chat. Related discussion: https://chat.godotengine.org/channel/editor?msg=ro3qz5pMvZKZqeyJG Saving editor layout can store some project-specific information. The same layout functionality is used per-project. If you delete a scene that was recently opened, it's expected to get an error that the scene is missing. It only causes problems with the global layout, so simply ignoring the error is a bandaid.

jonathansekela commented 5 days ago

New contributor here, trying to find something to seek my teeth into. Is this issue still relevant, or has PR 95759 solved it?

KoBeWi commented 5 days ago

IMO project-specific settings should not be saved in global layout file, but technically the linked PR solves the issue.