Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling exceptions in IDE main to avoid entering "zombie process" state. #3648

Merged
merged 6 commits into from
Aug 16, 2022

Conversation

mwu-tow
Copy link
Contributor

@mwu-tow mwu-tow commented Aug 15, 2022

Pull Request Description

This is meant to address https://www.pivotaltracker.com/story/show/182691027.

Important Notes

Checklist

Please include the following checklist in your PR:

  • The documentation has been updated if necessary.
  • All code conforms to the
    Scala,
    Java,
    and
    Rust
    style guides.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed: Enso GUI was tested when built using BOTH
      ./run ide build and ./run ide watch.

@mwu-tow mwu-tow added the CI: Ready to merge This PR is eligible for automatic merge label Aug 15, 2022
Comment on lines +510 to +517
// It is critical that the main function runs in its entirety. Otherwise, IDE enters a "zombie
// process" state, where Electron processes have been spawned, but there is no window and user can't
// observe anything. Usually they will try to spawn another instance of the IDE, but this can fail
// because of these zombie process presence.
//
// The solution is to catch all errors and exit the process if any part of the initial setup fails.
// If it succeeds, at least the Window will be shown, allowing the user to observe the error and
// close it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// It is critical that the main function runs in its entirety. Otherwise, IDE enters a "zombie
// process" state, where Electron processes have been spawned, but there is no window and user can't
// observe anything. Usually they will try to spawn another instance of the IDE, but this can fail
// because of these zombie process presence.
//
// The solution is to catch all errors and exit the process if any part of the initial setup fails.
// If it succeeds, at least the Window will be shown, allowing the user to observe the error and
// close it.
// It is critical that the main function runs in its entirety. Otherwise, IDE enters a "zombie
// process" state, where Electron processes have been spawned, but there is no window and the user can't
// observe anything. Usually, they will try to spawn another instance of the IDE, but this can fail
// because of these zombie process presence.
//
// The solution is to catch all errors and exit the process if any part of the initial setup fails.
// If it succeeds, at least the window will be shown, allowing the user to observe the error and
// close it.

@mergify mergify bot merged commit 6c82588 into develop Aug 16, 2022
@mergify mergify bot deleted the wip/mwu/zombie-processes-fix branch August 16, 2022 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants