[Bug]: Occasional segfault when closing window on Linux #42019
Labels
29-x-y
bug 🪲
component/BrowserWindow
crash 💥
has-repro-gist
Issue can be reproduced with code at https://gist.github.com/
platform/linux
Preflight Checklist
Electron Version
29.3.1
What operating system are you using?
Other Linux
Operating System Version
Kernel 6.8.8-arch1-1
What arch are you using?
x64
Last Known Working Electron version
28.3.1
Expected Behavior
Closing windows does not cause Electron to segfault.
Actual Behavior
Occasionally, closing windows triggers a segfault.
Testcase Gist URL
https://gist.github.com/cptpcrd/5b8429d727dcb866ac271b8610b97f9f
Additional Information
On Arch Linux, I have only been able to reproduce this when running under Sway. However, we have seen crashes from users who were on e.g. Ubuntu (and probably running GNOME), so it can likely appear in certain other circumstances too.
Note that Sway, like many Wayland compositors, can run within a window on other WMs/DEs/compositors, so it's also possible to test this on Sway without completely switching over:
It doesn't consistently reproduce -- occasionally when I run the linked testcase it will crash immediately, occasionally it will open and close the window a few dozen (or hundred) times before segfaulting. However, it always crashes eventually when I run it under Sway. Note that the linked testcase uses
window.open
from a renderer process, but creating a newBrowserWindow
from the main process reproduces this too: https://gist.github.com/cptpcrd/202db28d330fe55dfe646b3f38f4f9db.I've taken gdb backtraces -- this one was captured from the Electron 29 package from Arch's repos; this one is from a local
Testing
build of 29.3.1 (which has a few local patches applied, but nothing huge).This is probably a distinct bug from #41839, though there could theoretically be some common thread.
The text was updated successfully, but these errors were encountered: