stride3d / stride3d/stride

[Concurrency] Support concurrent operations with entities

Open
#652 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

when spawning threads during Update (in my case in the update of a gameSystem)
and adding or removing Components concurrently, then sometimes the engine crashes.
even when working on different entities.
i think its the lazy loading mechanism that "connects" diffrent entity operations.

in my case it was/is in EntityManager.CheckEntityComponentWithProcessors
when changing the mapping.
(MapComponentTypeToProcessors.Add(componentType, processorsForComponent);)
iirc it crashes on other locations too.

since maybe the engine wasnt designed for such a process, i made it a feature request,
if u also think its a bug then change it :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing concurrent component additions and removals during Update, including the case where operations affect different entities. Inspect EntityManager.CheckEntityComponentWithProcessors and the MapComponentTypeToProcessors mapping mentioned in the report. Done means the engine no longer crashes during these concurrent operations, including crashes reported at other locations.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.