[GH-ISSUE #896] [DevTask] Remove uvPty callback before exiting #247

Closed
opened 2026-10-31 22:10:34 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @webfiltered on GitHub (Feb 13, 2025).
Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/896

Current

node-pty callback calls AppWindow.send()

  1. Close window
  2. AppWindow object destroyed
  3. Race condition:
    • IPC data triggers callback
    • Main process exits

Unhandled exception when IPC data wins.

Proposed

Kill node-pty process and ensure callback removal in before-quit or other early event.

┆Issue is synchronized with this Notion page by Unito

Originally created by @webfiltered on GitHub (Feb 13, 2025). Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/896 ### Current `node-pty` callback calls `AppWindow.send()` 1. Close window 1. AppWindow object destroyed 1. Race condition: - IPC data triggers callback - Main process exits Unhandled exception when IPC data wins. ### Proposed Kill node-pty process and ensure callback removal in before-quit or other early event. ┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-896-DevTask-Remove-uvPty-callback-before-exiting-1996d73d365081c78f4df989d8222190) by [Unito](https://www.unito.io)
bsakaguchi 2026-10-31 22:10:34 +00:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@dosubot[bot] commented on GitHub (May 15, 2025):

Hi, @webfiltered. I'm Dosu, and I'm helping the desktop team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • A race condition in the node-pty callback causes an unhandled exception.
  • The issue occurs when IPC data is received after the AppWindow object is destroyed.
  • Suggested fix: Terminate the node-pty process and remove the callback before quitting or during an early event.
  • No further comments or developments have been made on this issue.

Next Steps:

  • Is this issue still relevant to the latest version of the desktop repository? If so, please comment to keep the discussion open.
  • Otherwise, this issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

<!-- gh-comment-id:2884343600 --> @dosubot[bot] commented on GitHub (May 15, 2025): Hi, @webfiltered. I'm [Dosu](https://dosu.dev), and I'm helping the desktop team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - A race condition in the `node-pty` callback causes an unhandled exception. - The issue occurs when IPC data is received after the AppWindow object is destroyed. - Suggested fix: Terminate the `node-pty` process and remove the callback before quitting or during an early event. - No further comments or developments have been made on this issue. **Next Steps:** - Is this issue still relevant to the latest version of the desktop repository? If so, please comment to keep the discussion open. - Otherwise, this issue will be automatically closed in 7 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/desktop#247
No description provided.