Skip to content

Crash Handlers

When a crash does happen, the verbose crash handlers (crash_handlers.h) produce a comprehensive report instead of cryptic Windows error codes.

  • Actual exception type and message — reveals std::bad_alloc hidden behind STATUS_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

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();
#endif

A patch file is also available at patches/rippled_main.patch.

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

crash_handlers.h is a single include file — no build system integration needed. Just include it and call installVerboseCrashHandlers().