Extension host terminated unexpectedly.

See original GitHub issue

Issue Type: Bug

It seems to be something memory related, but I’ve about 3Gb of free RAM according to HTOP.

Started: This issue started yesterday (10/12/2019)

Tried: 1 - Reinstalling Extension 2 - Clean VSCode install (removed caches and all folders from system).

To Reproduce There’s no step to reproduce it. Extension host crashes after 1 ~ 5m. If I disable the extension, the crash stops.

** Log **

workbench.desktop.main.js:sourcemap:1541   ERR Unable to write to User Settings because editor.findMatchHighlightBackground is not a registered configuration.: Error: Unable to write to User Settings because editor.findMatchHighlightBackground is not a registered configuration.
    at D.reject (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4587:395)
    at D.resolveAndValidate (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4589:712)
    at D.doWriteConfiguration (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4584:861)
    at Object.factory (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4584:654)
    at u.consume (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:147:449)
    at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:147:264
    at new Promise (<anonymous>)
    at u.queue (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:147:188)
    at D.writeConfiguration (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4584:639)
    at C.writeConfigurationValue (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4609:1002)
    at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4599:594
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
workbench.desktop.main.js:sourcemap:3241 [Embedded Page] Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'nonce-aa46200e-f1db-4713-aac3-3e8e4d8d9d00'". Either the 'unsafe-inline' keyword, a hash ('sha256-R8veCQqXBxagQbo7301EemLoMritAYL6hWuuRrh9SCM='), or a nonce ('nonce-...') is required to enable inline execution.

4workbench.desktop.main.js:sourcemap:1541   ERR <semantic> TypeScript Server Error (3.6.3)
Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
    at Object.find (tsserver.js:385:35)
    at getReferencedSymbolsForModuleIfDeclaredBySourceFile (tsserver.js:105722:78)
    at Object.getReferencedSymbolsForNode (tsserver.js:105700:40)
    at Object.getReferenceEntriesForNode (tsserver.js:105434:58)
    at getSemanticDocumentHighlights (tsserver.js:104124:57)
    at Object.getDocumentHighlights (tsserver.js:104112:20)
    at Object.getDocumentHighlights (tsserver.js:125655:42)
    at IOSession.Session.getDocumentHighlights (tsserver.js:134406:71)
    at Session.handlers.ts.createMapFromTemplate._a.<computed> (tsserver.js:133830:61)
    at tsserver.js:135256:88
    at IOSession.Session.executeWithRequestId (tsserver.js:135247:28)
    at IOSession.Session.executeCommand (tsserver.js:135256:33)
    at IOSession.Session.onMessage (tsserver.js:135279:35)
    at Interface.<anonymous> (tsserver.js:136594:27)
    at Interface.emit (events.js:200:13)
    at Interface._onLine (readline.js:314:10)
    at Interface._normalWrite (readline.js:459:12)
    at Socket.ondata (readline.js:170:10)
    at Socket.emit (events.js:200:13)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:166:17): Error: <semantic> TypeScript Server Error (3.6.3)
Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
    at Object.find (tsserver.js:385:35)
    at getReferencedSymbolsForModuleIfDeclaredBySourceFile (tsserver.js:105722:78)
    at Object.getReferencedSymbolsForNode (tsserver.js:105700:40)
    at Object.getReferenceEntriesForNode (tsserver.js:105434:58)
    at getSemanticDocumentHighlights (tsserver.js:104124:57)
    at Object.getDocumentHighlights (tsserver.js:104112:20)
    at Object.getDocumentHighlights (tsserver.js:125655:42)
    at IOSession.Session.getDocumentHighlights (tsserver.js:134406:71)
    at Session.handlers.ts.createMapFromTemplate._a.<computed> (tsserver.js:133830:61)
    at tsserver.js:135256:88
    at IOSession.Session.executeWithRequestId (tsserver.js:135247:28)
    at IOSession.Session.executeCommand (tsserver.js:135256:33)
    at IOSession.Session.onMessage (tsserver.js:135279:35)
    at Interface.<anonymous> (tsserver.js:136594:27)
    at Interface.emit (events.js:200:13)
    at Interface._onLine (readline.js:314:10)
    at Interface._normalWrite (readline.js:459:12)
    at Socket.ondata (readline.js:170:10)
    at Socket.emit (events.js:200:13)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)
	at Function.create (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:53:63732)
	at h.dispatchResponse (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:53:56670)
	at h.dispatchMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:53:55568)
	at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:53:55044
	at l.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:47:207)
	at t.Reader.onLengthData (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:53:61946)
	at Socket.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:53:61594)
	at Socket.emit (events.js:200:13)
	at addChunk (_stream_readable.js:294:12)
	at readableAddChunk (_stream_readable.js:275:11)
	at Socket.Readable.push (_stream_readable.js:210:10)
	at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)
