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

Godot scene loading with NodePaths seemingly fails randomly after some time #5209

Open
hhyyrylainen opened this issue Jun 12, 2024 · 2 comments

Comments

@hhyyrylainen
Copy link
Member

hhyyrylainen commented Jun 12, 2024

It seems like NodePaths get sometimes loaded as null into C# classes seemingly randomly. The same scenes load correctly hundreds of times.

This has been reported to Godot: godotengine/godot#93083

This likely causes:

A potential workaround is to switch to:

@hhyyrylainen
Copy link
Member Author

Another case:

Starting load of save: auto_save_4.thrivesave
World generation settings: [LAWK: True, Difficulty: hard preset, Life origin: Vent, Seed: 7618708444814157935, Day/night cycle enabled: True, Day length: 180, Include multicellular: True, Easter eggs: True]
USER ERROR: Node not found: "HSplitContainer/PatchDetailsPanel" (relative to "/root/MicrobeStage/PauseMenu/Thriveopedia/MarginContainer/VBoxContainer/HBoxContainer3/MarginContainer/ThriveopediaPatchMapPage").
   at: get_node (scene/main/node.cpp:1651)
USER ERROR: System.NullReferenceException: Object reference not set to an instance of an object.
   at ThriveopediaPatchMapPage.UpdatePlayerPatch(Patch patch) in /home/hhyyrylainen/Projects/Thrive/src/thriveopedia/pages/ThriveopediaPatchMapPage.cs:line 114
   at ThriveopediaPatchMapPage.SetGameForMap() in /home/hhyyrylainen/Projects/Thrive/src/thriveopedia/pages/ThriveopediaPatchMapPage.cs:line 135
   at ThriveopediaPatchMapPage.UpdateCurrentWorldDetails() in /home/hhyyrylainen/Projects/Thrive/src/thriveopedia/pages/ThriveopediaPatchMapPage.cs:line 69
   at Thriveopedia.set_CurrentGame(GameProperties value) in /home/hhyyrylainen/Projects/Thrive/src/thriveopedia/Thriveopedia.cs:line 135
   at PauseMenu.set_GameProperties(GameProperties value) in /home/hhyyrylainen/Projects/Thrive/src/general/PauseMenu.cs:line 111
   at StageBase.SetupStage() in /home/hhyyrylainen/Projects/Thrive/src/general/base_stage/StageBase.cs:line 232
   at CreatureStageBase`2.SetupStage() in /home/hhyyrylainen/Projects/Thrive/src/general/base_stage/CreatureStageBase.cs:line 284
   at MicrobeStage.SetupStage() in /home/hhyyrylainen/Projects/Thrive/src/microbe_stage/MicrobeStage.cs:line 780
   at MicrobeStage._Ready() in /home/hhyyrylainen/Projects/Thrive/src/microbe_stage/MicrobeStage.cs:line 160
   at Godot.Node.InvokeGodotClassMethod(godot_string_name& method, NativeVariantPtrArgs args, godot_variant& ret)
   at StageBase.InvokeGodotClassMethod(godot_string_name& method, NativeVariantPtrArgs args, godot_variant& ret) in /home/hhyyrylainen/Projects/Thrive/Godot.SourceGenerators/Godot.SourceGenerators.ScriptMethodsGenerator/StageBase_ScriptMethods.generated.cs:line 208
   at CreatureStageBase`2.InvokeGodotClassMethod(godot_string_name& method, NativeVariantPtrArgs args, godot_variant& ret) in /home/hhyyrylainen/Projects/Thrive/Godot.SourceGenerators/Godot.SourceGenerators.ScriptMethodsGenerator/CreatureStageBase(Of TPlayer, TSimulation)_ScriptMethods.generated.cs:line 238
   at MicrobeStage.InvokeGodotClassMethod(godot_string_name& method, NativeVariantPtrArgs args, godot_variant& ret) in /home/hhyyrylainen/Projects/Thrive/Godot.SourceGenerators/Godot.SourceGenerators.ScriptMethodsGenerator/MicrobeStage_ScriptMethods.generated.cs:line 368
   at Godot.Bridge.CSharpInstanceBridge.Call(IntPtr godotObjectGCHandle, godot_string_name* method, godot_variant** args, Int32 argCount, godot_variant_call_error* refCallError, godot_variant* ret)
   at: void Godot.NativeInterop.ExceptionUtils.LogException(System.Exception) (:0)
load finished, success: True message: Завантаження завершено elapsed: 00:00:02.8581285

@hhyyrylainen
Copy link
Member Author

This error is probably the same root cause but for something that doesn't use NodePaths (probably):

ERROR: Scene instance is missing.
ERROR: at: (scene/resources/packed_scene.cpp:244)
ERROR: Failed to load Thriveopedia page Museum due to scene instantiate failure

@dligr dligr unpinned this issue Dec 2, 2024
@dligr dligr pinned this issue Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Low priority / might do
Status: Backburner
Development

No branches or pull requests

1 participant