Skip to content

Releases: keithpotz/CrashCatch

CrashCatch v1.2.0

18 Apr 21:59
Compare
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
Compare
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
Compare
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