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

Unexpected project data loss caused by saveToCloud under edge cases #761

Closed
aofei opened this issue Aug 16, 2024 · 0 comments · Fixed by #777
Closed

Unexpected project data loss caused by saveToCloud under edge cases #761

aofei opened this issue Aug 16, 2024 · 0 comments · Fixed by #777
Assignees

Comments

@aofei
Copy link
Member

aofei commented Aug 16, 2024

Description

The auto-save mechanism introduces an edge case where Project.saveToCloud or Project.saveToLocalCache may run after Project.dispose is called or while Project.history is making changes. This can lead to intermediate state resources (e.g., sprites and sounds) being saved, resulting in data corruption.

Possible solution

Ensure Project.saveToCloud and Project.saveToLocalCache only run when resources are stable by locking Project.history before Project.export and confirming Project isn't disposed before saving.

@aofei aofei self-assigned this Aug 16, 2024
aofei added a commit to aofei/.goplus.builder that referenced this issue Aug 20, 2024
aofei added a commit to aofei/.goplus.builder that referenced this issue Aug 21, 2024
nighca pushed a commit that referenced this issue Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant