godotengine / godotengine/godot

[4.5 regression][Linux] Game crashes after _ready() if hidden Sprite2D has Area2D + CollisionShape2D children

Open
#110,780 3 comments 0 reactions 0 assignees View on GitHub
crash needs testing needs work
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Reproducible in 4.5stable
- when running resulting build on steamos (linux? My steamdeck is my only linux device). The build is done via github (on ubuntu), or build locally on macOS. Same result.
- the build works on macOS, and (with 98% confidence) on iOS
- I do not have a windows machine to test

Not reproducible in 4.4.1stable.

### System information

Linux steamdeck 6.11.11-valve19-1-neptune-611-g88b36d49a5e3

### Issue description

Note:
This is deployed on a steamdeck via steamworks, so iteration time is high, and options for testing are minimal.

Summary

A scene that contains a Sprite2D with two Area2D children (each with a CollisionShape2D) crashes on SteamOS (Steam Deck) immediately after the top-most node’s _ready() finishes.
If the parent Sprite2D (DebugCursorSprite2D) is visible on enter-tree, the scene runs. If it is hidden (visible = false) when the scene tree loads, the game exits/crashes.
The same project works in Godot 4.4.1.stable and in Godot 4.5.stable on macOS. The crash only happens with Godot 4.5.stable on SteamOS/Linux.

Godot version

Works: 4.4.1.stable (exported game)
Broken: 4.5.stable (exported game)

Templates: latest 4.5

OS/device

OS: SteamOS (on Steam Deck) — please see “Environment details” below for exact versions

GPU: Steam Deck APU (AMD)

```
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: AMD (0x1002)
Device: AMD Custom GPU 0932 (radeonsi, vangogh, LLVM 18.1.8, DRM 3.59, 6.11.11-valve19-1-neptune-611-g88b36d49a5e3) (0x1435)
Version: 24.3.4
Accelerated: yes
Video memory: 1024MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
VBO free memory - total: 432 MB, largest block: 432 MB
VBO free aux. memory - total: 8022 MB, largest block: 8022 MB
Texture free memory - total: 432 MB, largest block: 432 MB
Texture free aux. memory - total: 8022 MB, largest block: 8022 MB
```

```
==========
VULKANINFO
==========

Vulkan Instance Version: 1.4.303

Instance Extensions: count = 24
===============================
VK_EXT_acquire_drm_display : extension revision 1
VK_EXT_acquire_xlib_display : extension revision 1
VK_EXT_debug_report : extension revision 10
VK_EXT_debug_utils : extension revision 2
VK_EXT_direct_mode_display : extension revision 1
VK_EXT_display_surface_counter : extension revision 1
VK_EXT_headless_surface : extension revision 1
VK_EXT_surface_maintenance1 : extension revision 1
VK_EXT_swapchain_colorspace : extension revision 5
VK_KHR_device_group_creation : extension revision 1
VK_KHR_display : extension revision 23
VK_KHR_external_fence_capabilities : extension revision 1
VK_KHR_external_memory_capabilities : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2 : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2 : extension revision 1
VK_KHR_portability_enumeration : extension revision 1
VK_KHR_surface : extension revision 25
VK_KHR_surface_protected_capabilities : extension revision 1
VK_KHR_wayland_surface : extension revision 6
VK_KHR_xcb_surface : extension revision 6
VK_KHR_xlib_surface : extension revision 6
VK_LUNARG_direct_driver_loading : extension revision 1

Layers: count = 10
==================
VK_LAYER_FROG_gamescope_wsi_x86 (Gamescope WSI (XWayland Bypass) Layer (x86)) Vulkan version 1.3.221, layer version 1:
Layer Extensions: count = 0
Devices: count = 1
GPU id = 0 (AMD Custom GPU 0932 (RADV VANGOGH))
Layer-Device Extensions: count = 0

VK_LAYER_FROG_gamescope_wsi_x86_64 (Gamescope WSI (XWayland Bypass) Layer (x86_64)) Vulkan version 1.3.221, layer version 1:
Layer Extensions: count = 0
Devices: count = 1
GPU id = 0 (AMD Custom GPU 0932 (RADV VANGOGH))
Layer-Device Extensions: count = 0

VK_LAYER_MANGOHUD_overlay_x86 (Vulkan Hud Overlay) Vulkan version 1.3.0, layer version 1:
Layer Extensions: count = 0
Devices: count = 1
GPU id = 0 (AMD Custom GPU 0932 (RADV VANGOGH))
Layer-Device Extensions: count = 0

VK_LAYER_MANGOHUD_overlay_x86_64 (Vulkan Hud Overlay) Vulkan version 1.3.0, layer version 1:
Layer Extensions: count = 0
Devices: count = 1
GPU id = 0 (AMD Custom GPU 0932 (RADV VANGOGH))
Layer-Device Extensions: count = 0

VK_LAYER_RENDERDOC_Capture (Debugging capture layer for RenderDoc) Vulkan version 1.3.131, layer version 36:
Layer Extensions: count = 1
VK_EXT_debug_utils : extension revision 1
Devices: count = 1
GPU id = 0 (AMD Custom GPU 0932 (RADV VANGOGH))
Layer-Device Extensions: count = 2
VK_EXT_debug_marker : extension revision 4
VK_EXT_tooling_info : extension revision 1

VK_LAYER_RENDERDOC_Capture (Debugging capture layer for RenderDoc) Vulkan version 1.3.131, layer version 27:
Layer Extensions: count = 1
VK_EXT_debug_utils : extension revision 1
Devices: count = 1
GPU id = 0 (AMD Custom GPU 0932 (RADV VANGOGH))
Layer-Device Extensions: count = 2
VK_EXT_debug_marker : extension revision 4
VK_EXT_tooling_info : extension revision 1

VK_LAYER_VALVE_steam_fossilize_32 (Steam Pipeline Caching Layer) Vulkan version 1.3.207, layer version 1:
Layer Extensions: count = 0
```

### Steps to reproduce

Start the game on SteamDeck (with SteamOS).

This is my first project in Godot, so I might be doing something dumb, but I would expect at least an error message, or even better consistent behaviour.

I can help with additional info on request, and run tests.

### Minimal reproduction project (MRP)

I tried to create a minimal reproduction, but failed.

This is how it looks in project:
Game (Node / top-most; _ready runs)
└── GameSubViewportContainer
└── GameSubViewport
└── GameScaler (Node2D)
├── CursorRayCast2D (RayCast2D)
└── DebugCursorSprite2D (Sprite2D) <-- if starts HIDDEN ⇒ crash
├── Area2D
│ └── CollisionShape2D
└── Area2D2
└── CollisionShape2D

The full project can be found here [https://github.com/AndreasOM/fiiish-v3/tree/main/godot](https://github.com/AndreasOM/fiiish-v3/tree/main/godot)
Feel free to dissect it, but don't steal it ;)

Contributor guide

Open the contributing guide

Research direction

Start with the full project under the linked repository's godot directory and reproduce the crash on SteamOS with Godot 4.5, comparing the hidden and visible Sprite2D cases. Compare the result with the exported project on Godot 4.4.1 and macOS. Done means the reported scene no longer crashes on SteamOS/Linux, or the failure is narrowed to a reproducible engine subsystem.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
game-dev, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.