Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Atom freezes with 100% CPU usage when opening preferences #726

Closed
DanielHoffmann opened this issue Sep 21, 2016 · 8 comments
Closed

Atom freezes with 100% CPU usage when opening preferences #726

DanielHoffmann opened this issue Sep 21, 2016 · 8 comments

Comments

@DanielHoffmann
Copy link

Issue and Steps to Reproduce

After doing a clean Atom install (deleting ~/.atom/) and installing Nuclide through apm install nuclide. Open Atom then open Preferences screen, atom freezes with 100% CPU usage.

Expected Behavior

Preferences screen should open normally

Actual Behavior

Atom freezes with 100% CPU usage

Versions

  • Atom: 1.10.2
  • Nuclide: 0.170.0
  • Client OS: OS X El Capitan (10.11.4)

Additional Details

No other packages installed, completely clean install
Seems related to #84

@chrisjones-tripletri
Copy link

chrisjones-tripletri commented Sep 21, 2016

+1. I installed atom for the first time this morning, then followed the instructions to install nuclide. (Edit to clarify): apm install nuclide worked fine, but installing nuclide in atom (via preferences) crashed. Then, atom crashed each time I restarted it.

@DanielHoffmann
Copy link
Author

To me the Nuclide install didn't seem to crash, but the apm install nuclide did exit without any messages (not sure if that is the expected behavior)

@hansonw
Copy link
Contributor

hansonw commented Sep 21, 2016

Hmm I managed to reproduce this. It looks like when Atom opens an atom:// URI, it adds an atom: project - then we try to detect the nearest HG repository with findHgRepository, which enters an infinite loop.

@mostafaeweda or @shushz, any idea what the best fix is?

screen shot 2016-09-21 at 11 57 39 am

@shushz
Copy link
Contributor

shushz commented Sep 22, 2016

Substitution of nuclideUri.join(workingDirectoryPath, '..') with nuclideUri.dirname(workingDirectoryPath) should do it, I think.

@zertosh
Copy link
Contributor

zertosh commented Sep 22, 2016

@shushz This is a bug in nuclideUri.join because path.join('/', '..') === '/.

@mostafaeweda
Copy link
Contributor

@zertosh that's happening with atom:// uris, not local paths.

--> I have a fix coming for this in the works.

@zertosh
Copy link
Contributor

zertosh commented Sep 22, 2016

@mostafaeweda I know, nuclideUri.join removes the protocol part and is supposed to run a vanilla path.join on the rest, so the expected behavior should be nuclideUri.join('atom:///', '..') === 'atom:///')

@zertosh
Copy link
Contributor

zertosh commented Sep 22, 2016

I looked at nuclideUri and it's assuming that the scheme is always nuclide:// - seems odd.

@ghost ghost closed this as completed in ac43a48 Sep 22, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants