Vscode: Terminal window crashes in Mac OS

Created on 28 Feb 2019  路  15Comments  路  Source: microsoft/vscode

Hello,

Lately, after getting the latest updates, the terminal window of VSCode in high sierra has started to crash randomly. To be more specific it freezes, everything in it becomes blank, it becomes unresponsive to kill command and it can sometimes even freeze the app itself. The only way out it is to force close the app. I can be reproduce if you leave the terminal window open for a while, like 20-30 minutes and run some commands in it.

bug integrated-terminal linux mac upstream verified

Most helpful comment

I'm seeing the same as described, it was all working fine until a recent update in the past couple of weeks. Now I have to restart VSCode a several times a day.

In case it helps, I'm running:

OS: OSX Mojave (10.14.3)
VS Code: v1.31.1
Shell: zsh

Steps to reproduce:

  • Open 3x integrated terminals in one panel - running docker containers
  • Open another integrated terminal panel with 2x terminals, used for running npm commands
  • after a period of time (20-30 minutes mentioned above seems about right), the panels become non-responsive, then vscode hangs & pops up the _keep waiting_ / _reopen_ / _close_ alert

Unfortunately, when this happens I am unable to open developer tools as the whole app is unresponsive

All 15 comments

Can you check devtools (Help > Toggle Developer Tools) for errors when this happens?

I got these:

bootstrap-window.js:202 [uncaught exception]: TypeError: Cannot read property 'copyCellsFrom' of undefined
onUnexpectedError @ bootstrap-window.js:202
bootstrap-window.js:205 TypeError: Cannot read property 'copyCellsFrom' of undefined
    at Buffer._reflowSmaller (Buffer.ts:338)
    at Buffer._reflow (Buffer.ts:238)
    at Buffer.resize (Buffer.ts:215)
    at BufferSet.resize (BufferSet.ts:102)
    at Terminal.resize (Terminal.ts:1702)
    at Terminal.resize (Terminal.ts:51)
    at D._resize (terminalInstance.ts:1216)
    at decorators.ts:85
onUnexpectedError @ bootstrap-window.js:205
Buffer.ts:338 Uncaught TypeError: Cannot read property 'copyCellsFrom' of undefined
    at Buffer._reflowSmaller (Buffer.ts:338)
    at Buffer._reflow (Buffer.ts:238)
    at Buffer.resize (Buffer.ts:215)
    at BufferSet.resize (BufferSet.ts:102)
    at Terminal.resize (Terminal.ts:1702)
    at Terminal.resize (Terminal.ts:51)
    at D._resize (terminalInstance.ts:1216)
    at decorators.ts:85
bootstrap-window.js:202 [uncaught exception]: TypeError: Cannot read property 'get' of undefined
onUnexpectedError @ bootstrap-window.js:202
bootstrap-window.js:205 TypeError: Cannot read property 'get' of undefined
    at TextRenderLayer._forEachCell (TextRenderLayer.ts:75)
    at TextRenderLayer._drawBackground (TextRenderLayer.ts:184)
    at TextRenderLayer.onGridChanged (TextRenderLayer.ts:263)
    at Renderer.ts:198
    at Array.forEach (<anonymous>)
    at Renderer._renderRows (Renderer.ts:198)
    at RenderDebouncer._innerRefresh (RenderDebouncer.ts:49)
    at RenderDebouncer.ts:40
onUnexpectedError @ bootstrap-window.js:205
TextRenderLayer.ts:75 Uncaught TypeError: Cannot read property 'get' of undefined
    at TextRenderLayer._forEachCell (TextRenderLayer.ts:75)
    at TextRenderLayer._drawBackground (TextRenderLayer.ts:184)
    at TextRenderLayer.onGridChanged (TextRenderLayer.ts:263)
    at Renderer.ts:198
    at Array.forEach (<anonymous>)
    at Renderer._renderRows (Renderer.ts:198)
    at RenderDebouncer._innerRefresh (RenderDebouncer.ts:49)
    at RenderDebouncer.ts:40

Feeling the same.. High Sierra Mac OS too..

/Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-window.js:5 [uncaught exception]: TypeError: Cannot read property 'copyCellsFrom' of undefined
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:5 TypeError: Cannot read property 'copyCellsFrom' of undefined
at Buffer._reflowSmaller (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Buffer.js:250)
at Buffer._reflow (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Buffer.js:170)
at Buffer.resize (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Buffer.js:152)
at BufferSet.resize (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/BufferSet.js:78)
at Terminal.resize (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Terminal.js:1096)
at Terminal.resize (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/public/Terminal.js:53)
at D._resize (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3821)
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:20
onUnexpectedError @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-window.js:5
/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Buffer.js:250 Uncaught TypeError: Cannot read property 'copyCellsFrom' of undefined
at Buffer._reflowSmaller (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Buffer.js:250)
at Buffer._reflow (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Buffer.js:170)
at Buffer.resize (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Buffer.js:152)
at BufferSet.resize (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/BufferSet.js:78)
at Terminal.resize (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Terminal.js:1096)
at Terminal.resize (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/public/Terminal.js:53)
at D._resize (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3821)
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:20
/Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-window.js:5 [uncaught exception]: TypeError: Cannot read property 'copyCellsFrom' of undefined
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:5 TypeError: Cannot read property 'copyCellsFrom' of undefined
at Buffer._reflowSmaller (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Buffer.js:250)
at Buffer._reflow (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Buffer.js:170)
at Buffer.resize (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Buffer.js:152)
at BufferSet.resize (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/BufferSet.js:78)
at Terminal.resize (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Terminal.js:1096)
at Terminal.resize (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/public/Terminal.js:53)
at D._resize (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3821)
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:20
onUnexpectedError @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-window.js:5
/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Buffer.js:250 Uncaught TypeError: Cannot read property 'copyCellsFrom' of undefined
at Buffer._reflowSmaller (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Buffer.js:250)
at Buffer._reflow (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Buffer.js:170)
at Buffer.resize (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Buffer.js:152)
at BufferSet.resize (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/BufferSet.js:78)
at Terminal.resize (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/Terminal.js:1096)
at Terminal.resize (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-xterm/lib/public/Terminal.js:53)
at D._resize (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3821)
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:20
2/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1536 ERR Cannot read property 'superClass' of undefined: TypeError: Cannot read property 'superClass' of undefined
at isSupportedComponent (/Users/mac/.vscode/extensions/wix.glean-4.6.0/out/modules/stateful-to-stateless.js:272:28)
at Object.isStatefulComp (/Users/mac/.vscode/extensions/wix.glean-4.6.0/out/modules/stateful-to-stateless.js:279:9)
at CompleteActionProvider.provideCodeActions (/Users/mac/.vscode/extensions/wix.glean-4.6.0/out/extension.js:39:37)
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:541:390
at t.asPromise (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:50:385)
at new Promise ()
at Object.t.asPromise (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:50:353)
at e.provideCodeActions (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:541:350)
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:558:130
at e._withAdapter (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:553:292)
at e.$provideCodeActions (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:558:92)
at t._doInvokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:644:118)
at t._invokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:643:744)
at t._receiveRequest (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:642:256)
at t._receiveOneMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:641:155)
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:638:960
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:38:994
at e.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:44:113)
at a (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:170:213)
at Socket.f._socketDataListener (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:170:434)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:279:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at Pipe.onread (net.js:636:20)

@pitAlex @eladcandroid can you take a screenshot of what your prompt looks like and let me know what shell it is?

@Tyriar are you asking for what commands I run in the terminal? Those are custom node scripts, most of the time its gulp commands.

It happened again, here is an error showing under "output" tab with Log(window) selected:

Tree element not found: [object Object]: Error: Tree element not found: [object Object]
    at e.getElementLocation (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:99:985)
    at e.isCollapsed (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:99:340)
    at i.e.isCollapsed (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1017:981)
    at t.revealMarkersForCurrentActiveEditor (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:4900:276)
    at t.autoReveal (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:4900:95)
    at t.onActiveEditorChanged (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:4897:212)
    at e.fire (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:81:332)
    at t.doEmitActiveEditorChangeEvent (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:4911:709)
    at t.handleActiveEditorChange (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:4911:485)
    at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:4911:833
    at e.fire (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:81:312)
    at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:5348:314

