-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Circular dependency causes resources to be missing on export #77007
Comments
Same error when running the project from the editor in version 4.02.
|
My experience with this bug was exporting from Mac/Linux. Exports from Windows always worked for some reason. Issue resolved randomly after a couple days. I tried reimporting objects that were error’d, but no luck. I also tried restarting Godot, re cloning my repo, restarting my pc, building from a Github Actions pipeline, and a couple other things. Builds just only worked on Windows. I tried Godot 4.01, 4.02, and 4.1.dev1 — none of them fixed the issue. No idea how it resolved. |
To add on, my game could export from all 4 ways described in my first comment originally, then it stopped working one day out of nowhere.. |
@RobertSzaszak @hunterkepley Please upload a minimal reproduction project to make this easier to troubleshoot. |
I will look through my commits to find one, but it'll take some time |
@Calinou Hi, How do I upload a minimal reproduction project? My game is quite big already. Shall I try to make it smaller and create a new repo for it? The issue seems to be with the |
Minimal project is literally what it says. Create the smallest project you can that has the problem. |
I am unable to recreate this issue with a project, it seems to happen at random. Currently my project is unable to build on OSX, but builds work from my automated pipeline on GitHub (linux) and my windows desktop. This was not the case last week. I could provide my game with a lot of the code removed, if that would suffice, it just wouldn't be "minimal". |
I removed all of the important code from my game such as rollback, server reconciliation, etc. As well as skipped the lobby and removed proprietary models I own I have, however, included the export presets All you need to do is export from OSX, (try a .dmg on a Mac first) start the game, press "Host" on the bottom left, and it should have a grey screen and spit out a ton of errors if ran from a terminal Hope this helps |
Seems like it works in version 4.0.3. You can close the issue. |
Still exists for me, please do not close |
MRP without credentials in it |
Hopefully this can be fixed soon, I am currently having to work on the game on my MacBook, then export from my windows desktop to linux and Mac, then upload that to AWS/my MacBook :( |
This could be due to a similar cause as #55711, or due to texture compression project settings if this is a 3D project that uses VRAM compression for any textures (as is done by default). |
Happening in my scene as well. Several materials referenced by .GLTFs are not able to be parsed because the textures can't be loaded. This results in entire meshes not loading because they can't find the textures to load on the materials I've linked in the .gltf importer. E 0:00:11:0282 _parse_ext_resource: res://Resources/Characters/Guard/guard upper.tres:6 - Parse Error: [ext_resource] referenced nonexistent resource at: res://Resources/Characters/Guard/guard_packed1_diffuse_r1.png E 0:00:11:0282 load: res://Resources/Characters/Guard/guard upper.tres:6 - Parse Error: [ext_resource] referenced nonexistent resource at: res://Resources/Characters/Guard/guard_packed1_diffuse_r1.png The this happens specifically if I use the ResourceLoader.load_threaded_request command. I do this so I can have a loading bar. Also, it's not 100% consistent - sometimes textures do load, and for almost all my models, this isn't an issue, but for some big ones it is. No amount of re-importing, renaming, or changing whether it's loaded into VRAM seems to make a difference |
yes, i should add, this all started after i moved all my files one by one using Godot's "Move To" functionality ever since, no number of changes, reimports, etc has fixed the issue. also my game is 3D |
v 4.0.3 error info: |
You should not |
I was able to trace my issue and potentially solve it: After troubleshooting, I found my version of the error occurred only with specific image files that were shared by multiple materials. For example, Guard_BLUE and Guard_RED both use the same texture in their materials: guard_packed1_diffuse_r1.png. When objects using or sharing those materials are loaded using ResourceLoader.load_threaded_request, the error is thrown. It even causes the mesh in question to disappear from the scene. Reading in the docs, a particular piece of information became apparent - if a resource is already loaded, Godot will not load it again. So what I ended up doing was this:
This seems to have resolved my issues with this error. It may not apply to many of you, but it's useful information to know that resources, particularly textures, CANNOT be loaded more than once in a scene, unless explicitly marked to do so by making them "Unique". My suggestion would be to make this information part of the warning / error message, so users can know where and how to troubleshoot this. |
I read this path in the apk/assets/xxx.tscn.remap file |
For what it's worth I worked through this issue with my project. The errors were pointing to the script property attached to the root node: In game.tscn
I removed the
After that I was able to load the scene, and the script was not attached. I was able to add it back, generating a new id and everything seems to work again. Hope this is helpful! |
I am currently finding these errors in a project coming over from 4.0.x versions of it. I did a fully new project import yet somehow these errors appeared in 4.1.x versions of Godot. If I have helpful information on probable causes of this problem I will report here. |
Good morning everyone.
Yesterday I was working on it without any issue, but this morning I'm having this issue. The version of Godot I'm using is Stable 4.1.1.
It is ok to link to my repository since I have published it? |
After digging for an hour on understanding why I was receiving this error on my project, the reason was in one of the scenes there was a weirdly missing reference to another scene. In short my game is structured as follow:
To solve the problem I had to modify the scene file, manually by removing the missing reference of the scene. Probably, this might not be the answer for Robert but it seems that this issue depends on how files are handled. |
Similar issue happened to my project. (Using Godot 4.1.1.stable.mono) I have "sceneA", which has a script with an On reloading of the project, such relationship breaks every scenes it was involved in, causing the error as in the original post. Furthermore, if other scenes have any reference (either by script, or nested in the tree) to scenes broken this way, those will break too. This has caused all but one of my scenes to break. I managed to resolve it by editing the .tscn files and removing all PackedScene references, but I'm afraid to move forward with the project since the same thing could happen again anytime, in a bigger scale, and I wouldn't be able to notice it until the project is reloaded and everything breaks. |
I've got exactly the same issue with a similar case where I use TP point to load a new map. For my test the A map tp to B and the B to A. My A scene was causing the trouble. I'm using @export too with PackedScene as type. Edit: with godot 4.1.1 as well. |
@aurumboros TP stands for? Anyway which node are you using for loading the levels because to me it was a problem with the node I used for loading the next level. |
Sry, TP stands for "Teleport". In my previous setup, a "TP node" from a "scene A" referenced "scene B" thanks to @export Packed Scene with some coordinates to load the scene and teleport the player. Then in the "scene B" a node has a reference of the "scene A" with coordinates too. And the reference from A -> B and B -> A break the scenes until you remove the reference in the .tscn |
I'm also experiencing this issue, Godot 4.1.2. When:
Error:
Reference also points to script. By removing script, error is gone. But I need the script... Contents of
I understand that this problem has to be replicated in a discrete project and isolated. [Will attempt to do so.] |
I've experienced this issue and have been able to semi-reliably recreate the error and recover from it. |
minimal reproduction project,
|
I just encountered this error in my project and found the problem, at least for me. TL;DR: A Resource referenced Script, and the code in that Script loaded the Resource referencing it. Circular dependency during GDScript parsing. I had a custom Resource with a reference to a Script, i.e., a .gdscript file. For one of those resources, the Script it referenced called preload() with a path to the Resource referencing it. This created a circular dependency that broke GDScript parsing. Changing it to load(), so it loaded at runtime and not during parsing, did not resolve it - I had to remove the circular reference entirely. Hopefully this helps others who encounter this. I'm not quite sure why a script referencing a Resource that references back to the script breaks parsing, at least with a runtime call to load(). |
I can confirm this issue on my end and @rob-williams is 100% right on the cause. #85922 doesn't solve this issue either, so it's still a problem. Here's a quick example of a potential recursion issue:
This is a simplified version of a issue I have had in a much larger project. Basically, the If we could, it would be nice to update the issue's title to reflect this recursion situation unless other potential causes can be determined. This is the only sure fire way I know to reproduce this bug -- and even then, there are occasions where it inexplicably works. This inconsistency, and the |
@Calinou, how I supposed to load() the files? I'm having this issue and I'm doing exactly what you said not to |
@charlespaivadev You should |
Solved this problem by manually deleting the |
@LeoZhang421 +1 for the workaround, thank you |
Godot version
4.0 Stable
System information
Windows 10
Issue description
When exporting the project as a Windows executable, the application throws the following error.
Make sure resources have been imported by opening the project in the editor at least once.
Steps to reproduce
Export project as Windows Desktop (Runnable)
Run the application.
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: