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

Fixes Scene corruption when child scene is renamed in another directory #80503

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

OXTyler
Copy link
Contributor

@OXTyler OXTyler commented Aug 11, 2023

Fixes #80379
The issue was that _save_scenes_after_move(..) is used both before, and after updating the file, so on the second save it tries to access a file that no longer exists, because it was renamed.

@OXTyler OXTyler requested a review from a team as a code owner August 11, 2023 01:41
@YeldhamDev YeldhamDev added this to the 4.2 milestone Aug 11, 2023
Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the rename issue, but it's still possible to break the scene by moving the file.

Also these errors are still printed (not really related though):

  C:\godot_source\editor/progress_dialog.cpp:156 - Do not use progress dialog (task) while flushing the message queue or using call_deferred()!
  C:\godot_source\editor/progress_dialog.cpp:189 - Condition "!tasks.has(p_task)" is true. Returning: canceled
  C:\godot_source\editor/progress_dialog.cpp:189 - Condition "!tasks.has(p_task)" is true. Returning: canceled
  C:\godot_source\editor/progress_dialog.cpp:216 - Condition "!tasks.has(p_task)" is true.

@akien-mga akien-mga merged commit e83fc9c into godotengine:master Sep 12, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@Deozaan
Copy link

Deozaan commented Sep 27, 2023

Please forgive my ignorance. I'm unfamiliar with the usual bugfix/patching process/timeline. I understand that this has been merged into master and will be in 4.2 which should release in November. But what's the likelihood of this being cherrypicked/backported to 4.1.x, and the ETA for that if it will happen?

I lost some work and plenty of time trying to figure out what went wrong and recover the lost work a few days ago due to the issue this fixes. Or maybe it was the issue fixed by #81657? I'm not really sure.

What I know is that I created an MRP in 4.1.1 that I can reliably reproduce editor crashing and scene corruption in, then came to report the bug but found that it's fixed in 4.2-dev5 already. In short: I'm eager to have the fix so the scene corruption doesn't happen again. 🙂

@YuriSizov
Copy link
Contributor

@Deozaan Neither PR is currently expected to make its way into 4.1.x. Not sure about this one, but the other change is potentially dangerous and needs to be proven with time. We don't want a regression to make things even worse in a patch release.

@Deozaan
Copy link

Deozaan commented Sep 27, 2023

Understood. Thank you.

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

Successfully merging this pull request may close these issues.

Scene becomes corrupted or Godot crashes when renaming a scene that involves dependencies
6 participants