[Bug]: macOS: Closing child window during parent window's resize event causes segfault if toggling full-screen mode with keyboard #40930
Labels
28-x-y
29-x-y
bug 🪲
has-repro-gist
Issue can be reproduced with code at https://gist.github.com/
platform/macOS
status/confirmed
A maintainer reproduced the bug or agreed with the feature
Preflight Checklist
Electron Version
28.1.0
What operating system are you using?
macOS
Operating System Version
macOS 14.2.1 (Sonoma)
What arch are you using?
arm64 (including Apple Silicon)
Last Known Working Electron version
27.2.1
Expected Behavior
Our app sometimes creates windows that are children of the main window for showing information temporarily; they're supposed to close when the main window moves or resizes, among other conditions, so we have:
The
resize
andmove
events fire when the main window enters or leaves full-screen mode (macOS), and we expect that we should be able to close the child window in those situations as well.Actual Behavior
When the main window enters or leaves full-screen mode in response to the keyboard shortcut (Fn+F), if one of these child windows is present to be closed, the entire app disappears with an error message (from the OS, I believe) indicating
EXC_BAD_ACCESS (SIGSEGV)
. (I can provide the full crash report on request, but I've found the gist can produce one readily.)The crash has not happened to me if I use other means to resize or move the window, such as clicking the full-screen button (the green traffic-light button) or dragging the edge of the window.
Testcase Gist URL
https://gist.github.com/SpoilerJones/e3f4c0de67559449ffb1e1c21157609f
Additional Information
Using Electron Fiddle, I tried out various different versions of Electron. The crash happens in v29.0.0-alpha.7, and in v28.0.0, v28.1.0, and v28.1.1. It does not happen in v27.2.1 or any of the older versions I spot-checked.
The text was updated successfully, but these errors were encountered: