Open andylizi opened 2 years ago
One thing you might be able to try is to call SymCleanup
perhaps? I think you'd need to call SymInitialize
at some point afterwards though since this crate thinks that the symbols have already been initialized. I don't know precisely how this works internaly in dbghelp.dll though.
backtrace-rs
usesStackWalkEx
on Windows, which callsSymLoadModuleEx
in turn. The symbol modules are never unloaded afterward, keeping the PDB files open until the process exits.Normally this wouldn't be an issue, since most programs exit on panic anyway. But it's causing rust-lang/rust-analyzer#9932, where when a proc macro panics in rust-analyzer, it locks the PDB file and making subsequent build attempts fail:
Steps to reproduce