wolfpld / tracy

Frame profiler
https://tracy.nereid.pl/
Other
10.25k stars 692 forks source link

Tracy Profiler Crashes with Context Switch feature #856

Open satyajitidea opened 3 months ago

satyajitidea commented 3 months ago

I am facing one crashing issue with Profiler when Context switch feature is use:

Here is the crashing call stack:

$./tracy-profiler
tracy-profiler: /home/satyajit/projects/tracy/server/TracyWorker.cpp:6673: void tracy::Worker::ProcessContextSwitch(const tracy::QueueContextSwitch&): Assertion `item.End() == -1' failed.
Aborted (core dumped)

Normally, tracy profiler works with context switch information, but occasionally it crashes with above call stack. Any help would be appreciated.

wolfpld commented 3 months ago

You can probably build with asserts disabled and it will work. The worst that can happen is that some context switches will have incorrect data. But at that point, the incoming data is invalid anyway (the asserts protect against that), so the only solution would be to ignore the offending events. FWIW I can reproduce this on my end.

satyajitidea commented 3 months ago

Thank you so much!! After disabling assert,i can see tracy profiler is working as expected.