Skip to content
BlueShank edited this page Sep 6, 2026 · 8 revisions

The sole goal of the project is to report, mitigate and recover severe crashes/hangs.
This is targeting baseline garry's mod, not custom implementations/overrides to the game.
However this can work on heavily modified versions of the game.

Thanks to Buildstruct for infrastructure testing.
Based on https://github.com/Python1320/gmsv_segfault

Warning

Do not share crash captures to others unless you have sanitized them, they can contain private/sensitive information about your server!

What it does

When your server crashes or freezes, you normally get nothing useful... the process just dies.
This plugin catches those failures and writes a readable report explaining what happened and where, so you can actually track down the problem.

It handles two kinds of failures:

  • Crashes - the game hits a fatal error and would otherwise close silently.
  • Freezes (hangs) - the server stops responding (for example, a stuck script looping forever).

Either way, you get a report file describing the failure.
Reports are saved as Markdown files in a crashes/ folder at your GMod root. See Reading Reports for what is inside them.

Quick start

  1. Put the matching binary for your server in garrysmod/lua/bin/.
  2. Add require("crashcapture") to a server autorun script.

That's it, once loaded, it watches for crashes and freezes on its own.
See Installation for the other ways of attaching (source plugin, sideloading) and which one to pick.

Documentation

Getting started

  • Installation - getting the binaries and loading them.
  • Configuration - every setting, the config file and how values are resolved.
  • Building - how to build the plugin yourself, matching CI.

Usage

Features

  • Lua Profiler - per-call profiling from C++, above LuaJIT.
  • Patcher - the engine patch system and every compiled-in fix.
  • Crash Script Diagnostics - running your own Lua in a fresh state on every crash (CRASHCAPTURE_SCRIPT + mem.*).

For module developers

  • Hooking - the inline hook library.
  • Signatures - the signature scan and address resolution library.
  • C API - extending crash capture from your own binary module.

Clone this wiki locally