Steps to Reproduce:
Extension host terminated unexpectedly
Does this issue occur when all extensions are disabled?: Yes/No
Not sure
Log:
[Extension Host] debugger listening on port 27221
abstractTextMateService.ts:52 Overwriting grammar scope name to file mapping for scope source.sql.
Old grammar file: file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/extensions/sql/syntaxes/sql.tmLanguage.json.
New grammar file: file:///Users/<USER_PATH>/.vscode/extensions/ms-mssql.mssql-1.6.0/syntaxes/SQL.plist
register @ abstractTextMateService.ts:52
abstractTextMateService.ts:52 Overwriting grammar scope name to file mapping for scope source.yaml.
Old grammar file: file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/extensions/yaml/syntaxes/yaml.tmLanguage.json.
New grammar file: file:///Users/<USER_PATH>/.vscode/extensions/redhat.vscode-yaml-0.4.1/syntaxes/yaml.tmLanguage.json
register @ abstractTextMateService.ts:52
console.ts:134 [Extension Host] Congratulations, your extension "terminal" is now active!
log.ts:173 ERR Error: [File Watcher (node.js)] Error: ENOENT: no such file or directory, stat '<PATH>.vscode'
log.ts:173 ERR [File Watcher (node.js)] Error: ENOENT: no such file or directory, stat '<PATH>.vscode'
log.ts:167 WARN Aborted onWillSaveTextDocument-event after 1750ms
extensionHost.ts:201 Extension Host
extensionHost.ts:202 Debugger attached.
log.ts:167 WARN UNRESPONSIVE extension host, 'vscode.json-language-features' took 78% of 5996.735ms, saved PROFILE here: '/var/folders/rb/thx_pjqx2c58r9wq7hw7pvtm0000gn/T/exthost-2858d5.cpuprofile' Array(2)
bootstrap-window.js:212 [uncaught exception]: Error: write EPIPE
onUnexpectedError @ bootstrap-window.js:212
bootstrap-window.js:215 Error: write EPIPE
at WriteWrap.afterWrite [as oncomplete] (net.js:788)
onUnexpectedError @ bootstrap-window.js:215
events.js:167 Uncaught Error: write EPIPE
at WriteWrap.afterWrite [as oncomplete] (net.js:788)
abstractExtensionService.ts:155 Extension host terminated unexpectedly. Code: null Signal: SIGABRT
_onExtensionHostCrashed @ abstractExtensionService.ts:155
notificationsAlerts.ts:40 Extension host terminated unexpectedly.
onDidNotificationChange @ notificationsAlerts.ts:40
extensionHost.ts:201 Extension Host
extensionHost.ts:202 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 0x109f639d5 node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 2: 0x109f63b4a node::get_builtin_module(char const*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 3: 0x10690ec6e v8::internal::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 4: 0x1069cffc2 v8::internal::Heap::CreateFillerObjectAt(unsigned long, int, v8::internal::ClearRecordedSlots, v8::internal::ClearFreedMemoryMode) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 5: 0x1069d2703 v8::internal::Heap::CreateFillerObjectAt(unsigned long, int, v8::internal::ClearRecordedSlots, v8::internal::ClearFreedMemoryMode) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 6: 0x1069ce72c v8::internal::Heap::CreateFillerObjectAt(unsigned long, int, v8::internal::ClearRecordedSlots, v8::internal::ClearFreedMemoryMode) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 7: 0x1069cc561 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 8: 0x1069d8c75 v8::internal::Heap::RootIsImmortalImmovable(int) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 9: 0x1069d8cdf v8::internal::Heap::RootIsImmortalImmovable(int) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]10: 0x10657f2b2 v8::internal::Factory::NewMap(v8::internal::InstanceType, int, v8::internal::ElementsKind, int) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]11: 0x106a17b7a v8::internal::Smi::SmiPrint(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]12: 0x106a0f673 v8::internal::Smi::SmiPrint(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]13: 0x106a06faa v8::internal::Smi::SmiPrint(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]14: 0x106a03d62 v8::internal::Smi::SmiPrint(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]15: 0x106a03a42 v8::internal::Smi::SmiPrint(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]16: 0x106a1979f v8::internal::Smi::SmiPrint(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]17: 0x1065df757 v8::internal::LookupIterator::PrepareTransitionToDataProperty(v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::Object::StoreFromKeyed) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]18: 0x1065df153 v8::internal::LookupIterator::GetConstantIndex() const [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]19: 0x1065e01b6 v8::internal::LookupIterator::Next() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]20: 0x1065e0000 v8::internal::LookupIterator::Next() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]21: 0x1065e4d64 v8::internal::LookupIterator::GetFieldDescriptorIndex() const [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]22: 0x106badd8e v8::internal::Parser::BuildIteratorCloseForCompletion(v8::internal::ZoneList<v8::internal::Statement*>*, v8::internal::Variable*, v8::internal::Expression*, v8::internal::IteratorType) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]<--- Last few GCs --->[8749:0x10b9ce000] 1090970 ms: Scavenge 2039.6 (2083.3) -> 2039.3 (2084.8) MB, 4.7 / 0.0 ms (average mu = 0.198, current mu = 0.148) allocation failure [8749:0x10b9ce000] 1092362 ms: Mark-sweep 2039.8 (2084.8) -> 2039.6 (2083.8) MB, 1211.5 / 0.0 ms (average mu = 0.170, current mu = 0.139) allocation failure GC in old space requested<--- JS stacktrace --->==== JS stack trace ========================================= 0: ExitFrame [pc: 0x106badd8e]Security context: 0x0cde65c229d9 <JSObject> 1: g(aka g) [0xcdeebdf32f9] [/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/client/dist/jsonMain.js:~9] [pc=0x369915e04977](this=0x0cde8ac026f1 <undefined>,0x0cde704a4c99 <Object map = 0xcde0f27aa71>) 2: I(aka I) [0xcdeebdf3739] [/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-la...
Got the same issue this morning after upgrading (and not restarting) yesterday.
Im using the newest windows release on 64 bit Windows 10.
Got this error after one single extension failed to load (which i will report to the developers there), found the extension only via the VSCode dev tools to be broken.
(After disableling the extension, restart, reactivating and restarting the error is gone, so i cant provide any logs, sorry. But ive seen an error message about security issues with the Buffer class, which may have caused some trouble...
TLDR: If one extension dies, it seems, that the complete extension host breaks down - may be the reason for the posters above report as well.
I had this problem, disabled all my extensions, and re-enabled a few at a time. Team Chat: for Slack, Discord, Live Share was the culprit for me.
I had this problem, disabled all my extensions, and re-enabled a few at a time. Team Chat: for Slack, Discord, Live Share was the culprit for me.
I don't have them so maybe the cause is something else.
It seems in general that some API may changed or that errors now kill the whole extension host.
I had one extension which i identified via dev tools and disabled now (it works like 4 out of 5 days, then not), just to find out that from now on another extension will kill everything as well... :(
@nguyendviet @Kagu-chan @redaphid
I think that by now perhaps you have resolved your crash. Most likely, this is caused by an extension that you use which loads a native node module that is not written with N-API. Native node modules written directly using v8 API are not future-compatible (no ABI compatibility), so every time we ship a new version of Electron, they might break in subtle ways or perhaps in not-so-subtle ways, leading to crashing the extension host.
There is no clear resolution here, except to reach out to the extensions that cause the crash and the "fix" would be for them to use native node modules that are using N-API.
In any case, do you still have a problem?
Thank you @alexandrudima for your reply. I haven't noticed it recently. Since it's not caused by VSCode, I'm closing this issue.
I think it was caused by karigari.chat. See https://github.com/microsoft/vscode/issues/77099#issuecomment-514844205
Most helpful comment
I had this problem, disabled all my extensions, and re-enabled a few at a time. Team Chat: for Slack, Discord, Live Share was the culprit for me.