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

Editor screen fails to load anything randomly #5075

Open
Teashrock opened this issue Apr 28, 2024 · 4 comments
Open

Editor screen fails to load anything randomly #5075

Teashrock opened this issue Apr 28, 2024 · 4 comments

Comments

@Teashrock
Copy link
Contributor

Describe the bug

I was playing as usual, clicked the reproduce button, but the editor screen has loaded without anything.

To Reproduce

  1. Open Thrive.
  2. Load a save.
  3. Play until reproduction, click the Editor button.
  4. See the bug.

Expected behaviour

Editor loading and allowing me to view all the data and edit my cell.

Screenshots

image
image
image

System information

  • OS: Windows 11
  • Graphics card: Radeon Vega 8 embedded in AMD Ryzen 5 3450U
  • Thrive: 0.6.6

Game Logs

https://pastebin.com/xn7NEX4X (there's only a chunk of log.txt due to the original file being too large)

Additional Context

No response

@hhyyrylainen
Copy link
Member

hhyyrylainen commented Apr 28, 2024

Here's the relevant error:

USER ERROR: Method argument to Callable constructor must be a non-empty string
   at: Callable (core/variant/callable.cpp:334)
USER ERROR: Cannot connect to '': the provided callable is null.
   at: connect (core/object/object.cpp:1315)
USER ERROR: Index c.from &FLAG_MASK = 110 is out of bounds (nc = 17).
   at: instantiate (scene/resources/packed_scene.cpp:522)
USER ERROR: System.NullReferenceException: Object reference not set to an instance of an object.
   at Thriveopedia.AddPage(String name, IThriveopediaPage page) in /home/hhyyrylainen/Projects/Thrive/src/thriveopedia/Thriveopedia.cs:line 332
   at Thriveopedia.set_CurrentGame(GameProperties value) in /home/hhyyrylainen/Projects/Thrive/src/thriveopedia/Thriveopedia.cs:line 130
   at EditorBase`2.InitEditor(Boolean fresh) in /home/hhyyrylainen/Projects/Thrive/src/general/base_stage/EditorBase.cs:line 550
   at MicrobeEditor.InitEditor(Boolean fresh) in /home/hhyyrylainen/Projects/Thrive/src/microbe_stage/editor/MicrobeEditor.cs:line 140
   at EditorBase`2.OnEnterEditor() in /home/hhyyrylainen/Projects/Thrive/src/general/base_stage/EditorBase.cs:line 668
   at MicrobeEditor.OnEnterEditor() in /home/hhyyrylainen/Projects/Thrive/src/microbe_stage/editor/MicrobeEditor.cs:line 188
   at EditorBase`2._Ready() in /home/hhyyrylainen/Projects/Thrive/src/general/base_stage/EditorBase.cs:line 208
   at MicrobeEditor._Ready() in /home/hhyyrylainen/Projects/Thrive/src/microbe_stage/editor/MicrobeEditor.cs:line 70
   at Godot.Node.InvokeGodotClassMethod(godot_string_name& method, NativeVariantPtrArgs args, godot_variant& ret)
   at EditorBase`2.InvokeGodotClassMethod(godot_string_name& method, NativeVariantPtrArgs args, godot_variant& ret) in /home/hhyyrylainen/Projects/Thrive/Godot.SourceGenerators/Godot.SourceGenerators.ScriptMethodsGenerator/EditorBase(Of TAction, TStage)_ScriptMethods.generated.cs:line 458
   at MicrobeEditor.InvokeGodotClassMethod(godot_string_name& method, NativeVariantPtrArgs args, godot_variant& ret) in /home/hhyyrylainen/Projects/Thrive/Godot.SourceGenerators/Godot.SourceGenerators.ScriptMethodsGenerator/MicrobeEditor_ScriptMethods.generated.cs:line 228
   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)
USER ERROR: System.InvalidOperationException: Editor component not initialized
   at EditorComponentWithActionsBase`2.UpdateMutationPointsBar(Boolean tween) in /home/hhyyrylainen/Projects/Thrive/src/general/base_stage/EditorComponentWithActionsBase.cs:line 78
   at EditorBase`2.OnMutationPointsChanged() in /home/hhyyrylainen/Projects/Thrive/src/general/base_stage/EditorBase.cs:line 833
   at EditorBase`2.CalculateMutationPointsLeft() in /home/hhyyrylainen/Projects/Thrive/src/general/base_stage/EditorBase.cs:line 928
   at EditorBase`2._Process(Double delta) in /home/hhyyrylainen/Projects/Thrive/src/general/base_stage/EditorBase.cs:line 281
   at Godot.Node.InvokeGodotClassMethod(godot_string_name& method, NativeVariantPtrArgs args, godot_variant& ret)
   at EditorBase`2.InvokeGodotClassMethod(godot_string_name& method, NativeVariantPtrArgs args, godot_variant& ret) in /home/hhyyrylainen/Projects/Thrive/Godot.SourceGenerators/Godot.SourceGenerators.ScriptMethodsGenerator/EditorBase(Of TAction, TStage)_ScriptMethods.generated.cs:line 458
   at MicrobeEditor.InvokeGodotClassMethod(godot_string_name& method, NativeVariantPtrArgs args, godot_variant& ret) in /home/hhyyrylainen/Projects/Thrive/Godot.SourceGenerators/Godot.SourceGenerators.ScriptMethodsGenerator/MicrobeEditor_ScriptMethods.generated.cs:line 228
   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)

That last part then repeats indefinitely as the editor load has failed, which causes a ton of code to be skipped and it is an inconsistent state so it cannot work.

Here's my initial thoughts after looking at the code: this seems like a Godot scene instancing failure. The failing code is calling AddPage("PatchMap"); in the Thriveopedia and it crashes on line if (page.ParentPageName != null && allPages.Keys -- which should only be possible if the page variable is null. And the only reason that would be null if the scene instantiation fails, which Godot does seem to give some error message parts:

USER ERROR: Method argument to Callable constructor must be a non-empty string
   at: Callable (core/variant/callable.cpp:334)
USER ERROR: Cannot connect to '': the provided callable is null.
   at: connect (core/object/object.cpp:1315)
USER ERROR: Index c.from &FLAG_MASK = 110 is out of bounds (nc = 17).
   at: instantiate (scene/resources/packed_scene.cpp:522)

My initial conclusion is that this also seems like a random Godot scene loading failure where it just randomly decides to not load a scene file correctly that usually loads completely fine. I haven't yet looked if there is an existing issue in Godot repository about this.

Edit: I can also confirm that this doesn't happen each time you load a save made in the microbe stage and wait until getting to the editor. I just did that with a random save I had and I didn't see this error.

@hhyyrylainen hhyyrylainen added this to the Release 0.6.7 milestone Apr 28, 2024
@hhyyrylainen hhyyrylainen added this to Backburner in Thrive Planning via automation Apr 28, 2024
@Teashrock
Copy link
Contributor Author

@hhyyrylainen
Should I attach my current save file?

@hhyyrylainen
Copy link
Member

Only if loading it and going to the editor consistently causes the issue. I suspect it wouldn't but if it does then I'd be very interested to take a look.

@Teashrock
Copy link
Contributor Author

Nope. This time everything was good. Seems like a random Godot crash. They should debug the engine well.

hhyyrylainen added a commit that referenced this issue Apr 29, 2024
so instead of preventing the editor from working this would only make the thriveopedia not work, related to #5075
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: High Priority
Thrive Planning
  
Backburner
Development

No branches or pull requests

2 participants