I suspect that when FFastGeoAsyncRenderStateJobQueue::Tick happens if there is queued work started by FFastGeoAsyncRenderStateJobQueue::Launch that FFastGeoAsyncRenderStateJobQueue::AreAsyncTasksExecuted could return true because UE::Tasks::HasWork loads the TaskCount atomic with std::memory_order_relaxed. When FFastGeoAsyncRenderStateJobQueue::AreAsyncTasksExecuted is then true but work is still in flight the check(PipeTasks.IsEmpty()); fails.
Steps to Reproduce
Load into a very content dense scene and then teleport to another part of the world that is also very content dense and sometimes a check trips.
Hi Bryan, you are right, the checks are invalid.
I will go ahead and remove that whole chunk of code :
#if DO_CHECK
if (AreAsyncTasksExecuted())
{
check(PipeTasks.IsEmpty());
check(PipedJobs.IsEmpty());
check(!IsReadyToRunAsyncTasksEvent.IsSet());
}
#endif
Submitted fix in our main branch (CL 46886071).
Thanks
I have also confirmed that added update to the FFastGeoAsyncRenderStateJobQueue class using bForceWaitCompletion to WaitForAsyncTasksExecution does not resolve the issue as the path taken to Tick seen has bForceWaitCompletion false.