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

Binary scenes don't save instanced scenes in them #80783

Closed
Summersay415 opened this issue Aug 19, 2023 · 10 comments
Closed

Binary scenes don't save instanced scenes in them #80783

Summersay415 opened this issue Aug 19, 2023 · 10 comments

Comments

@Summersay415
Copy link
Contributor

Summersay415 commented Aug 19, 2023

Godot version

3.6.beta3

System information

Ubuntu Studio 23.04

Issue description

When saving binary scenes, references to instanced scenes are not saved. So, reopening saved scene causes loss of references to instanced scenes (only topmost node is saved, without reference). This bug is 3.x only, 3.5.2 don't have it.
Caused by: #62408

Steps to reproduce

  1. Create scene.
  2. Instance another scene inside.
  3. Save first scene with .scn (binary) extension.
  4. Reopen it. Reference to instanced scene is lost.
2023-08-19.21-46-16.mp4

Minimal reproduction project

N/A

@Calinou
Copy link
Member

Calinou commented Aug 19, 2023

Can you reproduce this in 3.6.beta1 and 3.6.beta2?

@Summersay415
Copy link
Contributor Author

Summersay415 commented Aug 19, 2023

Can you reproduce this in 3.6.beta1 and 3.6.beta2?

Yes. Attached video with confirmation.

@EzraT
Copy link

EzraT commented Aug 25, 2023

I can confirm this issue. Same thing happens to me on Fedora 38 in 3.6-beta3

@Calinou
Copy link
Member

Calinou commented Aug 25, 2023

If you can compile the engine from source, you could look into bisecting the regression to greatly speed up troubleshooting.

Use these commands to start bisecting:

git bisect start

git bisect good 3.5.2-stable

# This is 3.6.beta1's commit hash.
git bisect bad 632a544c6e8f847d6796846d44f01231d1744958

@Summersay415
Copy link
Contributor Author

I will try it in free time!

@akien-mga
Copy link
Member

git bisect good 3.5.2-stable

I would advise starting from 3.5-stable instead, bisecting two diverging branches will add more steps unnecessarily.

@Summersay415
Copy link
Contributor Author

Summersay415 commented Aug 26, 2023

Bisected:

2ceb93bbeff6f5c7b6eed4ea79aff5f0574f4f92 is the first bad commit
commit 2ceb93bbeff6f5c7b6eed4ea79aff5f0574f4f92
Author: Francois Belair <[email protected]>
Date:   Sat Jun 25 15:51:37 2022 -0400
    Fix custom res caching sub-res even if no-cache
    Fixes #59686, fixes #59752

PR link: #62408

Also I saw some output in builds where bug was:

ERROR: Resource file not found: res://Node2D.scn::1.
   at: _load (core/io/resource_loader.cpp:288)
WARNING: Couldn't load resource: res://Node2D.scn::1
   at: parse_variant (core/io/resource_format_binary.cpp:298)

@akien-mga
Copy link
Member

CC @Razoric480 @KoBeWi

@Razoric480
Copy link
Contributor

Can confirm that it is saved in the .scn file (if the saving happens in 3.x but the loading in 3.5-stable, the reference to the external TSCN is maintained.)

@akien-mga
Copy link
Member

Fixed by #81026.

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

No branches or pull requests

5 participants