bombomby / optick

C++ Profiler For Games

Home Page:https://optick.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sampling capture silently fails on Windows

mropert opened this issue · comments

Trying to get sampling profiles on Windows sometimes results in an empty capture.

It is unclear to me what exactly fails. Here's what I found so far:

  • Sample captures are usually missing on a new machine/setup. Instrumentation works fine.
  • Debugging the target app once in MSVC and loading all symbols seems to fix subsequent capture.
  • Clearing the symbol cache in MSVC does not break the ability to make new sampling captures.

There seems to be some quirk of DbgHelp that is fixed by debugging the target once in MSVC. Perhaps logging/reporting the errors returned by the Windows API in the Optick library could shed more light to it?