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

Invalid Resources cause plugin to hang editor on startup #10

Open
Menacing opened this issue Sep 2, 2024 · 4 comments
Open

Invalid Resources cause plugin to hang editor on startup #10

Menacing opened this issue Sep 2, 2024 · 4 comments

Comments

@Menacing
Copy link

Menacing commented Sep 2, 2024

I'm part way through a refactor on my project and have some invalid resources I need to clean up.
This plugin prevents the editor from loading the project till I disable it. It will just hang on "scanning files" and stop responding.

Disabling the plugin allows the project to load immediately

@derkork
Copy link
Owner

derkork commented Sep 2, 2024

Thanks for taking the time to report this!

I have tried to reproduce this locally by creating some resources and changing their paths afterwards outside the editor but I coudn't reproduce the problem. Could you give me some more details on how specifically the resources are invalid?

Also it would seem you use an older version of this plugin, because newer versions will not do any scanning on project load - they just register a few classes and then sit idly until a game is started or exported. If you aren't already on the latest version 0.4.0, could you try to update to the latest version of the plugin and see if the issue can still be reproduced with that? You can check the version in the project settings:

image

@Menacing
Copy link
Author

Menacing commented Sep 3, 2024

It looks like when I updated from 0.3 to 0.4 it didn't get that change, when I deleted the addon folder and dropped in the 0.4 version, the editor starts correctly.

I think the issue isn't just any invalid resource, I think its specifically cyclical references. I ended up with a scene with an exported resource that also exports that same scene. I'm cleaning that issue up in my project, since it'd cause runtime issues anyway, so maybe this isn't an issue worth devoting time to

@derkork
Copy link
Owner

derkork commented Sep 4, 2024

Well yes ultimately this is something that would need cleanup in the project anyways, but of course it would be nice if the editor didn't lock up.

That being said all the plugin does is try to load the resource and if this freezes up because of some circular dependency there is actually not a lot the plugin can do against that (after all it just calls godot's load function). The plugin tries to load each resource found by the scanner to make sure it is actually a resource type and can be loaded with the resource loader and I think this check is actually important to do (see #8 (comment)) .

I also did some testing and deliberately tried to make some circular references which I couldn't do with the editor directly as it actually checks for that. I was able to manually code one into two .tres files but couldn't actually reproduce a freeze, rather Godot was unable to open either resource because it would need to load the other for that. Just out of curiosity could you tell me which Godot version you're using?

@Menacing
Copy link
Author

Menacing commented Sep 4, 2024

I just recently updated to 4.3

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

No branches or pull requests

2 participants