electron: Electron crashing with EXC_BAD_ACCESS when running with Atom snapshot
I’m working on upgrading Atom to Electron 1.7. However, something in the snapshot is causing Atom to crash within seconds of starting up. When a snapshot is not used, Atom starts without crashing.
Here’s the startup script that the Atom build process generates for use when creating a snapshot: https://gist.github.com/leroix/f2d68bf754ce39c6ec3c10e472e56a76
I’m creating a snapshot using the startup script by running:
./script/node_modules/electron-mksnapshot/bin/mksnapshot out/startup.js --startup_blob out/Atom.app/Contents/Frameworks/Electron\ Framework.framework/Resources/snapshot_blob.bin
I’ve found that if I comment out lines 25261-25262 in the startup script, which prevents preloading bundled Atom packages, the crashing issue is resolved. However, this reduces the benefit of using a snapshot in the first place.
Here’s a crashlog: https://gist.github.com/leroix/d3eaf4f8b9ff22fff896d53657c52ade
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 26 (5 by maintainers)
Thanks for the clarification, @hashseed! I’ll go ahead and close this since it seems like we can safely disable inline caches when running
mksnapshotuntil Electron ships with a version of V8 >= 6.3.Nice joint effort on this! ⚡️
--no-use-icshould be safe to use formksnapshot, and is a valid workaround for this issue.I don’t think it will affect performance when you use that snapshot. We clear inline caches when creating the snapshot anyways (which was broken prior to the bug fix), so I don’t think there is any difference other than maybe
mksnapshotitself performing worse.Rather than back merging, I would suggest to simply add
i::FLAG_use_ic = false;tomksnapshot.ccfor versions up to V8 6.3.I’m glad I could help!
This issue is preventing Atom from upgrading to 1.7.x. The relevant PR is https://github.com/atom/atom/pull/16282.