Skip to content

fix: EPIPE on a closed stdout no longer raises a main-process error dialog (0.5.1) - #2

Merged
RGB-loop merged 2 commits into
mainfrom
fix-stdout-epipe
Oct 15, 2026
Merged

RGB-loop merged 2 commits into
mainfrom
fix-stdout-epipe

Conversation

@RGB-loop

Copy link
Copy Markdown
Owner

Launching Vixel from a terminal and then closing it (or piping its output into a reader that exits early) made the next console.log throw write EPIPE as an uncaught exception → "A JavaScript error occurred in the main process" dialog.

  • src/core/stdioGuard.ts: swallow EPIPE on stdout/stderr (other stream errors still throw); imported at the top of the desktop main process and the server.
  • src/core/stdioGuard.test.ts: spawns a child that keeps logging, closes its stdout after one byte — without the guard it dies with an uncaught EPIPE (bug reproduced), with it it exits 0.
  • CHANGELOG: part of 0.5.1 (not yet released).

npm test: 360 passed.

…s error dialog

Launching Vixel from a terminal and then closing it (or piping its output to a reader
that exits) made the next console.log throw EPIPE as an uncaught exception. Swallow
EPIPE on stdout/stderr in the desktop main process and the server; regression test
reproduces the crash in a child process.
@RGB-loop
RGB-loop merged commit e8a90d4 into main Oct 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant