programmable-matter icon indicating copy to clipboard operation
programmable-matter copied to clipboard

crash on message send with Electron > 13.2.1

Open jaked opened this issue 4 years ago • 0 comments

After reloading the renderer with command-R, message sends from main process to renderer fail with

Uncaught Exception:
Error: Render frame was disposed before WebFrameMain could be accessed
at Object.n.send (electron/js2c/browser_init.js:165:413)
at Object.b.send (electron/js2c/browser_init.js:161:2494)
at send (/Users/jake/github/programmable-matter/build/main.js:96:42)
at /Users/jake/github/programmable-matter/build/main.js:99:18
at MenuItem.click (electron/js2c/browser_init.js:73:1742)
at Object.a._executeCommand (electron/js2c/browser_init.js:81:2492)

so in particular menu actions (which send main -> renderer) fail.

Electron versions 13.2.1 and earlier don't have the issue. It seems to be related to these changes:

  • https://github.com/electron/electron/pull/30598/ was merged in 13.2.2, causes crashes on reload
  • https://github.com/electron/electron/pull/30834/ was merged in 13.4.0, fixes crashes on reload but produces the above failure on message send

I can't reproduce this starting with electron-quick-start. Maybe it has to do with a native module? I also have a problem with the renderer crashing on reload (it recovers after a second reload) in earlier Electron versions, which I thought might have to do with NSFW.

I haven't tried Electron 14.x or 15.x.

jaked avatar Oct 25 '21 17:10 jaked