[Editor] Async method within ScriptComponent constructor crashes editor
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Release Type: GitHub
Version: 3.0.0.6 commit ac4e7e0
Platform(s): Windows Editor
Describe the bug
Occurs when adding it to an entity, tested with an async method running a Task.Delay of one second,the crash handler then pops up.
To Reproduce
See description.
Expected behavior
Fix the issue or detect and prohibit those kinds of implementation.
Screenshots
Log and callstacks
editor.txt
Additional context
-- Just to clarify : To future users ending up here, calling async methods within a constructor is never a good idea, this issue is only raised to strengthen the engine's stability.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the crash in the Windows Editor with an async method containing a one-second Task.Delay in a ScriptComponent constructor, using the reported 3.0.0.6 commit. Inspect editor.txt and its callstack to locate the failing editor path. Done means the editor no longer crashes, or these implementations are detected and prohibited.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- game-dev, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100