Skip to content

Autocomplete not working when starting Atom without sudo #956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nikhildev opened this issue May 18, 2016 · 7 comments
Closed

Autocomplete not working when starting Atom without sudo #956

nikhildev opened this issue May 18, 2016 · 7 comments
Labels

Comments

@nikhildev
Copy link

Hi,

I noticed this thread #549 was discussed earlier as well.

I think the issue still persists. Autocomplete and format was working totally fine for me, until recently. I removed all my plugins except nuclide. Still no go.

However, if I run Atom from the CLI with sudo, things work perfectly fine. Here is a snippet from the console when I try autocomplete without atom started with sudo

PARENT ERR: no child when you tried to send : errorsForFile
/Users/nikhildev/.atom/packages/atom-typescript/dist/worker/lib/workerLib.js:183 CHILD ERR STDERR: FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

/Users/nikhildev/.atom/packages/atom-typescript/dist/worker/lib/workerLib.js:196 ts worker restarting. Don't know why it stopped with code: null

What might I be missing here?

Thanks

@nikhildev
Copy link
Author

just for more, here is my tsconfig

{
  "compileOnSave": false,
  "compilerOptions": {
    "declaration": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "mapRoot": "",
    "module": "commonjs",
    "moduleResolution": "node",
    "noEmitOnError": true,
    "noImplicitAny": false,
    "outDir": "../dist/",
    "removeComments": true,
    "rootDir": ".",
    "sourceMap": true,
    "target": "es5",
    "inlineSources": true
  },

  "files": [
    "main.ts",
    "typings.d.ts"
  ]
}

Added to this, I have a whole lotta Pending requests piling up whenever I try to type.
These are like
updateText
getProjectFileDetails
errorsForFile
editText
etc

@Maistho
Copy link

Maistho commented May 26, 2016

I'm getting very similar errors, and I can't figure out quite what the problem is. Starting a new project and adding a tsconfig I'm getting no issues to start with, but on all my (medium to largeish) projects I seem to get this error. Running in sudo doesn't help either.

Also, atom seems to be using 100% CPU time according to top.

Any ideas as to how I would begin debugging the issue?

@Maistho
Copy link

Maistho commented May 26, 2016

So when installing a starter project using angular-cli

ng new testproj
cd testproj
atom .

I can reproduce the issue every time.
There is a repo which should reproduce the issue.
https://github.com/Maistho/atom-typescript-error

git clone https://github.com/Maistho/atom-typescript-error
cd atom-typescript-error
npm install
atom .

Just try editing the TestprojAppComponent (adding a constructor or something) and the issue will arise.

I turned off all other (community) atom packages, and tested this on windows and linux.

It seems the issue is some kind of memory leak / infinite loop, since my CPU and memory usage rises until I'm out of memory, and then it restarts again and again until I close atom.

@Maistho
Copy link

Maistho commented May 26, 2016

Seems like it might be the same issue as #332 ?

@nikhildev
Copy link
Author

@Maistho
Well, I got around the problem using some of the suggested workarounds.

Firstly

"filesGlob": [
'**/*.ts'
]

And then I specified

"atom": {
  "rewriteTsConfig": true
}

This made sure all my source code is covered and Atom does'nt go hunting. My tsconfig.json is in my /src folder, so I don't need to exclude any dir here

@Maistho
Copy link

Maistho commented May 27, 2016

Same here. This shouldn't be an issue to start with, since I included all the files I wanted to look at in my files array from the beginning. If look filesGlob is present, the behaviour should be to just use the files in the files array

@github-actions
Copy link

This issue has been marked as stale because it did not have any activity for the last 90 days or more. Remove the stale label or comment or this will be closed in 14 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants