Quick answer: Unreal Mass tag addition during entity iteration crashing? Tag changes structurally rearrange archetypes - defer mutations via Context.Defer.

Iterate units; mark some as dead via tag. Crashes in iteration with archetype inconsistency.

Defer via Context.Defer

Context.Defer().PushCommand<FMassCommandAddTag>(Entity);

Deferred queue runs after the iteration; safe.

Or collect-then-mutate

First pass collects entities to mutate; second pass applies. Two cheap passes; safe.

Audit Mass loops

Any tag/fragment mutation inside ForEach is a candidate for the bug.

“Mass iteration assumes structural stability. Mutation breaks the assumption.”

Establish the deferred-mutation pattern from project start. Mass entity codebases that don't have ad hoc deferral logic riddled through them.

Related reading