Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Atom built from source (v1.34) crashes when opening a folder with git repository #18926

Closed
bogdandobanda opened this issue Feb 28, 2019 · 6 comments
Labels
crash d ⬆️ i ⬆️ linux Issues that occur on Linux but not on other platforms. triaged v ⬇️

Comments

@bogdandobanda
Copy link

bogdandobanda commented Feb 28, 2019

Edit by @rsese to add extra notes

Reproduced on Ubuntu 16.04 but couldn't reproduce on 18.04.

On 16.04, used node 8.9.3 and npm 6.2.0:

$ apm -v
apm  2.1.3
npm  6.2.0
node 8.9.3 x64
atom 1.34.0
python 2.7.12

Used the same node and npm versions on 18.04.


Description

Atom crashes when opening a folder containing a git repository

Steps to Reproduce

  1. Build Atom from source (v1.34) "./script/build --create-debian-package"
  2. Install your build
  3. Start Atom
  4. Open a folder containing git repository

Expected behavior:

Actual behavior:
Crashes

Reproduces how often:
Always

Versions

OS: Ubuntu 16.04 LTS

building with:
Node: v8.9.3
Npm: v5.5.1

checks during build:
apm 2.1.3
npm 6.2.0
node 8.9.3 x64
python 2.7.12
git 2.7.4

after installing built package:
atom --version
Atom : 1.34.0
Electron: 2.0.16
Chrome : 61.0.3163.100
Node : 8.9.3

apm --version
apm 2.1.3
npm 6.2.0
node 8.9.3 x64
atom 1.34.0
python 2.7.12
git 2.7.4

Additional Information

Seems related to nsfw package.
Noticed that my build produces different(bigger) nsfw.node file than the one from official release (118K vs 102K)
./resources/app.asar.unpacked/node_modules/@atom/nsfw/build/Release
Instructions from manual were followed.

Crash log:
_usr_share_atom_atom.1000.zip

@rsese
Copy link
Contributor

rsese commented Mar 1, 2019

Thanks for the report! Hmmm, yeah I was able to reproduce after building from v.134.0, v.1.35.0-beta0, and from a recent checkout (aad8bd68).

But if I install the 1.34.0 .deb release, it doesn't crash.

Also confirmed that it seems to crash when opening a git repository (I opened the atom/atom I just cloned and created a new repository with a single test file).

Edit: Just wanted to add that I reproduced on 16.04 like the OP but can't reproduce on Ubuntu 18.04

@rsese rsese added crash triaged v ⬇️ i ⬆️ d ⬆️ linux Issues that occur on Linux but not on other platforms. labels Mar 1, 2019
@jasonrudolph
Copy link
Contributor

Since we don't know what's causing these crashes, our best bet might be to find a recent version of Atom where this problem does not occur, and then use git bisect to find the commit that introduced the problem. Here's what I'm seeing so far:

  • 💥 Atom 1.34.0: Crashes
  • 💥 Atom 1.33.0: Crashes
  • 💥 Atom 1.32.2: Crashes
  • ✅ Atom 1.31.2: Does not crash

It'll probably take a while to run through the git bisect process, but I hope to kick it off this week.

@jasonrudolph
Copy link
Contributor

I love the smell of git bisect in the morning. 🌇😀

Thanks to git bisect, I've identified b34cefa as the commit that introduces this regression. That commit was introduced in #18012.

That change upgrades Atom from Electron 2.0.7 to 2.0.9, which means that this regression is the result of upgrading Atom to either Electron 2.0.8 or 2.0.9. When I build atom/atom from source using Electron 2.0.7, I don't see these crashes. However, when I build atom/atom from source using Electron 2.0.8, I do see these crashes. This leads me to believe that one of the few changes in Electron 2.0.8 triggers these crashes.

My guess is that electron/electron#13988 is the change that triggers these crashes, but that's just a guess. That pull request was intended to fix electron/electron#13972, and the Electron 2.0.8 release notes claim to fix that issue, but the issue is still open, and I see recent discussion of people still encountering the issue. I'll ping some folks on the Electron team to see if I can gather more insight on the status of that issue.

@bogdandobanda
Copy link
Author

It runs smoothly on Ubuntu 16.04 after downgrading to Electron 2.0.7
Thumbs up for the work!
Problem is now that issues fixed in #18012 resurfaced... a critical one being Segmentation fault that still happens on Fedora 29 upon atom startup.

@jasonrudolph
Copy link
Contributor

It runs smoothly on Ubuntu 16.04 after downgrading to Electron 2.0.7
Thumbs up for the work!

Thanks, @bogdandobanda.

Because this crash is a result of upgrading from Electron 2.0.7 to 2.0.8, and because the latest Electron 2.x version still exhibits this crash, and because active development of Electron is focused on the 5.x series, I don't think we can expect an Electron 2.x fix for this issue. Instead, I think our best chance of overcoming this issue is to get Atom using a more modern version of Electron.

The good news is that we have a pull request open for getting Atom running on Electron 3 (#18916), and when I build that branch from source on Ubuntu 16.04, I can no longer reproduce this crash. 😅 The less good news is that we still have quite a bit of work to do before that pull request can be merged. (See the "issues to resolve" section of the pull request body.)

With that in mind, I think we can offer a few workarounds for now:

  • Use a pre-built version of Atom (e.g., atom-amd64.deb for Atom 1.35.1) instead of building from source, or ...
  • Build Atom's Electron 3 branch from source, and if you encounter any of the known issues, try to help us resolve them 🙏

I understand that neither of these workarounds are ideal (sorry about that), but they're probably the best we can do with our limited resources in the near term. I hope that makes sense.

@darangi
Copy link
Contributor

darangi commented Feb 2, 2021

This issue no longer exists, I will go ahead and close this

@darangi darangi closed this as completed Feb 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
crash d ⬆️ i ⬆️ linux Issues that occur on Linux but not on other platforms. triaged v ⬇️
Projects
None yet
Development

No branches or pull requests

4 participants