bombomby / optick

C++ Profiler For Games

Home Page:https://optick.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Optick UE5 plugin deadlocks when stopping capture

arturmazurek opened this issue · comments

commented

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:
image
Core::Update() locks the coreLock and above it FOptickPlugin::StopCapture tries to lock UpdateCriticalSection

Render thread looks like this:
image
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.