Skip to content

v1.5.0

Choose a tag to compare

@blueshank-gh blueshank-gh released this 01 Sep 15:05
· 4 commits to master since this release
ca26c50

What's Changed

Features

Warning

We recommend not using "require" GMCL on single-player, as the pause mechanics break the watchdog.
We are working on fixing this by detecting for single-player pause mechanics.
Please see #10 for further tracking of this problem.

Hang Mapper

The code bellow was used to intentionally hang the server based on #33
Hang mapper is expected to indicate several locations of interest based on this as Lua and C is traversed.

local f = file.Open("gmod.exe", "rb", "BASE_PATH")
while true do f:ReadByte() end
image

Profiler Improvements

On v1.4.1 there was confusion on the method of profiling from lua:hook.lua's self-ms and downstream hooks, this is no longer the case to clear up confusion.
This also comes with addition support for command lua boundary to profile the execution of console commands.
{F874507E-D211-4286-9B40-3DD29C6DA4E3}

API Layer

A new API layer was added to this PR to allow for third-party binary developers to make use of:

#include "crashcapture_api.h"

#ifdef _WIN32
#define EXPORT_GM13 extern "C" __declspec(dllexport)
#else
#define EXPORT_GM13 extern "C" __attribute__((visibility("default")))
#endif

EXPORT_GM13 int gmod13_open(struct lua_State* L)
{
    CCAPI* cc = CC_ENSURE_API(); // I would cache this in a static variable...
    cc->dump("example_dump"); // force a dump
    return 0;
}

EXPORT_GM13 int gmod13_close(struct lua_State* L)
{
    return 0;
}

Installation

This is a list of possible routes for you to install the binary into the game engine.
I highly recommend carefully reading which ones you would like to chose.

Windows

  • Rename the CL/SV binary into version.dll and place it near the executable of garry's mod
  • Rename the CL/SV binary as gm(cl/sv)_crashcapture_win(32/64).dll and place it in the lua/bin folder for require
  • Place the SV binary as a plugin in lua/bin folder and create a .vdf in the addon's folder to load it
  • Inject the CL/SV binary into the garry's mod process

Note

Some garry's mod branches contain different locations for where gmod.exe real executable may be.
For no.1, we recommend that you do not place crash capture next to the gmod.exe launcher

Linux

  • Rename the CL/SV binary as gm(cl/sv)_crashcapture_linux(null/64).dll and place it in the lua/bin folder for require
  • Place the SV binary as a plugin in lua/bin folder and create a .vdf in the addon's folder to load it
  • Inject the CL/SV binary into the garry's mod process

Note

Client native linux builds are experimental due to a lack of testing infrastructure.