Skip to content

cf_crash_init

Category: crash
GitHub: cute_crash.h


Installs the crash reporter. Call it first thing in main, before cf_make_app.

bool cf_crash_init(CF_CrashConfig config, int argc, char** argv);
Parameters Description
config See CF_CrashConfig.
argc The program's arguments; the reporter's own flags (--cc-upload, --cc-watch, --cc-test) are handled here and never reach the game.
argv The program's arguments.

Return Value

Returns true when the reporter is active. False under a debugger, with CC_DISABLE=1 in the environment, or when the report directory cannot be made.

Remarks

Also uploads any report left by an earlier run (after asking the player once, when ask_consent is set) on a background thread, and registers the clean-exit marker with atexit, so a run that ends without reaching exit is reported as an abnormal exit next time. Threads made with cf_thread_create are attached automatically; a thread made some other way gains stack-overflow coverage through cf_crash_attach_thread.

CF_CrashConfig
cf_crash_defaults
cf_crash_breadcrumb
cf_crash_set
cf_crash_hang_pause