godot icon indicating copy to clipboard operation
godot copied to clipboard

Editor crashes when changing type of node after editing child scene

Open emanresU102396 opened this issue 10 months ago • 5 comments

Tested versions

v4.2.2.stable.official [15073afe3]

System information

Godot v4.2.2.stable - Windows 10.0.22631 - GLES3 (Compatibility) - NVIDIA GeForce RTX 4080 Laptop GPU (NVIDIA; 31.0.15.4633) - AMD Ryzen 9 7940HS w/ Radeon 780M Graphics (16 Threads)

Issue description

When one scene is instantiated in another, and I edit the child scene, then changing the type of the parent scene causes the engine to crash. (Expected behavior: Not doing that.)

Steps to reproduce

With the MRP:

  1. Rename the root node in child_scene, or change its type.
  2. Right click the root node in main_scene, click 'Change Type', and try to change it.

Minimal reproduction project (MRP)

change node crash test.zip

emanresU102396 avatar Apr 21 '24 19:04 emanresU102396

I was able to reproduce this issue in the 4.2.2 official build but not in the custom build from the latest version of the master branch: Reproduced in -> v4.2.2.stable.mono.official [15073afe3] Couldn't reproduce in -> v4.3.dev.custom_build [4a0160241]

My system: Windows 11 22631.3447 - NVIDIA GeForce GTX 1650 Ti GPU - Intel Core i7-10750H CPU

iltenahmet avatar Apr 21 '24 20:04 iltenahmet

Sounds like:

  • https://github.com/godotengine/godot/issues/89425

Which solved the issue in 4.3, but due to regressions introduced by it that fix was not cherry picked for 4.2, unsure what kind of specific solution to backport here, the new fix for this in 4.3 has not been marked for cherry picking as of right now, see:

  • https://github.com/godotengine/godot/pull/89992

That one broke compatibility though, and I think it too was replaced down the line

CC @ajreckof

AThousandShips avatar Apr 21 '24 21:04 AThousandShips

Yeah this one was tricky and down the line we realised we needed to break compatibility to properly fix it. It shouldn't be hard to cherry-pick as compatibility breakage we're made separately but on the other hand I'm wondering if they are worth it because the crash is really hard to reproduce without steps. On the other hand this report shows that it does in fact happen often enough for someone to report it. If needed I can point to what commits should be cherry picked to fix this on 4.2

Edit : the mix I'm suggesting wouldn't break compatibility

ajreckof avatar Apr 21 '24 21:04 ajreckof

I don't know if this is the same issue, but this is an error I get every time I try to save a scene. The editor freezes up, and I have to force close it.

`Godot Engine v4.2.stable.official.46dc27791 - https://godotengine.org Vulkan API 1.3.277 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 3070 Ti Laptop GPU

WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. at: _editor_init (modules/gltf/register_types.cpp:63) ERROR: Resource was not pre cached for the resource section, bug? at: (scene/resources/resource_format_text.cpp:1853) ERROR: Resource was not pre cached for the resource section, bug? at: (scene/resources/resource_format_text.cpp:1853) ERROR: Resource was not pre cached for the resource section, bug? at: (scene/resources/resource_format_text.cpp:1853) ERROR: Resource was not pre cached for the resource section, bug? at: (scene/resources/resource_format_text.cpp:1853) ERROR: Resource was not pre cached for the resource section, bug? at: (scene/resources/resource_format_text.cpp:1853) ERROR: Resource was not pre cached for the resource section, bug? at: (scene/resources/resource_format_text.cpp:1853) ERROR: Resource was not pre cached for the resource section, bug? at: (scene/resources/resource_format_text.cpp:1853) ERROR: Resource was not pre cached for the resource section, bug? at: (scene/resources/resource_format_text.cpp:1853) ERROR: Resource was not pre cached for the resource section, bug? at: (scene/resources/resource_format_text.cpp:1853) ERROR: Resource was not pre cached for the resource section, bug? at: (scene/resources/resource_format_text.cpp:1853) ERROR: Resource was not pre cached for the resource section, bug? at: (scene/resources/resource_format_text.cpp:1853) ERROR: Resource was not pre cached for the resource section, bug? at: (scene/resources/resource_format_text.cpp:1853) ERROR: Resource was not pre cached for the resource section, bug? at: (scene/resources/resource_format_text.cpp:1853) ERROR: Resource was not pre cached for the resource section, bug? at: (scene/resources/resource_format_text.cpp:1853) ERROR: Resource was not pre cached for the resource section, bug?`

eternity336 avatar Apr 26 '24 00:04 eternity336

No this isn't related to this issue. This issue happens when changing the type of the root node which doesn't seem to be your case.

ajreckof avatar Apr 26 '24 00:04 ajreckof

Yeah this one was tricky and down the line we realised we needed to break compatibility to properly fix it. It shouldn't be hard to cherry-pick as compatibility breakage we're made separately but on the other hand I'm wondering if they are worth it because the crash is really hard to reproduce without steps. On the other hand this report shows that it does in fact happen often enough for someone to report it. If needed I can point to what commits should be cherry picked to fix this on 4.2

Edit : the mix I'm suggesting wouldn't break compatibility

If you're up for it, I'd say the best would be that you can make a dedicated 4.2 PR with the relevant commits cherry-picked (or manually backported if needed). When cherry-picking, remember to use git cherry-pick -x so that the reference of the original commit hash gets added to the commit description for traceability.

akien-mga avatar Apr 26 '24 08:04 akien-mga

Closing as fixed in 4.3.

akien-mga avatar Sep 11 '24 16:09 akien-mga