observe
on WorldEntityMut
may cause the reference to be invalidated
#16212
Labels
A-ECS
Entities, components, systems, and events
C-Bug
An unexpected or incorrect behavior
D-Modest
A "normal" level of difficulty; suitable for simple features or challenging fixes
S-Needs-Design
This issue requires design work to think about how it would best be accomplished
Milestone
Bevy version
0.15.0-rc.2 (present in 0.14.0) as well
What you did
Result
What went wrong
WorldEntityMut
depends on the fact that theEntityLocation
it caches does not change while it is alive, or changes when it itself expects it to.WorldEntityMut
lives, as this might cause queued despawns to be run.observe
internally callsworld.spawn()
.world.spawn()
implicitly has aflush()
in it, as evidenced in bug reportCommands
apply at unexpected times with exclusiveWorld
access #14621.WorldEntityMut
exists, which means any accesses will use outdatedEntityLocation
Additional information
Also related as context #16034.
The text was updated successfully, but these errors were encountered: