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

When loading a project, the editor shows an empty scene before actually showing the last edited scene #85082

Closed
NatGazer opened this issue Nov 19, 2023 · 18 comments · Fixed by #92650 or #93064

Comments

@NatGazer
Copy link

Godot version

4.2 beta5, beta6 and rc1

System information

Windows 10 - Vulkan (Forward+) - RTX 3060 laptop - AMD Ryzen 5 5600H - 24GB RAM

Issue description

Every time a project is loaded, after the boot splash, an empty scene like the one below appears:

image

After some time, the last edited scene is finally shown as expected.

I took the time to see after which version this occurs and I concluded that this glitch is only present in 4.2 beta5, beta6 and rc1. Godot 4.2beta4 and before works as expected

Steps to reproduce

Just open a project with at least one saved scene. If the scene takes time to load, the glitch is more noticeable

Minimal reproduction project

glitchBlankScene.zip

Just a simple scene with some high-poly count CSGMesh3D to make loading time big. I didn't delete the .godot folder because that doesn't make Godot load the last edited scene. Anyway you can delete the .godot folder yourself and reopen the project a second time to see the glitch

@NatGazer
Copy link
Author

I don't believe this is an enhancement. I know this is just something visual, but it just makes project loading look so unclean. And considering this is not an expected behavior that was introduced in one of the latest releases, I believe this is more a regression than an enhancement

@KoBeWi
Copy link
Member

KoBeWi commented Nov 19, 2023

Duplicate of #47053
It's not a new issue.

@KoBeWi KoBeWi marked this as a duplicate of #47053 Nov 19, 2023
@KoBeWi KoBeWi closed this as not planned Won't fix, can't repro, duplicate, stale Nov 19, 2023
@NatGazer
Copy link
Author

Ok, I might haven't made myself clear. As I said, this glitch only happens after Godot 4.2 beta5, this is not a duplicate of a 2021 PR.

This is how a project opens in beta4:

beta4

This is how a project opens in rc1:

rc1

@KoBeWi
Copy link
Member

KoBeWi commented Nov 19, 2023

This does look the same as the old issue. The "empty scene" appears while the project is loading, which means that for some reason your project is initializing a bit longer.

This is technically some performance regression, but might be hard to pinpoint.

@NatGazer
Copy link
Author

I actually noticed that rc1 opens projects a bit faster than beta4, although rc1 shows the empty scene.

So, I believe this is not about time, but rather a change made in beta5 that unexpectedly started to cause this behavior. I took a look at the dev snapshot for beta 5 and I have no ideia which change might be causing this

@akien-mga
Copy link
Member

This is likely a consequence of #84200, where some steps in the editor initialization had to be delayed to give time for the mesh conversion tool to be shown.

At this time it's the least bad option we have for this, for future releases we plan to rework editor initialization fully to have better control on all this.

@NatGazer
Copy link
Author

This is likely a consequence of #84200

Ok, that's good to know. I'm just wondering, but... Considering that, would it be easy to disable that delay in projects that are already updated to 4.2?

@akien-mga
Copy link
Member

It's just cosmetic, you wouldn't save much time. On your screen capture it looks like it takes around the same time to get to the scene, it's just faster in 4.2-rc1 to show the editor UI before the scene has loaded.

The changes we had to do around #84200 are quite complex and still have edge cases, so this likely won't be changed at this stage.

@NatGazer
Copy link
Author

Understood, thank you for the clarification

@Calinou
Copy link
Member

Calinou commented Nov 20, 2023

This can likely be worked around by adding a fixed loading plaque before the editor is fully initialized, so you see some kind of feedback while the editor is still finishing loading.

@KoBeWi
Copy link
Member

KoBeWi commented Nov 20, 2023

The empty editor state is interesting. You can't open any file, because everything is empty, but you can run your project. And if an error happens in the project, the script editor will actually open a script. The editor is fully responsive, just nothing is loaded.

@YuriSizov
Copy link
Contributor

YuriSizov commented Nov 20, 2023

I don't think that the performance and the regression tags are appropriate here. According to the clips posted above it loads even a bit faster now. It's just that the intermediate state shows up for a bit longer.

I guess previously something else in the editor locked it in place so the splash image wouldn't go away, and now it goes away a bit earlier. But the overall load times don't seem to be meaningfully different. And the intermediate state was always there. As for better loading indication, this is something I plan to work on in 4.3.

@KoBeWi
Copy link
Member

KoBeWi commented Nov 20, 2023

So in the end it's a duplicate of #47053?

@YuriSizov
Copy link
Contributor

For poor editor feedback part, I guess so. But we can still keep this one open to indicate that there was some recent change that may make things more noticeable for users.

@larinius
Copy link

larinius commented Nov 22, 2023

I have same behavior - I see just empty editor without any assets for some period of time (10-30 seconds). At least add loading spinner or "Pease wait.." text, so we could know that project not crashed and will open soon.

@NatGazer
Copy link
Author

This is likely a consequence of #84200, where some steps in the editor initialization had to be delayed to give time for the mesh conversion tool to be shown.

Considering that now the conversion mesh tool is not shown at startup, why wasn't this fixed? The code that makes this "delay" behavior shouldn't be needed anymore right?

@YuriSizov
Copy link
Contributor

@NatGazer The "delay" is not related to when the message appears. It's related to when the tool runs, which still happens at the startup. And at the end of the day, the change doesn't impact anything other than visual state of the editor. It still loads for the same amount of time.

The logic behind the editor startup is quite convoluted, so given there is no actual performance regression there was no point risking breaking something so close to the release.

@akien-mga
Copy link
Member

Duplicate of #47053 (reopened as #92650 was reverted for 4.3).

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