workbench.desktop.main.js:sourcemap:3695 Extension Host
workbench.desktop.main.js:sourcemap:3695 Debugger attached.
workbench.desktop.main.js:sourcemap:3458 Extension host terminated unexpectedly. Code:  null  Signal:  SIGABRT
_onExtensionHostCrashed @ workbench.desktop.main.js:sourcemap:3458
workbench.desktop.main.js:sourcemap:2596 Extension host terminated unexpectedly.
onDidNotificationChange @ workbench.desktop.main.js:sourcemap:2596
workbench.desktop.main.js:sourcemap:3695 Extension Host
workbench.desktop.main.js:sourcemap:3695 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 0x10e430015 node::Abort() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 2: 0x10e430594 node::Abort() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 3: 0x1095fb6e7 v8::internal::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 4: 0x1095fb687 v8::internal::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 5: 0x10963ed25 v8::internal::Heap::StartIdleIncrementalMarking(v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 6: 0x109640479 v8::internal::Heap::StartIdleIncrementalMarking(v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 7: 0x10963ce0d 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] 8: 0x10963a8db 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] 9: 0x109646694 v8::internal::Heap::PromotedExternalMemorySize() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]10: 0x109646c3f v8::internal::Heap::PromotedExternalMemorySize() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]11: 0x10984ce55 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]12: 0x1099dba58 v8::internal::Map::FindElementsKindTransitionedMap(v8::internal::Isolate*, std::__1::vector<v8::internal::Handle<v8::internal::Map>, std::__1::allocator<v8::internal::Handle<v8::internal::Map> > > const&) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]13: 0x1099bd173 v8::internal::JSObject::MigrateSlowToFast(v8::internal::Handle<v8::internal::JSObject>, int, char const*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]14: 0x1099bca40 v8::internal::JSObject::MigrateSlowToFast(v8::internal::Handle<v8::internal::JSObject>, int, char const*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]15: 0x1099bf113 v8::internal::LookupIterator::TransitionToAccessorProperty(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]16: 0x1098b0ddc v8::internal::StoreBuffer::StoreBufferOverflow(v8::internal::Isolate*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]17: 0x1098b8cf4 v8::internal::StubCache::Set(v8::internal::Name, v8::internal::Map, v8::internal::MaybeObject) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]18: 0x10a0aad99 v8::internal::compiler::ZoneStats::ReturnZone(v8::internal::Zone*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]19: 0x10a0fce4d v8::internal::compiler::ZoneStats::ReturnZone(v8::internal::Zone*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]<--- Last few GCs --->[29757:0x106be8000]   111008 ms: Mark-sweep 1863.6 (2083.0) -> 1862.1 (2085.2) MB, 2007.6 / 0.0 ms  (average mu = 0.125, current mu = 0.013) allocation failure GC in old space requested[29757:0x106be8000]   113186 ms: Mark-sweep 1863.1 (2085.2) -> 1862.4 (2083.0) MB, 2154.4 / 0.0 ms  (average mu = 0.070, current mu = 0.011) allocation failure GC in old space requested<--- JS stacktrace --->==== JS stack trace =========================================    0: ExitFrame [pc: 0x10a0aad99]    1: StubFrame [pc: 0x10a0fce4d]Security context: 0x13a15e2a0d99 <JSObject>    2: /* anonymous */(aka /* anonymous */) [0x13a1bcd54a99] [/Users/pedrobernardina/.vscode/extensions/vscodevim.vim-1.12.2/out/src/mode/modeHandler.js:8] [bytecode=0x13a1edcecb29 offset=76](this=0x13a138c804d1 <undefined>,0x13a1bcd54b51 <JSFunction (sfi = 0x13a19cad40d1)>,0x13a1bcd54b89 <JSFunction (sfi = 0x13a19cad4109)>) ...
workbench.desktop.main.js:sourcemap:3241 [Embedded Page] Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'nonce-b38d7978-2371-4725-b6a7-42e50f074e5d'". Either the 'unsafe-inline' keyword, a hash ('sha256-R8veCQqXBxagQbo7301EemLoMritAYL6hWuuRrh9SCM='), or a nonce ('nonce-...') is required to enable inline execution.

Extension version: 1.12.2 VS Code version: Code 1.40.2 (f359dd69833dd8800b54d458f6d37ab7c78df520, 2019-11-25T14:52:45.129Z) OS version: Darwin x64 18.5.0

System Info
Item Value
CPUs Intel® Core™ i5-7267U CPU @ 3.10GHz (4 x 3100)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 8.00GB (0.66GB free)
Process Argv
Screen Reader no
VM 0%

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
josue22almocommented, Aug 9, 2020

@J-Fields I am experiencing this issue

3reactions
pedrobernardinacommented, Dec 12, 2019

I have downgraded to 1.11.3 and so far, it’s working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Receiving error message 'Extension host terminated ...
I keep getting this error "Extension host terminated unexpectedly." and I have tried removing all of my extensions, reinstalling the program ...
Read more >
Extension host terminated unexpectedly -- clean install, latest ...
This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in...
Read more >
Extension Host - Visual Studio Code
The Visual Studio Code Extension Host is responsible for managing extensions and ensuring the stability and performance of Visual Studio Code.
Read more >
Anyone else repeatedly getting the error "Remote Extension ...
Anyone else repeatedly getting the error "Remote Extension host terminated unexpectedly 3 times within the last 5 minutes" (rendering VS Code ...
Read more >
"Extension host terminated unexpectedly" & can't use html ...
If you are not able to use html shortcuts or you can't get html boilerplate directly by pressing " ! and Tab "...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found