Skip to content

Releases: keithpotz/CrashCatch

CrashCatch v1.2.0

18 Apr 21:59

Choose a tag to compare

πŸš€ CrashCatch v1.2.0

CrashCatch v1.2.0 is our biggest update yet β€” bringing full Linux support, powerful callback hooks, and the groundwork for cross-platform crash diagnostics β€” all within a single header file.


✨ What's New

πŸ”§ Linux Support Finalized

  • βœ… POSIX signal handling now supports:
    • SIGSEGV – Segmentation fault
    • SIGABRT – Aborted process
    • SIGFPE – Floating-point exception
    • SIGILL, SIGBUS – Illegal instruction, bus errors
  • βœ… Stack traces via backtrace()
  • βœ… Demangled function names using __cxa_demangle
  • βœ… Executable path detection via /proc/self/exe

🧠 New CrashContext Struct

  • Contains detailed crash metadata passed into callback hooks:
    • .dmp file path (Windows)
    • .txt log path
    • timestamp
    • signal or exception code

πŸͺ onCrash and onCrashUpload Hooks

  • New configurable callbacks:
    config.onCrash = [](const CrashContext& ctx) {
        // Cleanup or logging before app terminates
    };
    
    config.onCrashUpload = [](const CrashContext& ctx) {
        // Send crash file to your server/service
    };```
    

Enabled cleanup, telemetry, logging, or remote upload logic right from the app!

πŸ›‘ Skips Debug Exceptions

Windows debug control exceptions (DBG_PRINTEXCEPTION_C, DBG_CONTROL_C) are now ignored to avoid false positives.

πŸ§ͺ Examples Added

  • 🧡 Example_ThreadCrash.cpp
  • βž— Example_divideByZero.cpp
  • πŸ’Ό Example_FullConfig.cpp β€” now includes onCrash
  • ☁️ Example_UploadCrash.cpp β€” demonstrates using onCrashUpload to simulate a remote crash report

πŸ›  Internal Improvements

  • Reorganized internal logic with clear inline documentation
  • Hardened Linux support for production use
  • Improved stack trace readability
  • Unified timestamp generation and path formatting

πŸ“ Documentation

  • Updated README.md with full platform details
  • New linux.md page under GitHub Pages
  • Refined screenshots, quick start, and crash log examples

πŸ“¦ CMake & CI

  • Enhanced CMake integration remains header-only
  • GitHub Actions CI runs automatically on push


🧭 Roadmap (Next Up)

  • macOS support via Mach exceptions
  • Remote crash uploads (via webhook or HTTPS endpoint)
  • .json crash logs
  • Crash viewer UI tool
  • Auto-rotate / cleanup of old log

🧠 Thanks & Community

Thanks to everyone who tested Linux support, contributed feedback, or opened issues. Let’s keep building it better β€” and safer.

If you like it, consider ⭐ starring the project!

CrashCatch v1.1.0 – Now with Linux Support

04 Apr 23:34

Choose a tag to compare

[1.1.0] – 2025-04-04

Added

  • 🐧 Linux support with POSIX signal handling
  • Signal-based crash capture for SIGSEGV, SIGABRT, and SIGFPE
  • Executable path resolution for Linux using /proc/self/exe
  • Stack traces using backtrace() and backtrace_symbols()

Changed

  • Refactored header-only implementation to be cross-platform
  • Improved crash log structure and formatting on Linux
  • Now detects and logs platform, architecture, and executable location

βœ… Bug Fix: Linux Compatibility Crash (#1)

Resolved a Linux-specific compilation error reported in #1, which occurred due to the use of Windows.h-specific types and headers on non-Windows systems.

πŸ”§ What changed:

  • CrashCatch now conditionally includes only platform-appropriate headers (e.g., Windows.h for Windows, signal.h and execinfo.h for Linux).
  • Windows-specific functionality (e.g., MiniDumpWriteDump, MessageBoxA) is fully gated behind #ifdef blocks.
  • Linux support now builds cleanly on GCC/Clang without needing to modify the source.

πŸ’‘ Impact:

CrashCatch v1.1.0 is now cross-platform out of the box and builds cleanly on Linux with no manual patching required.


Fixed

  • Crash log generation on Linux wasn't triggered for certain signals
  • Windows-only includes and defines now guarded by platform macros

Zip File

The zip file has the CMakeLists.txt and CrashCatch.hpp files included

CrashCatch v1.0.0 - Initial Public Release

01 Apr 18:17
b0975c0

Choose a tag to compare

πŸš€ CrashCatch v1.0.0 – Initial Public Release

CrashCatch is a single-header crash reporting library for modern C++ applications. This first release supports Windows and generates .dmp and .txt logs for unhandled exceptions.

🎯 Features

  • 🧠 Stack trace + exception context
  • πŸ’Ύ Minidump file (.dmp) generation
  • πŸ“‹ Human-readable log (.txt) with:
    • Stack trace
    • App version / build info
    • Thread ID / exception code
    • Uptime
  • βœ… Zero-config mode (CRASHCATCH_AUTO_INIT)
  • βš™οΈ Configurable versioning, notes, dialog, and crash callback
  • πŸͺ› One-liner setup via CrashCatch::enable()
  • πŸͺ„ Optional message box on crash (GUI-friendly)

πŸ“¦ Installation

🟒 CrashCatch is a single-header library.

To use it, simply copy 'CrashCatch.hpp' file into your project:

#include "CrashCatch.hpp"

Or you can auto-init with:

#define CRASHCATCH_AUTO_INIT
#include "CrashCatch.hpp"

πŸ“ Includes

  • CrashCatch.hpp – single header drop-in
  • 5 real-world examples in /examples/
  • Screenshots and logs in /screenshots/

πŸ›£ Future roadmap includes:

  • Linux/macOS support
  • Remote upload
  • JSON crash logs
  • Viewer GUI

Thank you for checking out CrashCatch!
Created and maintained by Keith Pottratz