Boost C++ Libraries: Ticket #13529: Symbols file for stacktrace is not loaded after deployment in Windows https://svn.boost.org/trac10/ticket/13529 <p> When testing simplest program using <code>boost::stacktrace</code> built with MSVC (toolset 14.1) it works perfectly on the machine it was built on, but when deployed to a different system function names (and source files with line numbers) are not resolved. </p> <pre class="wiki">#include "boost/stacktrace.hpp" int main() { boost::stacktrace::stacktrace stacktrace; std::cout &lt;&lt; boost::stacktrace::detail::to_string(stacktrace.as_vector().data(), stacktrace.size()) &lt;&lt; std::endl; return 0; } </pre><p> I have debugged this and it seems that the reason is that <code>IDebugSymbols</code> does not load symbol file located in the directory of the executable, but only the one saved in Portable Executable header (it worked when I copied the .pdb file into the same path as it is on my development system). </p> <p> I worked around this issue by creating my own <code>IDebugSymbols</code> instance (I copied the code creating it from frame_msvc.ipp <code>debugging_symbols::try_init_com</code>) and modifying the last line to add "." (current directory) to symbol search path with <code>IDebugSymbols::AppendSymbolPath</code>: </p> <pre class="wiki">if (S_OK == iclient-&gt;QueryInterface(__uuidof(IDebugSymbols), idebug.to_void_ptr_ptr())) idebug-&gt;AppendSymbolPath("."); </pre><p> This needs to be done only once during the process lifetime - it appears that the symbols paths string (or the symbols themselves) is cached, but I could not find documentation confirming it. Alternatively, the existence of "." part in the path could be checked with <code>IDebugSymbols::GetSymbolPath</code> during every <code>debugging_symbols::try_init_com</code> call. I also tested that <code>IDebugSymbols::AppendSymbolPath</code> checks current paths string and does not append duplicates (again could not find documentation to back this up) so it might be enough to always just try to append the "." during object initialization. </p> <p> PS there is no stacktrace option in the "Component" combobox in this form. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13529 Trac 1.4.3 John Maddock Thu, 10 May 2018 16:45:13 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/13529#comment:1 https://svn.boost.org/trac10/ticket/13529#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">obsolete</span> </li> </ul> <p> Moved to <a class="ext-link" href="https://github.com/boostorg/stacktrace/issues/55"><span class="icon">​</span>https://github.com/boostorg/stacktrace/issues/55</a> </p> Ticket