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

Closing project without saving deleted open scenes causes error on reopen of project #95326

Closed
tokengamedev opened this issue Aug 9, 2024 · 1 comment · Fixed by #97028
Closed

Comments

@tokengamedev
Copy link

Tested versions

4.3 rc3

System information

Windows 11

Issue description

When you close a project without saving deleted open scene. It causes an error on reopen of the project.
Also there is a bit of grammatical error in the error message. Although I am not expert in english as well as I generally ignore this type of stuff, but this one I could not.

The error in alert dialog
Can't open file 'node_2d.tscn': The file could have been moved or deleted

The error in the output window:

Cannot open file 'res://node_2d.tscn'.
  Failed loading resource: res://node_2d.tscn. Make sure resources have been imported by opening the project in the editor at least once.
  editor/editor_data.cpp:895 - Index p_idx = 3 is out of bounds (edited_scene.size() = 3).
  editor/editor_data.cpp:760 - Index p_idx = 3 is out of bounds (edited_scene.size() = 3).
  editor/editor_data.cpp:701 - Index p_idx = 3 is out of bounds (edited_scene.size() = 3).

Issue 1:
The message in alert box should have been:
Could not open file 'node_2d.tscn': The file might have been moved or deleted

Issue 2:
There should have been no error in the first place.
Since the scene has been deleted inside editor filesystem, it should have behaved the same way as an unsaved scene file is handled.
Moreover, user consented in a dialog to close without saving explicitly.

Steps to reproduce

Steps to Reproduce:

  • Create a project and a scene
  • Save the Scene
  • Delete the file in the file system of the editor
  • Close the project
  • A dialog will prompt to save or not save the open scene. Select Don't save.
  • Reopen the project and you will get the error

Minimal reproduction project (MRP)

N.A

@Hilderin
Copy link
Contributor

While testing #95691 I found out that the same error occurs when the user opens a non inherited scene from a glb/gltf/fbx/blend file. While reloading the project, the same error occurs: Index p_idx = 1 is out of bounds

I put a MRP in #95691 to reproduce the problem easily.

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

Successfully merging a pull request may close this issue.

4 participants