godotengine / godotengine/godot
`Condition "!tasks.has(p_task)" is true` error message after loading project
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in v4.3.dev6.mono.official [89850d553]
### System information
Godot v4.3.dev6.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 6GB (NVIDIA; 31.0.15.5212) - Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz (4 Threads)
### Issue description
Sometimes I get this error after loading project:

```
Godot Engine v4.3.dev6.mono.official (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.
--- Debug adapter server started ---
--- GDScript language server started on port 6005 ---
[LSP] Connection Taken
Task 'update_scene_groups' already exists.
editor/progress_dialog.cpp:215 - Condition "!tasks.has(p_task)" is true.
```
### Steps to reproduce
1. Start Godot
2. Select project from project manager
3. Wait for the project to be loaded
-> sometimes you get this error
Unfortunately I don't know how to reliable reproduce this error. It _feels_ like get I the error very often when starting Godot first time after booting the computer. I realoaded the project using `Project | Reload Current Project` about 20 times and restarted Godot about 10 times without getting the error. So my guess is that this bug happens only when loading the project takes too long. My quite old computer takes about 12 seconds to open the project.
### Minimal reproduction project (MRP)
N/A
Contributor guide
Research direction
Start with editor/progress_dialog.cpp at line 215 and review how the update_scene_groups task is created during project loading. Try loading a project from the project manager on the reported Godot version, especially on a slower startup, and observe whether the task is registered twice. Done means the reported assertion no longer appears during project loading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100