Skip to content

TRACY_ON_DEMAND not capturing LuaHook traces when lua runs in a game-loop coroutine #1320

@TheCycoONE

Description

@TheCycoONE

I'm using Tracy 0.13.1 from vcpkg; on https://github.com/CorsixTH/CorsixTH

I found that if I enable the on-demand feature then even though I registered the LuaHook the lua functions do not show up in the Tracy gui even though the LuaHook function is being called.

if ( zoneCnt != 0 && !GetLuaZoneState().active ) return; returns non-zero and exits based on my debugging.

I suspect what is happening is that CorsixTH runs almost entirely within a co-routine, and even when running the Tracy gui before the program starts, the initial coroutine zone starts before the debugger is ready which causes it to discard every further zone.

Maybe it would be better to keep the current stack zone stack until the profiler is connected?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions