CrashReporter๏
Inherits: Object
Engine singleton for crash dump detection, sidecar launch, and optional in-engine upload.
Description๏
CrashReporter records native crashes as Breakpad minidumps when the engine is built with crash_reporter=yes (export templates) or editor_crash_reporter=yes (editor). Identity is get_app_id() plus get_build_id() (shared with Analytics). Ingest POSTs send X-App-Id and X-Build-Id.
Editor identity is baked at compile time (editor_app_id, editor_build_id) and cannot be set from CLI, environment, or Editor Settings. If editor_app_id is omitted, the editor uses custom_blazium_engine. If editor_build_id is omitted, the editor uses the engine git hash. Export templates may optionally bake template_app_id, template_build_id, and template_crash_reporter_endpoint; a non-empty bake locks that field (Project Settings show it read-only). Empty template bakes stay writable and use Project Settings. The editor prints dump paths to the console. Pass --crash-reporter <path> when launching the editor to spawn a sidecar (the sidecar still receives the already-resolved ids). Exported games look next to the executable for ProjectSettings.application/crash_reporter/reporter_filename (or ProjectSettings.application/crash_reporter/reporter_path) when upload_mode is Sidecar or Both. Optional ProjectSettings.application/crash_reporter/reporter_sha256 is checked at startup. See get_resolved_config().
Methods๏
void |
|
discard_report(id: String) |
|
get_app_id() const |
|
get_app_name() const |
|
get_app_version() const |
|
get_build_channel() const |
|
get_build_id() const |
|
get_contact_url() const |
|
get_crash_directory() const |
|
get_endpoint() const |
|
get_last_dump_path() const |
|
get_pending_reports() const |
|
get_privacy_policy_url() const |
|
get_reporter_path() const |
|
get_resolved_config() const |
|
get_upload_mode() const |
|
has_pending_reports() const |
|
void |
|
is_available() const |
|
is_breakpad_enabled() const |
|
is_enabled() const |
|
is_http_upload_available() const |
|
is_uploading() const |
|
launch_reporter(report_id: String = "") |
|
upload_report(id: String) |
|
Signals๏
upload_failed(id: String, error: String, response_code: int) ๐
Emitted when an in-engine upload fails.
upload_progress(id: String, sent: int, total: int) ๐
Emitted as an in-engine upload starts sending bytes.
upload_started(id: String) ๐
Emitted when an in-engine upload begins.
upload_succeeded(id: String, response_code: int) ๐
Emitted when an in-engine upload receives an HTTP 2xx response.
Enumerations๏
enum UploadMode: ๐
UploadMode UPLOAD_DISABLED = 0
Do not upload or spawn a sidecar.
UploadMode UPLOAD_IN_ENGINE = 1
Upload pending dumps from the game process on the next launch.
UploadMode UPLOAD_SIDECAR = 2
Launch the configured reporter binary.
UploadMode UPLOAD_BOTH = 3
Use both in-engine upload and the sidecar reporter.
Method Descriptions๏
void cancel_upload() ๐
Requests cancellation of an in-progress in-engine upload.
Error discard_report(id: String) ๐
Deletes the dump, metadata, and state files for id.
String get_app_id() const ๐
Returns the product id sent with crash metadata and X-App-Id. In the editor this is the SCons-baked value. In exported games a non-empty template_app_id bake wins and is locked; otherwise Project Settings are used. Shared with Analytics.get_app_id(). There is no engine CLI override.
String get_app_name() const ๐
Returns the resolved product display name.
String get_app_version() const ๐
Returns the resolved product version.
String get_build_channel() const ๐
Returns the resolved build channel (dev, beta, release, or custom).
String get_build_id() const ๐
Returns the build id sent with crash metadata and X-Build-Id. In the editor this is the SCons-baked value. In exported games a non-empty template_build_id bake wins and is locked; otherwise Project Settings are used. Shared with Analytics.get_build_id(). There is no engine CLI override.
String get_contact_url() const ๐
Returns the resolved contact or bug-tracker URL.
String get_crash_directory() const ๐
Returns the directory where .dmp files and sidecar JSON are stored.
String get_endpoint() const ๐
Returns the resolved ingest URL.
String get_last_dump_path() const ๐
Returns the filesystem path of the most recently written minidump, or an empty string if none exists yet.
Array[Dictionary] get_pending_reports() const ๐
Returns pending crash reports as dictionaries with id, dump_path, metadata, and state.
String get_privacy_policy_url() const ๐
Returns the privacy policy URL shown by a custom reporter UI.
String get_reporter_path() const ๐
Returns the resolved sidecar reporter executable. In the editor this comes from --crash-reporter. In exported games it is the file next to the executable named by ProjectSettings.application/crash_reporter/reporter_filename, falling back to ProjectSettings.application/crash_reporter/reporter_path. A non-empty ProjectSettings.application/crash_reporter/reporter_sha256 must match or this returns empty.
Dictionary get_resolved_config() const ๐
Returns resolved crash-reporter settings. Editor identity is compile-time only; exported games use Project Settings. Sidecar path still comes from --crash-reporter in the editor.
int get_upload_mode() const ๐
Returns the resolved upload mode.
bool has_pending_reports() const ๐
Returns true if unsubmitted dumps exist in the crash directory.
void induce_crash() ๐
Triggers a native access violation so the platform crash handler writes a Breakpad dump. The process does not return. No-op (prints an error) when Breakpad was not compiled in.
bool is_available() const ๐
Returns true when the CrashReporter module is compiled in.
bool is_breakpad_enabled() const ๐
Returns true when Breakpad dump generation was compiled in (USE_BREAKPAD).
Returns the resolved master switch. When false, dumps may still be written but spawn and upload are skipped.
bool is_http_upload_available() const ๐
Returns true in export templates built with crash_reporter=yes. Always false in the editor.
bool is_uploading() const ๐
Returns true while an in-engine upload is running.
Error launch_reporter(report_id: String = "") ๐
Spawns the configured sidecar reporter. In the editor this requires --crash-reporter <path>.
Error mark_report_submitted(id: String) ๐
Marks id as submitted so it is no longer pending.
Uploads all pending reports using the in-engine HTTP client. Call this after the player consents when ProjectSettings.application/crash_reporter/require_user_consent is true.
Error upload_report(id: String) ๐
Uploads a single pending report by id.
Writes a minidump without terminating the process. Returns the dump path, or an empty string if Breakpad is not enabled. Also writes/updates the metadata sidecar.