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
macOS: BrowserWindow.destroy() can cause segfaults #17558
Comments
cc @MarshallOfSound for potentially TouchBar-related crash |
Currently experiencing this issue, am on Electron 15.0.0, it indeed results in the entire app crashing. I believe it is the same issue based on the Mac OS crash report having an identical error + call stack. |
I hit this issue while running the test suite today:
|
Did some debugging, it looks like in some cases it is possible for an |
I think I hit a different stack trace possibly with the same underlying cause in the CI today:
|
This issue is caused when |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue. |
Preflight Checklist
Issue Details
Expected Behavior
Creating a modal
BrowserWindow
and closing it viadestroy()
on macOS, followed by creating a second modalBrowserWindow
and closing it viaclose()
should not produce any visual artifcats, nor leave the application in a inoperable state, nor lead to segmentation faults.Actual Behavior
Creating a modal
BrowserWindow
and closing it viadestroy()
, followed by creating a second modalBrowserWindow
and closing it viaclose()
summons parts (visual artifacts) of the previously destroyed first BrowserWindow (see our test-case and attached screenshot).Afterwards the application does not react to any input anymore and must be terminated forcefully.
On MacBookPros with a touchbar, in many cases, the application crashes with a segmentation fault or illegal hardware instruction:
To Reproduce
To reproduce run our test-case as follows:
Screenshots
The first modal BrowserWindow:
The second modal BrowserWindow (the first on has been destroyed):
The second modal BrowserWindow has been closed and the silhouette of the first one has reappeared:
Additional Information
BrowserWindow
gets closed viadestroy()
and the second one viaclose()
. If the second modalBrowserWindow
also gets closed viadestroy()
the issue does not appear. Also if bothBrowserWindows
get closed viaclose()
everything seems to be okay.The text was updated successfully, but these errors were encountered: