Skip to content
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

Extension host terminated unexpectedly (VScode + PIO5) #3691

Closed
1 of 2 tasks
TD-er opened this issue Sep 28, 2020 · 3 comments
Closed
1 of 2 tasks

Extension host terminated unexpectedly (VScode + PIO5) #3691

TD-er opened this issue Sep 28, 2020 · 3 comments

Comments

@TD-er
Copy link

TD-er commented Sep 28, 2020

What kind of issue is this?


Configuration

Operating system: Windows 10

PlatformIO Version (platformio --version): 5.0.1

image

Description of problem

Not entirely sure if this is a problem with PIO itself or the latest VS code update.

The last few days, I experience a lot of strange issues in which the PIO actions no longer react and also navigation to function definitions does not seem to work anymore.

Not always when this happens, but quite often I do get this popup in the bottom right corner of the IDE:
image

For completeness, these are the installed extensions:
image

Not sure if it is related, but I find it hard to get adapted to the new way how PlatformIO 5 is trying to do things in VScode.
For example, as soon as you unfold an evironment in the project tasks, it tries to generate a temp .cpp file (as is normal when building an Arduino project)
image

However, if you click there, while it is building, the .cpp file is generated again and deleted, which causes the running build to fail.
This happens to me way more often than I would like as I also have to restart the IDE quite often the last few days (week?) which opens with all projects closed.
Could it be that this may cause stability issues with the extension host?

N.B. the logs suggest memory allocation issues, but that's probably some configured limit or some internal 32 bit limit as my system does have lots and lots of free memory right now. (currently only 13GB in use of the 96GB)

Logs

Last logs in the "console tab" of the inspect window (after pressing "Open Developer Tools":

localProcessExtensionHost.ts:252:

<--- Last few GCs --->

[3360:0000031700000000]  3034793 ms: Scavenge 3797.4 (3965.5) -> 3791.5 (3966.5) MB, 4.8 / 0.0 ms  (average mu = 0.830, current mu = 0.671) allocation failure 
[3360:0000031700000000]  3034832 ms: Scavenge 3798.4 (3966.5) -> 3792.6 (3966.7) MB, 18.8 / 0.0 ms  (average mu = 0.830, current mu = 0.671) allocation failure 
[3360:0000031700000000]  3034875 ms: Scavenge 3799.0 (3966.7) -> 3793.5 (3966.7) MB, 24.0 / 0.0 ms  (average mu = 0.830, current mu = 0.671) allocation failure 


<--- JS stacktrace --->

FATAL ERROR: NewSpace::Rebalance Allocation failed - JavaScript heap out of memory
 1: 00007FF6C0686DAA VR_GetStringForHmdError+219210
 2: 00007FF6BFC143B6 node::Buffer::New+43430
 3: 00007FF6BFC14423 node::Buffer::New+43539
 4: 00007FF6BE71DFF8 v8::internal::Version::GetVersion+792
 5: 00007FF6BE71DFA1 v8::internal::Version::GetVersion+705
 6: 00007FF6BE8A9233 v8::Unlocker::~Unlocker+254403
 7: 00007FF6BE8D2351 v8::Unlocker::~Unlocker+422625
 8: 00007FF6BE8CF1F9 v8::Unlocker::~Unlocker+409993
 9: 00007FF6BE8A942C v8::Unlocker::~Unlocker+254908
10: 00007FF6BE8A6988 v8::Unlocker::~Unlocker+243992
11: 00007FF6BE8A49DD v8::Unlocker::~Unlocker+235885
12: 00007FF6BE8AFDA6 v8::Unlocker::~Unlocker+281910
13: 00007FF6BE8AFE8D v8::Unlocker::~Unlocker+282141
14: 00007FF6BE885212 v8::Unlocker::~Unlocker+106914
15: 00007FF6BEBA0AB9 v8::internal::TickSample::print+352969
16: 00007FF6BF0CAB9C v8_inspector::V8StackTraceId::ToString+2982396
17: 0000031700525C7E 

abstractExtensionService.ts:166

  ERR Extension host terminated unexpectedly. The following extensions were running: vscode.microsoft-authentication, vscode.github-authentication, ms-vscode.cpptools, vscode.debug-auto-launch, vscode.emmet, vscode.git, vscode.merge-conflict, vscode.search-result, alefragnani.Bookmarks, Atishay-Jain.All-Autocomplete, CoenraadS.bracket-pair-colorizer-2, eamodio.gitlens, LaurentTreguier.uncrustify, nicollasr.vscode-streamdeck, vscode.github, platformio.platformio-ide, vscode.configuration-editing, vscode.extension-editing, vscode.json-language-features, ms-vscode.js-debug, vscode.npm, vscode.python, ms-python.python, vscode.grunt, vscode.gulp, vscode.jake, vscode.typescript-language-features

webviewElement.ts:152

[Embedded Page] WebSocket connection to 'ws://127.0.0.1:8010/wsrpc' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/semver-umd.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/index.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/xterm.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/xterm-addon-unicode11.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/xterm-addon-search.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/index.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/windowsTerminal.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/terminal.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/eventEmitter2.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/windowsPtyAgent.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/utils.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/index.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/main.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/ExperimentationService.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/TasApiFeatureProvider.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/FilteredFeatureProvider.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/BaseFeatureProvider.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/AxiosHttpClient.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/ExperimentationServiceAutoPolling.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/ExperimentationServiceBase.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/MemoryKeyValueStorage.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/PollingService.js.map: 
29webviewElement.ts:152 [Embedded Page] WebSocket connection to 'ws://127.0.0.1:8010/wsrpc' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
@TD-er
Copy link
Author

TD-er commented Oct 2, 2020

I am no longer convinced it has to do with the PIO extension itself, so I opened an issue at the vscode GitHub: microsoft/vscode#107950

@TD-er TD-er closed this as completed Oct 2, 2020
@TD-er
Copy link
Author

TD-er commented Oct 2, 2020

Apparently the people at VScode claim PlatformIO has a memory leak, so re-open here....

@TD-er
Copy link
Author

TD-er commented Oct 9, 2020

Have opened the same issue at platformio / platformio-vscode-ide to see if that will get any response.
Please please please have a look at it, as it is almost rendering VScode + PIO useless with crashing 10+ times a day.

@TD-er TD-er closed this as completed Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant