-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Deleting a resources in FileSystem doesn't remove references to it #78233
Comments
Is this limited to only scripts, since you mentioned scripts, or general? |
This is affecting all ressource type |
I suspect the focus here should be on graciously handling the incorrect references, as opposed to deleting the references, as that can cause problems if you accidentally delete and then restore the resources, but erroring and crashing isn't good Added regression based on comment in rocket chat |
I see two major possibility. Both can and I think should be implemented as they are complementary to solve the problem shown above |
I mean the way this is usually intended to be solved, at least for non-scripts, is using UIDs, and modifying references is something I think should be avoided, to prevent accidental issues as mentioned above. But we should and can ensure that it navigates this gracefully, can't quite tell what might have gone wrong here as I haven't dug into it today, will see if I have time later to investigate further |
modifying references is already the way it is handled as if you have the scene opened saving it will save the resources internally. The first solution is to make this automatic on deletion of the resource. |
Yes, Godot does not prompt to fix broken references anymore. By the way, see also: #76941 |
What comment? IIIRC deleting resources never updated references. Only moving files does so. Also the dependency dialog missing was fixed. |
I do not remember, will try find |
The crashes and corruption bugs are all resolved now, missing resources only result in error prints. Unless it breaks after export, it's harmless. |
Godot version
v4.1.beta.custom_build [01453ab]
System information
macOS 13.3.0 - Vulkan (Forward+) - integrated Apple M1 Pro - Apple M1 Pro (8 Threads)
Issue description
When deleting a resource from the FilesSystem dock. The resource won't be removed from scenes but won't immediately be saved internally. As a workaround if the scene is opened you can save it immediatelly before closing but it won't warn you when closing that there are unsaved action.
This will lead to multiple type of errors varying from
cannot open resource
orcannot find script
tocannot open scene
or even in the worst cases to outright crashes like in here (#78238)Steps to reproduce
Here is what happen for script
[unsaved]
trying to save the script (not the scene) won't workFor ressources it will be a bit different :
Minimal reproduction project
with the MRP you can start reproduction steps at the sixth step.
Test.zip
Edit : separated the crash from the rest of the bug as even we handle correctly how we delete a resource in FileSystem. The crash seems to come from
Array[Node]
specificsThe text was updated successfully, but these errors were encountered: