Hi Epic!
Our testers found a bug. Game stay in processes after exit.
We attached to game process and found a thread which infinitely waiting the end of GPU work with samples.
Here the code:
// Some samples still need the GPU to get done. Use async task to get this done...
TFunction<void()> FlushTask = [LastObjects{ MoveTemp(Objects) }]()
{
while (1)
{
int32 Idx = 0;
for (; Idx < LastObjects.Num(); ++Idx)
{
if (LastObjects[Idx].GPUFence.IsValid() && !LastObjects[Idx].GPUFence->Poll())
{
break;
}
}
if (Idx == LastObjects.Num())
{
break;
}
FPlatformProcess::Sleep(5.0f / 1000.0f);
}
};
Async(EAsyncExecution::ThreadPool, MoveTemp(FlushTask));
In this code the the “LastObjects[Idx].GPUFence->Poll()” always return false. And as result of infinity loop the main thread infinitely wait and can’t exit from app.
Thanks!