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

Terminal window crashes in Mac OS #69603

Closed
pitAlex opened this issue Feb 28, 2019 · 15 comments
Closed

Terminal window crashes in Mac OS #69603

pitAlex opened this issue Feb 28, 2019 · 15 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug linux Issues with VS Code on Linux macos Issues with VS Code on MAC/OS X terminal General terminal issues that don't fall under another label upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded
Milestone

Comments

@pitAlex
Copy link

pitAlex commented Feb 28, 2019

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.

@vscodebot vscodebot bot added the terminal General terminal issues that don't fall under another label label Feb 28, 2019
@Tyriar
Copy link
Member

Tyriar commented Feb 28, 2019

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

@Tyriar Tyriar added the info-needed Issue requires more information from poster label Feb 28, 2019
@pitAlex
Copy link
Author

pitAlex commented Mar 1, 2019

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

@eladcandroid
Copy link

eladcandroid commented Mar 1, 2019

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)

@Tyriar
Copy link
Member

Tyriar commented Mar 1, 2019

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

@Tyriar Tyriar added upstream Issue identified as 'upstream' component related (exists outside of VS Code) macos Issues with VS Code on MAC/OS X linux Issues with VS Code on Linux labels Mar 1, 2019
@pitAlex
Copy link
Author

pitAlex commented Mar 1, 2019

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

@pitAlex
Copy link
Author

pitAlex commented Mar 2, 2019

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

@Tyriar
Copy link
Member

Tyriar commented Mar 2, 2019

@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?

@amlord
Copy link

amlord commented Mar 6, 2019

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

@RoarkeRandall
Copy link

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.

@amlord
Copy link

amlord commented Mar 7, 2019

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.

@patocallaghan
Copy link

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…enderer/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…enderer/init.js:148
n.globals.onerror | @ | errorTelemetry.ts:77

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

@pavelloz
Copy link

pavelloz commented Mar 9, 2019

Time consuming bug + happens a lot = bad experience.

@Tyriar
Copy link
Member

Tyriar commented Mar 9, 2019

Upstream tracking issue: xtermjs/xterm.js#1932

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Mar 23, 2019
@Tyriar Tyriar added this to the April 2019 milestone Apr 11, 2019
@Tyriar Tyriar closed this as completed in aaee57e Apr 11, 2019
@Tyriar
Copy link
Member

Tyriar commented Apr 11, 2019

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

@pitAlex
Copy link
Author

pitAlex commented Apr 17, 2019

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

@mjbvz mjbvz added the verified Verification succeeded label May 7, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators May 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug linux Issues with VS Code on Linux macos Issues with VS Code on MAC/OS X terminal General terminal issues that don't fall under another label upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

8 participants