And this is how it looks like:
screen shot 2019-03-02 at 3 17 45 am

@pitAlex is that screenshot after the problem occurs? Could you show me the prompt right after you open the window?

It looks like the shell you're using is bash?

I'm seeing the same as described, it was all working fine until a recent update in the past couple of weeks. Now I have to restart VSCode a several times a day.

In case it helps, I'm running:

OS: OSX Mojave (10.14.3)
VS Code: v1.31.1
Shell: zsh

Steps to reproduce:

  • Open 3x integrated terminals in one panel - running docker containers
  • Open another integrated terminal panel with 2x terminals, used for running npm commands
  • after a period of time (20-30 minutes mentioned above seems about right), the panels become non-responsive, then vscode hangs & pops up the _keep waiting_ / _reopen_ / _close_ alert

Unfortunately, when this happens I am unable to open developer tools as the whole app is unresponsive

OS: macOS Mojave (10.14.3)
VS Code: Version 1.31.1 (1.31.1)
Shell: zsh

Not sure on repro steps yet. . I do know that I can create a new shell once the old one is frozen. If I try to delete the frozen shell then the whole window becomes unresponsive and I'll be asked to re-open it.

This is new behavior since a few weeks ago. I'm going to switch to the "fallback" renderer to see if that helps.

I'm seeing the same as @RoarkeRandall - the panel freezes, although it's the clicking of the _delete_ button that seems to lead to vscode becoming unresponsive.

As a bit of further info - I left the integrated terminal open overnight (1 panel, with 3 terminals open), and it was still working fine for quite a while this morning, it was only when I opened a second panel (clicking the "+" button) that the issue then happened a short while later.

Similar to others this started happening with one of the recent updates in the past few weeks. I'm also seeing very similar to @amlord. The terminal panel freezes or goes blank, then trying to delete it (using the trash icon) causes vscode to become unresponsive. I've to kill vscode multiple times a day now due to this.

I'm seeing it a lot when I have long running tasks in my terminal, e.g. a test runner with live reload, and then creating a split terminal to the right. In my case it seems to happen when I CMD+tab away to another application and then come back to vscode.

[uncaught exception]: TypeError: Cannot read property '_data' of undefined
onUnexpectedError | @ | bootstrap-window.js:202
(anonymous)       | @ | bootstrap-window.js:38
emit              | @ | events.js:182
window.onerror    | @ | /Applications/Visual鈥nderer/init.js:148
n.globals.onerror | @ | errorTelemetry.ts:77

TypeError: Cannot read property '_data' of undefined
    at BufferLine.copyCellsFrom (BufferLine.ts:196)
    at Buffer._reflowSmaller (Buffer.ts:338)
    at Buffer._reflow (Buffer.ts:238)
    at Buffer.resize (Buffer.ts:215)
    at BufferSet.resize (BufferSet.ts:102)
    at Terminal.resize (Terminal.ts:1702)
    at Terminal.resize (Terminal.ts:51)
    at D._resize (terminalInstance.ts:1216)
    at decorators.ts:85
onUnexpectedError | @ | bootstrap-window.js:202
(anonymous)       | @ | bootstrap-window.js:38
emit              | @ | events.js:182
window.onerror    | @ | /Applications/Visual鈥nderer/init.js:148
n.globals.onerror | @ | errorTelemetry.ts:77

OS: macOS Mojave (10.14.3)
VS Code: Version (1.31.1)
Shell: zsh

Time consuming bug + happens a lot = bad experience.

Please let me know if anyone sees this in Insiders, starting from tomorrow's version I expect it to be fixed.

With the latest update, the problem almost went away. It can still happen when running intense node commands like a gulp job or a scripts bundle command

Was this page helpful?
0 / 5 - 0 ratings

Related issues

curtw picture curtw  路  3Comments

sirius1024 picture sirius1024  路  3Comments

sijad picture sijad  路  3Comments

VitorLuizC picture VitorLuizC  路  3Comments

lukehoban picture lukehoban  路  3Comments