Crash Handlers
When a crash does happen, the verbose crash handlers (crash_handlers.h) produce a comprehensive report instead of cryptic Windows error codes.
What it captures
Section titled “What it captures”- Actual exception type and message — reveals
std::bad_allochidden behindSTATUS_STACK_BUFFER_OVERRUN - Full stack trace with symbol resolution
- Signal information (SIGABRT, SIGSEGV, etc.)
- Build info — toolkit version, git commit, compiler
- System info — Windows version, CPU, memory, computer name
- Diagnostic hints — actionable suggestions based on the exception type
Patching rippled
Section titled “Patching rippled”Apply the crash handlers to src/xrpld/app/main/Main.cpp:
// Add at top of file (after existing includes)#if BOOST_OS_WINDOWS#include "crash_handlers.h"#endif
// Add at start of main()#if BOOST_OS_WINDOWS installVerboseCrashHandlers();#endifA patch file is also available at patches/rippled_main.patch.
What crash output looks like
Section titled “What crash output looks like”Instead of a cryptic exit code, you get a full report showing:
- The real exception (
std::bad_alloc/bad allocation) - Why it appeared as
STATUS_STACK_BUFFER_OVERRUN - System memory state at the time of crash
- A complete stack trace with frame addresses and symbol names
- Build information for reproducibility
Single-header design
Section titled “Single-header design”crash_handlers.h is a single include file — no build system integration needed. Just include it and call installVerboseCrashHandlers().