I experienced a crashed when using StackWalker, when the of a function on the stack does not fit in the _snprintf_s buffer, so if the resulting string is longer then STACKWALK_MAX_NAMELEN (1024). In that case, CRT terminates the process. This can happen e.g. when using boost data structures that use a lot of templates (e.g. boost::unordered::detail::func::construct_value_impl<std::allocator<boost::unordered::detail::ptr_node<std::pair<boost::thread::id const ,std::vector<cncsim::mwCNCSimApiLogger::CallInfo,std::allocatorcncsim::mwCNCSimApiLogger::CallInfo > > > >,boost::thread::id const ,std::vector<cncsim::mwCNCSimApiLogger::CallInfo,std::allocatorcncsim::mwCNCSimApiLogger::CallInfo >,boost::unordered::piecewise_construct_t const & __ptr64,boost::tuples::tupleboost::thread::id,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::tupleboost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type >)
Using _TRUNCATE when calling _snprintf_s, will truncate the function name instead of treating this as an error (see https://msdn.microsoft.com/en-us/library/ms175769.aspx)
I experienced a crashed when using StackWalker, when the of a function on the stack does not fit in the _snprintf_s buffer, so if the resulting string is longer then STACKWALK_MAX_NAMELEN (1024). In that case, CRT terminates the process. This can happen e.g. when using boost data structures that use a lot of templates (e.g. boost::unordered::detail::func::construct_value_impl<std::allocator<boost::unordered::detail::ptr_node<std::pair<boost::thread::id const ,std::vector<cncsim::mwCNCSimApiLogger::CallInfo,std::allocatorcncsim::mwCNCSimApiLogger::CallInfo > > > >,boost::thread::id const ,std::vector<cncsim::mwCNCSimApiLogger::CallInfo,std::allocatorcncsim::mwCNCSimApiLogger::CallInfo >,boost::unordered::piecewise_construct_t const & __ptr64,boost::tuples::tupleboost::thread::id,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::tupleboost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type >)
Using _TRUNCATE when calling _snprintf_s, will truncate the function name instead of treating this as an error (see https://msdn.microsoft.com/en-us/library/ms175769.aspx)