You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(main): capture native/renderer/GPU crashes that left zero trace
User-reported: DevDeck sometimes closes with no apparent reason, taking every cockpit
session down with it. Investigated via systematic-debugging before touching any code:
- devdeck-errors.log (the v1.12.0 uncaughtException/unhandledRejection trap) doesn't
exist — that guard has never fired.
- Windows Application log has no Event 1000 ("Application Error") for DevDeck.exe/
electron.exe, ever.
- Windows System log shows only clean, scheduled restarts (no Kernel-Power 41 dirty
shutdown) around the relevant period.
- No WER report or crash dump for the running app (CrashDumps only has entries for the
OLD v0.3.0 NSIS *installer*, unrelated, from 2026-06-07).
- Only two app.quit() call sites in the codebase, both intentional (tray Quit, second-
instance lock) — no hidden quit path.
This rules out a JS-catchable exception, an OS-level dirty shutdown, a classic
OS-recorded native crash, and a rogue quit call — but the remaining candidates (a native
crash swallowed by Electron's Crashpad handler since crashReporter was never configured,
an external TerminateProcess, a renderer/GPU crash, a V8 OOM abort) all share one trait:
they leave NO trace anywhere with the app's previous instrumentation. There was nothing
left to investigate without adding observability first.
Added, with user's explicit "don't restart the app I'm using right now" constraint
respected throughout (build/test/QA only — the running instance was never touched):
- crashReporter.start({ uploadToServer: false }) — local-only minidumps for native
crashes (node-pty/conpty, Chromium) that previously vanished into Crashpad with no
trace. Nothing is ever uploaded.
- New installAppCrashHandlers (errorGuard.ts) wires `render-process-gone` /
`child-process-gone` — Electron `app` events (not `process` events, so the existing
guard couldn't see them) covering renderer/GPU/utility crashes, previously completely
unmonitored. Skips reason:'clean-exit' (a normal window close/reload) to avoid noise.
- Every diagnostic log line now includes a process.memoryUsage() snapshot, so a V8 OOM
pattern (long-running cockpit sessions accumulating buffered output) is visible in
hindsight even though the OOM abort itself can't be caught directly.
340 tests (+5, TDD). If DevDeck closes unexpectedly again, %APPDATA%\DevDeck\
devdeck-errors.log and app.getPath('crashDumps') should now hold real evidence instead
of nothing.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
0 commit comments