App crashes when BrowserView tries to both resize and destroy itself (almost) simultaneously #21410
Closed
3 tasks done
Labels
Projects
Preflight Checklist
Issue Details
I'm currently using BrowerView to act as a makeshift tab (so that I may have multiple "tabs" of my application open). When I create 20+ processes and shut them down (shutting them down calls view.destroy()) very quickly and then right afterwards try to resize the window, the app crashes with Error 3221226525.
When I disable the call to view.destroy(), I no longer get this issue. This works, since Javascript garbage collection will collect the processes after a minute or two, but this solution seems a bit suboptimal and unreliable in the case where we may have weak references left over.
I tried to work around this by disabling resizing for those BrowserViews (via view.setAutoResize()) and then calling view.destroy(), but this does not fix the issue.
Expected Behavior
Close many BrowserViews quickly and then Resize right afterwards --> Window should resize without crashing.
Actual Behavior
Close many BrowserViews quickly and then Resize right afterwards --> App crashes (if I don't resize, no crash).
To Reproduce
As mentioned above, we need to create 20+ processes and shut them down (shutting them down calls view.destroy()) very quickly and then right afterwards try to resize the window. The app should crash with Error 3221226525.
Screenshots
Additional Information
This problem exists in both Electron v5.0.0 and v7.1.2.
Question: Let's say I take the "don't destroy, let processes get garbage collected" route. Is it possible that the app will also crash during garbage collection if the user happens to resize just as a process is being destroyed?
Thank you for your time, and I look forward to hearing from you!
The text was updated successfully, but these errors were encountered: