tracy
tracy copied to clipboard
tracy-capture and connected client app hangs before shutdown
I met the bug, when I run my app, built on CI server, and connect tracy-capture to it - before shutting down, both app and tracy are hanging.
What I have found by myself:
- Tracy server was handling QuerySourceCode commands differently for files that are not valid. In app binaries, built on server, file names were taken from server paths, but it's not exists locally, so tracy claims those files as invalid.
- Due to different QuerySourceCode handling behavior for the invalid files,
TracyWorker::m_sourceCodeQueryhad not been cleared before termination. But in case of termination, tracy checked this variable on emptiness to understand, has it some work to do - and in case if yes, it continues its main loop (TracyWorker.cpp, 2852 in 0.11.1 version). It causes infinite waiting, becausem_sourceCodeQuerywill not be cleared in any case further. - Client app waits until tracy completes its shutdown before shutdown itself. So it's hanging with tracy too.
- So if I remove
!m_sourceCodeQuery.empty()check, everything will be fixed.
What's there incorrect and how this suppose to work normally? Does this check really needs there?