Optick UE5 plugin deadlocks when stopping capture
arturmazurek opened this issue · comments
I have a deadlock when stopping Optick capture on a cook from UE5. It happens around 100% times during gameplay, in main menu is around 50%. OptickPlugin version is 1.4.0
Looking at callstacks two threads deadlock - the main game thread and render thread.
Game thread looks like this:
Core::Update()
locks the coreLock
and above it FOptickPlugin::StopCapture
tries to lock UpdateCriticalSection
Render thread looks like this:
And here FOptickPlugin::OnEndFrameRT
locks UpdateCriticalSection
and Core::EndUpdateFrame
tries to lock already locked coreLock
.
That results in deadlock. Unfortunately seems to me that fixing it requires a bit more understanding of the plugin than I have, so am reporting this as an issue instead of going for a pull request already.