Skip to content

Instantly share code, notes, and snippets.

@kenmori
Last active December 14, 2019 00:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenmori/a35cd79267b600249e789ab805f705e4 to your computer and use it in GitHub Desktop.
Save kenmori/a35cd79267b600249e789ab805f705e4 to your computer and use it in GitHub Desktop.
vscodevim suddenly stops working。vscodevim(1.12.2)でバックスペース削除ができなくなる問題

vscodevim suddenly stops working。vscodevim(1.12.2)でバックスペース削除ができなくなる問題

aboutme/twitter

Do you want to solve it temporarily?(とりあえず早く開発しなくてはいけないのでサックと解決したい方)

  • vscodevimの拡張機能をuninstall


恐らくこれが原因

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

事象

Entering () will stop working. It's not the whole thing that gets stuck, just the backspace and certain actions Other typing will not work

  • ()を入力すると動かなくなる。動かなくなるというのは全体的にではなく、バックスペースや特定のアクションだけ
  • 他のタイピングも効かなくなる

気づくまでに試したこと

I tried the following -Remove all extensions once -Uninstall vscode -Restart mac -Update macOS

  • 拡張機能を全部一旦削除
  • vscodeをアンインストール
  • macを再起動
  • macOSをアップデート

Not all

In the lower right corner of VSCode The following notice comes out

If you press right, it will be cured temporarily, but again Press left to see console

全部ダメ

VSCodeの右下に 以下のようなノティが出る

右を押すと、一時的には治るがまた最初 左を押すとコンソールが見れる

下のようなエラーがでる

どうやらnodeのメモリーをあげろと言われている

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:254 [Extension Host] (node:4749) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:254
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1572  WARN Aborted onWillSaveTextDocument-event after 1750ms
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4290 [Embedded Page] Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'nonce-018efc19-f969-42a6-a057-e24dc67326f5'". Either the 'unsafe-inline' keyword, a hash ('sha256-R8veCQqXBxagQbo7301EemLoMritAYL6hWuuRrh9SCM='), or a nonce ('nonce-...') is required to enable inline execution.

/Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-window.js:5 [uncaught exception]: Error: write EPIPE
onUnexpectedError @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-window.js:5
/Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-window.js:6 Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/internal/stream_base_commons.js:83)
onUnexpectedError @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-window.js:6
events.js:177 Uncaught Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/internal/stream_base_commons.js:83)
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3372 Extension host terminated unexpectedly. Code:  null  Signal:  SIGABRT
_onExtensionHostCrashed @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3372
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2646 Extension host terminated unexpectedly.
onDidNotificationChange @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2646
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3553 Extension Host
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3553 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 0x10b4b5015 node::Abort() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 2: 0x10b4b5594 node::Abort() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 3: 0x1066806e7 v8::internal::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 4: 0x106680687 v8::internal::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 5: 0x1066c3d25 v8::internal::Heap::StartIdleIncrementalMarking(v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 6: 0x1066c5479 v8::internal::Heap::StartIdleIncrementalMarking(v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 7: 0x1066c1e0d 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: 0x1066bf8db 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: 0x1066cb694 v8::internal::Heap::PromotedExternalMemorySize() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]10: 0x1066cbc3f v8::internal::Heap::PromotedExternalMemorySize() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]11: 0x1068c99e6 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]12: 0x106b2bdcb v8::internal::RegExpParser::ParseRegExp(v8::internal::Isolate*, v8::internal::Zone*, v8::internal::FlatStringReader*, v8::base::Flags<v8::internal::JSRegExp::Flag, int>, v8::internal::RegExpCompileData*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]13: 0x10712fd99 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 --->[4749:0x10cfd1000]   245489 ms: Mark-sweep 1882.4 (2078.1) -> 1872.5 (2079.3) MB, 1352.5 / 0.0 ms  (average mu = 0.095, current mu = 0.018) allocation failure scavenge might not succeed[4749:0x10cfd1000]   247459 ms: Mark-sweep 1885.9 (2079.8) -> 1875.9 (2079.8) MB, 1945.2 / 0.0 ms  (average mu = 0.047, current mu = 0.012) allocation failure scavenge might not succeed<--- JS stacktrace --->==== JS stack trace =========================================    0: ExitFrame [pc: 0x10712fd99]Security context: 0x352ef81a5d01 <JSObject>    1: /* anonymous */ [0x352e8ce57869] [/Users/kenjimorita/.vscode/extensions/vscodevim.vim-1.12.2/out/src/mode/modeHandler.js:~1116] [pc=0x351f4f4243b8](this=0x352e3d6c8061 <ModeHandler map = 0x352e741daa39>)    2: next [0x352ef81a2239](this=0x352e8ce57be9 <JSGenerator>)    3: /* anonymous */ [0x352e8ce570e9] [/Users/kenjimorita/.vscode/extensions/vscodevim...

この対応

[/Users/kenjimorita/.vscode/extensions/vscodevim.vim-1.12.2/out/src/mode/modeHandler.js:~1116]

拡張機能のここのエラー出ているjsのメモリ領域を増やせって言われていると思う(予想) これは...

直った!!

VSCodeVim/Vim#4342 (comment)

Use an older version of 1.11.3

Once you uninstall vscodevim and search again from the extension, press the right gear mark to select the previous version. In this case, select 1.11.3

1.11.3 の古いバージョンを使う

一度vscodevimをuninstallして拡張機能から再度検索、右歯車マークを押すと以前のバージョンを選択できる。 今回の場合動いていた 1.11.3を選択

もし今後同じようなことがあっても、古いバージョンに戻せばオッケーだと思う。 普通の対応でした If something similar happens in the future, I think it's okay to go back to the old version. It was normal correspondence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment