Repository navigation
Error reporting: Track Error API and opt-in crash reporting - #21
Merged
Merged
Conversation
Replace the GLog Error/Fatal listener with FAptabaseCrashReporter, which
hooks FCoreDelegates::OnHandleSystemError and OnShutdownAfterError, builds
a crash report from GErrorHist and sends it synchronously with a 3 second
timeout. Fatal errors never reach GLog at Fatal verbosity, so the listener
could not classify them, and non-fatal Error logs are too noisy to report
automatically. Rename the setting to bEnableCrashReporting to match the
other SDKs and drop the "unhandled" kind.
Use message-first parameter order internally to match the public API,
spell UFUNCTION defaults as FString(TEXT("...")), revert the no-op
RightChopInline clamp and its changelog claim, record the StartSession
idempotency change, and document that errors outside a session are not
captured. Add a parsing test for the crash report.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
On Apple and Unix platforms the engine's crash handler enables a crash allocator that suspends every other thread, including the HTTP thread, before OnHandleSystemError fires, so the synchronous send from the error handler never started and always timed out. The crash context also overwrites GErrorHist with the call stack there, so the parsed message was the first stack frame. The crash reporter now writes the report to Saved/Aptabase/Crashes from the error handler and the next session start sends pending reports under the crashed session ID, deleting a file once the server accepts or permanently rejects it and keeping it while offline. The fatal message is recovered from the "appError called" line the platform error device logs, with GErrorExceptionDescription as the fallback for native crashes. The immediate send is kept on Windows only, where the crash is handled on a separate thread, and completes on the HTTP thread so its status can be observed. Adds automation tests for the Apple error state and persistence. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The error dispatcher declared and defined EnqueueReport twice, which does not compile. README.md and llms.txt still described crash reports as sent synchronously and never persisted; they now match the persist-then-send-on-next-launch behaviour. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds structured error reporting to the Unreal SDK (plugin version 0.2.0 → 0.3.0).
UAptabaseBlueprintLibrary::TrackErrorand the Track Error Blueprint node for handled and fatal error reports. Reports carry capture-time session, timestamp, OS, app/SDK version, severity, kind and debug mode, truncated to the server limits.bEnableCrashReporting, off by default). Fatal errors that reach the engine's error handler during an active session (asserts,Fatallogs,LowLevelFatalError, native exceptions/signals) are built into a report fromGErrorHist, written toSaved/Aptabase/Crashes, and sent at the next session start under the crashed session's ID. Windows also attempts an immediate send with a 3 s timeout, since the HTTP thread keeps running there. The newest 10 pending reports are kept.POST /api/v0/errorper report. Network failures and HTTP 408/429/5xx are retried on later flushes; other 4xx (including 403 quota exhaustion) are discarded. Queue bounded to 25 outstanding reports, deduplicated up to 100 unique errors per session.StartSession()is idempotent while a session is active; in-flight event requests are cancelled and unbound when the provider is destroyed; responses without a body are guarded.llms.txt,CHANGELOG.md, andDocs/testing.md.Test plan
EnqueueReportdeclaration/definition).Aptabase.Errorsautomation suite in an editor build — seeDocs/testing.md. Covers JSON contract and field limits, retry codes, session context across sessions, deduplication, queue capacity, concurrent capture,GErrorHistparsing (Windows and Apple formats), and crash-report persistence/loading./api/v0/events, Track Error →/api/v0/error; verify 202 accepted, 400/403 not retried, 408/429/500 retried.-gamebuild: file appears underSaved/Aptabase/Crashes, is sent on the next launch and deleted after 2xx/4xx, survives an offline launch.🤖 Generated with Claude Code