Context
ActorComponents can schedule an end-of-frame update for themselves by calling UWorld::MarkActorComponentForNeededEndOfFrameUpdate. The UWorld will iterate all those actor components once per tick in:
UWorld::SendAllEndOfFrameUpdates()
which will iterate various actor component arrays of UWorld and call virtual functions like:
Component->OnPreEndOfFrameSync();
Those component arrays should not be modified during iteration, at least according to how the iteration is currently implemented, for example:
for (UActorComponent* Component : ComponentsThatNeedPreEndOfFrameSync) { if (Component) { ... // I.e: inside OnPreEndOfFrameSync ComponentsThatNeedPreEndOfFrameSync should not be modified Component->OnPreEndOfFrameSync(); ... } }
Problem
Users have reported crashes from ComponentsThatNeedPreEndOfFrameSync being modified during iteration. See reported callstack, which demonstrates USkeletalMeshComponent::HandleExistingParallelClothSimulation() calling FTaskGraphInterface::WaitUntilTaskCompletes(). This is problematic since that can trigger any arbitrary task graph tasks, which may modify ComponentsThatNeedPreEndOfFrameSync.
Suggestions
Avoid USkeletalMeshComponent::HandleExistingParallelClothSimulation() calling FTaskGraphInterface::WaitUntilTaskCompletes(), or make local copies of arrays in UWorld::SendAllEndOfFrameUpdates() for safe iteration. If we choose to fix it in UWorld, we should probably do the same for:
ComponentsThatNeedPreEndOfFrameSync ComponentsThatNeedEndOfFrameUpdate ComponentsThatNeedEndOfFrameUpdate_OnGameThread
i have this problem UE4CC-Windows-58DC12AF4B97F057BD108FBFF569B2E9_0000
I am not able to find world outliner how to enable it?
How can i modify the param name in EQS node
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
Delay nodes occasionally don't fire the "Completed" output in a nativized build
Teleporter in the Creative Hub is Locked and cannot be accessed
How to achieve HLSL Multiple Render Target in Material blueprints?
What method is used to fill polygonal regions when drawing spline mesh at run time?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-207947 in the post.
7 |
Component | UE - Gameplay - Components |
---|---|
Affects Versions | 5.3 |
Target Fix | 5.6 |
Created | Feb 23, 2024 |
---|---|
Updated | Sep 25, 2024 |