Native crash capture on Windows and Linux

Open
#623 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
28/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
dart, flutter

Research direction

Start by reviewing PR #621 and the existing Dart exception-capture path, then define the Windows/Linux native integration points and consent behavior. Add the native integration tests described here using a crashing test plugin or FFI library, and verify next-launch reporting, opt-out behavior, matching symbol artifacts, and documented limitations.

Written by the indexing model from the issue text.

Description

enhancement feature/error-tracking
Problem Statement

PR #621 adds Windows/Linux support but explicitly excludes native crash capture. Dart error hooks cannot reliably observe crashes in the Flutter engine, native plugins, or libraries called through dart:ffi when those failures terminate the process before Dart callbacks execute.

Examples include Windows access violations and Linux segmentation faults or aborts. These failures currently have no desktop native crash-reporting path in the SDK. This is a follow-up feature request, not a blocker for the documented scope of #621.

Solution Brainstorm

Add opt-in native crash capture for Flutter applications on Windows and Linux:

  • Integrate platform-appropriate crash collection for supported native engine/plugin/FFI failures.
  • Persist crash records safely and report them on the next launch when immediate delivery is impossible, respecting consent and SDK configuration.
  • Include native stack addresses, matching loaded-image/debug identifiers, and app/build context. Document the required symbol-upload workflow and supported symbol formats for readable stacks.
  • Document limitations clearly; do not promise capture of every process termination, hang, or out-of-memory failure.
Validation

Add native Windows/Linux integration tests that deliberately trigger a crash in a test plugin or FFI library, restart the application, and verify the resulting $exception event. Cover opt-out behavior and release-build symbolication with matching artifacts.

Keep this distinct from Dart exception capture, background-isolate forwarding, and Dart obfuscated-stack support.

Related
  • Desktop support: #51
  • Initial Windows/Linux implementation: #621
  • Android-native crash tracking: #490 (different platform scope)
Dominant language
Dart
Stars
99
Forks
94
Avg merge
2d 4h
Merged PRs (30d)
65

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PostHog/posthog-flutter

All issues in PostHog/posthog-flutter

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.