RudjiGames / MTuner

MTuner is a C/C++ memory profiler and memory leak finder for Windows, PlayStation 4 and 3, Android and other platforms
BSD 2-Clause "Simplified" License
2.63k stars 145 forks source link

getStackTrace() sometimes returns empty stacktrace resulting "Capture file was only partially loaded!" #66

Closed ikrima closed 2 years ago

ikrima commented 4 years ago

Been chasing a nondeterministic bug where the trace file gets corrupted for a couple of days Finally found culprit to be RtlCaptureStackBackTrace() sometimes returning 0/no stacktrace

Some odd tidbbits:

Any ideas/thoughts as to what's going on? Maybe someone has some insight before having to dive into RtlCaptureStackBackTrace() internals

milostosic commented 4 years ago

Thank you for chasing this one. Frankly, I have no idea why it would return zero/no trace or succeed on a repeated call :/ I may look at this at some point but swamped with other things at the moment

ikrima commented 4 years ago

No worries! The workaround is pretty stable so it's not super critical; just very perplexed by the behavior so i'll probably step away from it for a bit and resume my investigation with fresh eyes