Skip to content

Avoid manipulating PackedScene cache when generating scene preview thumbnails #107514

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

Merged
merged 1 commit into from
Jun 14, 2025

Conversation

daniel080400
Copy link
Contributor

@daniel080400 daniel080400 commented Jun 13, 2025

Attempt to fix issue #107494

Should likely be a cache issue with ResourceLoader. Need further testing and MRP.

Edit:
Issue confirmed is related to cache mode, see comments below.

@daniel080400
Copy link
Contributor Author

daniel080400 commented Jun 14, 2025

I confirmed the issue is fixed by changing the cache mode from CACHE_MODE_IGNORE to CACHE_MODE_IGNORE_DEEP, using the steps to reproduce mentioned in #107494 with an blank project created after 4.4.1. (Previously I tested with complex projects that are created prior to 4.4.1 and it's somehow not reproducible)

Open any scene containing child scenes with script. Change something. Don't save. Reload the scene via Scene -> Reload Saved Scene -> Save & Reload. All child scenes have 'lost' their script.

With the same project, the issue persists when changing it back to CACHE_MODE_IGNORE, and fixed when changing it to CACHE_MODE_IGNORE_DEEP.

Marking this as ready for review, this change should have no side effects, we should merge it right away. May someone provide more testing results to let us confidently mark the issue as resolved.

@daniel080400 daniel080400 requested a review from KoBeWi June 14, 2025 10:24
@daniel080400 daniel080400 marked this pull request as ready for review June 14, 2025 10:25
@pmoosi
Copy link

pmoosi commented Jun 14, 2025

Can confirm that it fixes the issue for me.

@akien-mga akien-mga changed the title Avoid manipulating PackedScene cache when generating scene preview thumbnails Avoid manipulating PackedScene cache when generating scene preview thumbnails Jun 14, 2025
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.

Fixes the issue for me too.

@poglad-ds
Copy link

After migrating from 51b0379 (11.06 build date) that have this problem, this looks like fixes it as long as i see.

@akien-mga akien-mga merged commit de0f3dd into godotengine:master Jun 14, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@daniel080400 daniel080400 deleted the fix_issue_107494 branch June 15, 2025 09:14
@daniel080400 daniel080400 restored the fix_issue_107494 branch June 15, 2025 09:15
pmoosi added a commit to pmoosi/godot that referenced this pull request Jun 16, 2025
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.

Scripts detached from child-scenes in the editor when the scene is loaded.
6 participants