Vscode-ng-language-service: 0.1.4 crashes on angular 4.1.3 and ionic 3.4.2

Created on 23 Jun 2017  Â·  19Comments  Â·  Source: angular/vscode-ng-language-service

node version 8.1.2
vscode insider 1.14.0 lastest and vscode 1.13.1

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
2: node::DLOpen(v8::FunctionCallbackInfo const&) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
3: v8::internal::FatalProcessOutOfMemory(char const) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
4: v8::internal::FatalProcessOutOfMemory(char const
) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
5: v8::internal::Factory::NewCode(v8::internal::CodeDesc const&, unsigned int, v8::internal::Handle, bool, bool, int, bool) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
6: v8::internal::Factory::NewCode(v8::internal::CodeDesc const&, unsigned int, v8::internal::Handle, bool, bool, int, bool) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
7: v8::internal::modulo(double, double) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
8: v8::internal::Factory::NewJSFixedArrayIterator(v8::internal::Handle) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
9: v8::internal::Factory::NewJSFixedArrayIterator(v8::internal::Handle) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
10: v8::internal::compiler::SourcePositionTable::Print(std::__1::basic_ostream >&) const [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
11: v8::internal::compiler::SourcePositionTable::Print(std::__1::basic_ostream >&) const [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
12: v8::internal::compiler::SourcePositionTable::Print(std::__1::basic_ostream >&) const [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
13: v8::internal::compiler::SourcePositionTable::Print(std::__1::basic_ostream >&) const [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
14: v8::internal::RegisterConfiguration::AreAliases(v8::internal::MachineRepresentation, int, v8::internal::MachineRepresentation, int) const [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
15: 0x348f11b043a7
16: 0x348f11b0474d
17: 0x348f11dc395c
18: 0x348f11c8abbd
19: 0x348f11c89723
20: 0x348f11c895f7

bug

Most helpful comment

@chuckjaz To reproduce this problem you need to install this extension (IntelliSense for CSS class names): https://marketplace.visualstudio.com/items?itemName=Zignd.html-css-class-completion

If you disable this extension, Angular Language Service will works fine again.

All 19 comments

Can you put together a repro repository for this.

I'm experiencing same issue in an angular/cli 4.2.1 project. No ionic. It's been like this for days now.

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/opt/visual-studio-code/libnode.so]
 2: 0x7f91dc3f91b7 [/opt/visual-studio-code/libnode.so]
 3: 0x7f91dc154a87 [/opt/visual-studio-code/libnode.so]
 4: 0x7f91dc154a05 [/opt/visual-studio-code/libnode.so]
 5: v8::internal::Factory::NewFixedArray(int, v8::internal::PretenureFlag) [/opt/visual-studio-code/libnode.so]
 6: 0x7f91dbd52a3c [/opt/visual-studio-code/libnode.so]
 7: 0x7f91dbca7b75 [/opt/visual-studio-code/libnode.so]
 8: 0x88ac18843a7

After this many errors like Connection to server is erroring. Shutting down server.

Same bug on.

ng -v
@angular/cli: 1.1.3
node: 6.11.0
os: linux x64
@angular/animations: 4.2.4
@angular/common: 4.2.4
@angular/compiler: 4.2.4
@angular/core: 4.2.4
@angular/forms: 4.2.4
@angular/http: 4.2.4
@angular/platform-browser: 4.2.4
@angular/platform-browser-dynamic: 4.2.4
@angular/router: 4.2.4
@angular/cli: 1.1.3
@angular/compiler-cli: 4.2.4
@angular/language-service: 4.2.4

Angular Language Service: 4.2.4
TypeScript: 2.3.4
getTemplateRefrences: 370ms
Search path: /home/anton/workspaces/sandbox/ng2/staggering/node_modules/selenium-webdriver/lib/test/data
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/usr/share/code/libnode.so]
 2: 0x7f259f4861b7 [/usr/share/code/libnode.so]
 3: 0x7f259f1e1a87 [/usr/share/code/libnode.so]
 4: 0x7f259f1e1a05 [/usr/share/code/libnode.so]
 5: v8::internal::Factory::NewRawOneByteString(int, v8::internal::PretenureFlag) [/usr/share/code/libnode.so]
 6: 0x7f259edec804 [/usr/share/code/libnode.so]
 7: 0x7f259f06a18a [/usr/share/code/libnode.so]
 8: 0x105de2e083a6
[Info  - 14:00:11] Connection to server got closed. Server will restart.
>>>> tons of [Error - 14:00:11] Connection to server is erroring. Shutting down server.
[Error - 14:00:11] Server initialization failed.
Error: Connection got disposed.
    at Object.dispose (/home/anton/.vscode/extensions/Angular.ng-template-0.1.4/node_modules/vscode-jsonrpc/lib/main.js:675:25)
    at Object.dispose (/home/anton/.vscode/extensions/Angular.ng-template-0.1.4/node_modules/vscode-languageclient/lib/main.js:69:35)
    at connection.shutdown.then (/home/anton/.vscode/extensions/Angular.ng-template-0.1.4/node_modules/vscode-languageclient/lib/main.js:924:28)
    at process._tickCallback (internal/process/next_tick.js:103:7)

I would appreciate a repro for any of these cases.

Just create new app and open it in VScode. Open any .ts file in src/app folder and wait...
After 2-3min (background work) the output window display an error:
2017-06-30 22-12-59

Any news on this? Seems critical, for me the plugin cannot be used at all, just getting the FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory if the plugin is active and an angular project is open. I'm using the latest angular version 4.2.6 and cli 1.2.0.

I have the same problem, when enabling this extension a code process eats the processor and goes up in memory usage until it hits about 1.5GB and crashes.
Excluding node_modules is a workaround (as noted in #104), but is there a way to exclude it from this extension, but not from the file explorer? There should be a specific option for this. (like there is a separate exclude setting for search).
Could it be that the version of @angular/language-service used by this extension is not up to date?

I'm using v0.1.4 and VSCode Linux 1.14 (and also happened in 1.13), with Angular 4.2.6 in the project.

@ianchi Can you create a repository and steps that I can use to reproduce this?

@chuckjaz @Anton-Nikishkin already posted a way to reproduce it.

@imesper That didn't reproduce it for me.

I can reproduce it creating an empty project with:

ng new sample
cd sample
npm install

Then open code and wait about a minute. As stated, processor goes up and also memory, when the process gets arround 1.5gb it crashes with the following error in the Angular Language Services output panel:

It is interesting to note in the first row that it was scanning files inside the node_modules folder when this happened.

Search path: /home/ianchi/dev/ianchi_wrt/sample/node_modules/clone
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/usr/share/code/libnode.so]
 2: 0x7f85221851b7 [/usr/share/code/libnode.so]
 3: 0x7f8521ee0a87 [/usr/share/code/libnode.so]
 4: 0x7f8521ee0a05 [/usr/share/code/libnode.so]
 5: 0x7f8521e68c67 [/usr/share/code/libnode.so]
 6: v8::internal::Factory::NewCode(v8::internal::CodeDesc const&, unsigned int, v8::internal::Handle<v8::internal::Object>, bool, bool, int, bool) [/usr/share/code/libnode.so]
 7: 0x7f8521f16fcd [/usr/share/code/libnode.so]
 8: 0x7f852184e081 [/usr/share/code/libnode.so]
 9: 0x7f8521854d81 [/usr/share/code/libnode.so]
10: 0x7f8521e179bf [/usr/share/code/libnode.so]
11: 0x7f8521e1ce79 [/usr/share/code/libnode.so]
12: 0x7f8521e1a384 [/usr/share/code/libnode.so]
13: 0x7f8521e18976 [/usr/share/code/libnode.so]
14: 0x7f85219a849e [/usr/share/code/libnode.so]
15: 0x3447ec7843a7
[Info  - 1:15:25 PM] Connection to server got closed. Server will restart.
[Error - 1:15:25 PM] Connection to server is erroring. Shutting down server.
...
[Error - 1:15:27 PM] Server initialization failed.
Error: Connection got disposed.
    at Object.dispose (/home/ianchi/.vscode/extensions/Angular.ng-template-0.1.4/node_modules/vscode-jsonrpc/lib/main.js:675:25)
    at Object.dispose (/home/ianchi/.vscode/extensions/Angular.ng-template-0.1.4/node_modules/vscode-languageclient/lib/main.js:69:35)
    at connection.shutdown.then (/home/ianchi/.vscode/extensions/Angular.ng-template-0.1.4/node_modules/vscode-languageclient/lib/main.js:924:28)
    at process._tickCallback (internal/process/next_tick.js:103:7)

Running with the following environment:

sample$ ng -v
    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / â–³ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.2.1
node: 8.1.4
os: linux x64
@angular/animations: 4.3.0
@angular/common: 4.3.0
@angular/compiler: 4.3.0
@angular/core: 4.3.0
@angular/forms: 4.3.0
@angular/http: 4.3.0
@angular/platform-browser: 4.3.0
@angular/platform-browser-dynamic: 4.3.0
@angular/router: 4.3.0
@angular/cli: 1.2.1
@angular/compiler-cli: 4.3.0
@angular/language-service: 4.3.0


sample$ code -v
1.14.1
2648980a697a4c8fb5777dcfb2ab110cec8a2f58

This is the command line of the process that eats the processor/memory:
/usr/share/code/code/home/ianchi/.vscode/extensions/Angular.ng-template-0.1.4/node_modules/vscode-languageclient/lib/utils/electronForkStart/home/ianchi/.vscode/extensions/Angular.ng-template-0.1.4/server/server.js--node-ipc

@chuckjaz Just creating a new project using the Angular CLI reproduces the issue on my machine as well, but I have found out that it's a Windows-specific issue. macOS and Linux are working fine (for me at least).

Mine is Linux / Angular-Cli / Typescript 2.4.1.

@chuckjaz To reproduce this problem you need to install this extension (IntelliSense for CSS class names): https://marketplace.visualstudio.com/items?itemName=Zignd.html-css-class-completion

If you disable this extension, Angular Language Service will works fine again.

@chuckjaz I confirm I get the same behavior as @passenger6 .
If I delete node_modules from the excluded folders I get a new crash, but if I also disable IntelliSense for CSS extension everything works just fine, and memory never goes above 180mb.

PS: updating to the new v1.8.0 of IntelliSense for Css class names doesn't solve the issue.

Can also confirm the same behavior as @passenger6 and @ianchi.

Closing this, since issue is two years old and likely out of date. Please open a new issue if problem persists.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings