-
Notifications
You must be signed in to change notification settings - Fork 3
Home
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!
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.
- Put the matching binary for your server in
garrysmod/lua/bin/. - 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.
- 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.
-
Lua API - the
crashcapturetable and knowing when it's ready. - Console Commands - console commands for interacting with crash capture.
- Recovery Hooks - reacting to recovered freezes from Lua.
- Manual Dump - forcing a report on demand.
- Reading Reports - what is in a report and where it lands.
- 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.*).
- Hooking - the inline hook library.
- Signatures - the signature scan and address resolution library.
- C API - extending crash capture from your own binary module.
Getting started
Usage
Features
For module developers