Godot crashing because of two CanvasLayers in the scene

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Eyt-Lev

I have in my level scene a CanvasLayer to my background.
Now, I want to add the UI so I created another CanvasLayer for the UI to display above the game.
But, I soon as I loaded the CanvasLayer (and the UI inside) into the game, The game freeze and crash after seconds without error or stacktrace.

I tried to delete th bg CanvasLayer - and it worked.
It’s also not a problem in the layer number, or any other thing i could test.
As soon as there are 2 CanvasLayers in the scene (also include sub scene with CanvasLayer
insde) the game Crashes.

Can someone help with this bug?

What’s in these scenes? Having multiple CanvasLayers is a fairly typical thing to do so I’d look to investigate what each layer contains. Perhaps an errant script (assuming there are some, even in the level scene itself) is making assumptions about the scene tree and causing the editor to crash.

spaceyjase | 2023-05-15 14:06