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

cancel_upload()

Error

discard_report(id: String)

String

get_app_id() const

String

get_app_name() const

String

get_app_version() const

String

get_build_channel() const

String

get_build_id() const

String

get_contact_url() const

String

get_crash_directory() const

String

get_endpoint() const

String

get_last_dump_path() const

Array[Dictionary]

get_pending_reports() const

String

get_privacy_policy_url() const

String

get_reporter_path() const

Dictionary

get_resolved_config() const

int

get_upload_mode() const

bool

has_pending_reports() const

void

induce_crash()

bool

is_available() const

bool

is_breakpad_enabled() const

bool

is_enabled() const

bool

is_http_upload_available() const

bool

is_uploading() const

Error

launch_reporter(report_id: String = "")

Error

mark_report_submitted(id: String)

Error

upload_pending()

Error

upload_report(id: String)

String

write_minidump()


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).


bool is_enabled() const ๐Ÿ”—

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.


Error upload_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.


String write_minidump() ๐Ÿ”—

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.