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

Provide more context when scene fails to load #85083

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Nov 19, 2023

Partially addresses #84981

Before this PR:

scene/resources/packed_scene.cpp:141 - Condition "nc == 0" is true. Returning: nullptr
scene/resources/packed_scene.cpp:222 - Parameter "node" is null.
scene/resources/packed_scene.cpp:222 - Parameter "node" is null.
editor/editor_data.cpp:626 - Index p_idx = 1 is out of bounds (edited_scene.size() = 1).

After this PR:

C:\godot_source\scene/resources/packed_scene.cpp:141 - Condition "nc == 0" is true. Returning: nullptr
Failed to load scene dependency: "res://Content/Cards/Spells/spell_container.tscn". Make sure the required scene is valid.
Failed to load scene dependency: "res://Systems/Characters/Player/player.tscn". Make sure the required scene is valid.
C:\godot_source\editor/editor_data.cpp:626 - Index p_idx = 1 is out of bounds (edited_scene.size() = 1).

@akien-mga
Copy link
Member

Since it seems to turn up frequently in user logs, it could be good to also give a clearer message to the nc == 0 error, even if it's not directly actionable to users.

@akien-mga akien-mga added the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Nov 20, 2023
@KoBeWi
Copy link
Member Author

KoBeWi commented Nov 20, 2023

Failed to instantiate scene state of "res://Content/Cards/Spells/spell_container.tscn", node count is 0. Make sure the PackedScene resource is valid.
Failed to load scene dependency: "res://Content/Cards/Spells/spell_container.tscn". Make sure the required scene is valid.
Failed to load scene dependency: "res://Systems/Characters/Player/player.tscn". Make sure the required scene is valid.

Seems like scene state path is available and the error comes from the first failed dependency.

@KoBeWi KoBeWi force-pushed the vestiges_of_scene_corruption branch from 1c0e669 to c6c872b Compare November 20, 2023 13:57
@akien-mga akien-mga modified the milestones: 4.3, 4.2 Nov 20, 2023
@akien-mga akien-mga added cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release and removed cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels Nov 20, 2023
@akien-mga akien-mga merged commit 3eb7277 into godotengine:master Nov 20, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the vestiges_of_scene_corruption branch November 20, 2023 18:45
@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Jan 23, 2024
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.4.

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.

3 participants