Skip to content

use_sub_threads makes the game freeze when it's set to true #122536

Description

@Lerpwave

Tested versions

Reproducible on Godot 4.7.1, 4.8 dev 3

System information

Godot v4.7.1.stable - Ubuntu 22.04.5 LTS 22.04 on X11 - X11 display driver, Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Ti (nvidia; 580.173.02) - 13th Gen Intel(R) Core(TM) i5-13600KF (20 threads) - 15.42 GiB memory - PulseAudio (44100 Hz, Stereo/mono)

Issue description

In my game ResourceLoader.load_threaded_request use_sub_threads = true never worked.
The issue wasn't solved by #118185.

I'm working on a large project and I didn't manage to do a MRP.
So I tried a different approach, I searched for small demos and added a scene that is set as the main scene, it loads a choosen scene with use_sub_thread set to true.

I tried a few godot demos, many just worked but I found 2 that didn't always load with use_sub_thread:

Name Number attempts Number of freeze Scene loaded (PATH) Works if use_sub_thread = false Also freezes on 4.8 dev 3 link
Gdquest TPS demo 30 29 res://main.tscn Yes (30 attempts) yes https://github.com/gdquest-demos/godot-4-3d-third-person-controller
Godot Third-Person Shooter Demo 90 6 res://level/level.tscn Yes (30 attempts) yes https://github.com/godotengine/tps-demo

The ones that had no problem:
From https://github.com/godotengine/godot-demo-projects :

name scene
squash the creeps demo res://Main.tscn
RigidBody Character 3D Demo res://level.tscn
Platformer 3d demo res://game.tscn

From https://github.com/gdquest-demos/

name scene
New features in Godot 4 (GDQuest) 3d_physics_nodes.tscn
New features in Godot 4 (GDQuest) 3d_balls_pool.tscn
Gdquest Open Rpg res://src/main.tscn

Steps to reproduce

  1. Download the attached load.zip, and extract it on the Gdquest TPS demo or the Godot Third-Person Shooter Demo.
  2. Set the main scene of the demo in the Project Settings to load.tscn.
  3. Set the PATH in load.gd to respectively res://main.tscn or res://level/level.tscn
  4. Launch the game until it freezes.

Minimal reproduction project (MRP)

load.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    For team assessment

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions