{DO NOT MERGE] main process didn't close properly on Windows, triggering breakpoint error#3480
Draft
{DO NOT MERGE] main process didn't close properly on Windows, triggering breakpoint error#3480
Conversation
…before triggering windows breakpoint error message!
panaC
commented
Apr 2, 2026
|
|
||
| const endHandler = (event: Electron.Event) => { | ||
| debug("WINDOWS11 session-end event", event); | ||
| if (!library.isDestroyed()) { |
Member
Author
There was a problem hiding this comment.
Without force-closing the library windows, a system breakpoint error dialog is raised, blocking the shutdown process until the user confirms it by "OK"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3479
During shutdown on Windows, there is not enough time to persist the final state.
When the application waits for persistence to finish before closing the main process, a Windows breakpoint error is raised. This error blocks the shutdown entirely instead of allowing the process to terminate gracefully in the background.
This PR is currently broken. I was not able to resolve the issue in time for the 3.4 release without refactoring how final persistence is handled during the Windows session-end events.
This is not a major issue, as the runtime and patches are recovered on the next startup. Thanks to this commit 4b53a27
The session-end event should immediately close or destroy all BrowserWindow instances, without attempting to perform additional work in the main process.
This issue may not be fully fixable on Windows, as the OS does not reliably allow enough time to persist the final state during shutdown or reboot.