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

Script editor gets upset if an autoload singleton references itself explicitly by name #36001

Open
nobuyukinyuu opened this issue Feb 8, 2020 · 1 comment

Comments

@nobuyukinyuu
Copy link
Contributor

nobuyukinyuu commented Feb 8, 2020

Godot version:
3.2 stable

OS/device including version:
Windows 10 x64

Issue description:
When an autoload has a field element that is explicitly referred to within the autoload script, for example an autoload named global with a field test, and inside the script, it references itself like global.test (probably requires a design-time evaluation), this can eventually cause problems for other scripts which reference the value. Scripts which reference this autoload by name in any way will all show the same error, an error similar to "Couldn't fully load the script (Possible cyclic reference?)". Despite this, the game I observed this problem in could still run without issues.

This issue appeared when first opening my game in 3.2; the last version of Godot the project was opened in was 3.1.1 stable.

Steps to reproduce:
Unfortunately, I was unable to reproduce this after fixing the initial problem described above and removing the reference to global within my autoload. In order to clear the error message, I had to close and re-open the project. I imagine the issue occurs when first loading the project and may be more difficult to reproduce as a result.

It's unclear if this is a bug or a feature. It may still be considered undesired behavior if an autoload is supposed to understand explicit references to itself are to the singleton and not a cyclic reference. If 3.2 implemented better cyclic resource checking, this may be a side effect of it, but it may also be a problem in the order of loading resources for the purpose of building a "map" of values for autocomplete / validation.

@aaronfranke
Copy link
Member

This might be related to #21461

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

No branches or pull requests

4 participants