vscode-jupyter: VS Code extension causing crash when Python files are opened

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

I had been able to work with Python files normally in VS Code until the afternoon of 2023-04-03 when VS Code started crashing with user error window of “The window terminated unexpectedly (reason:‘crashed’, code:‘133’)”

error-window-code-133

and main.log of

$ cat ~.config/Code/logs/20230403T173249/main.log
2023-04-03 17:32:49.870 [info] [SharedProcess] using utility process
2023-04-03 17:32:49.929 [info] update#setState idle
2023-04-03 17:32:53.879 [info] [UtilityProcess type: shared-process, pid: <none>]: creating new...
2023-04-03 17:32:53.884 [info] [UtilityProcess type: shared-process, pid: 213637]: successfully created
2023-04-03 17:32:54.165 [info] [UtilityProcess id: 1, type: fileWatcher, pid: <none>]: creating new...
2023-04-03 17:32:54.170 [info] [UtilityProcess id: 1, type: fileWatcher, pid: 213677]: successfully created
2023-04-03 17:32:54.239 [info] [UtilityProcess id: 1, type: extensionHost, pid: <none>]: creating new...
2023-04-03 17:32:54.245 [info] [UtilityProcess id: 1, type: extensionHost, pid: 213695]: successfully created
2023-04-03 17:33:17.753 [error] CodeWindow: renderer process gone (reason: crashed, code: 133)
2023-04-03 17:33:19.292 [info] [UtilityProcess id: 1, type: fileWatcher, pid: 213677]: received exit event with code 0
2023-04-03 17:33:19.388 [error] [UtilityProcess id: 1, type: fileWatcher, pid: 213677]: crashed with code 139 and reason 'crashed'
2023-04-03 17:33:19.930 [info] update#setState checking for updates
2023-04-03 17:33:19.997 [info] update#setState idle
2023-04-03 17:33:20.927 [info] [UtilityProcess id: 1, type: extensionHost, pid: 213695]: waiting to exit...
2023-04-03 17:33:23.134 [info] [UtilityProcess id: 1, type: extensionHost, pid: 213695]: received exit event with code 0
2023-04-03 17:33:23.134 [info] Extension host with pid 213695 exited with code: 0, signal: unknown.

This is for VS Code:

Version: 1.77.0
Commit: 7f329fe6c66b0f86ae1574c2911b681ad5a45d63
Date: 2023-03-29T10:05:35.165Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Linux x64 5.19.0-38-generic
Sandboxed: No

I have summarized my debugging experience to arrive at ms-toolsai.jupyter as being the offending extension in the following GitHub Gist: https://gist.github.com/matthewfeickert/8c3698bc5f64effdaf9f345e060c8b41

VS Code Version

1.77.0

Jupyter Extension Version

2023.3.1000892223

Jupyter logs

Visual Studio Code (1.77.0, undefined, desktop)
Jupyter Extension Version: 2023.3.1000892223.
Python Extension Version: 2023.6.0.
Workspace folder /home/feickert/Code/GitHub/pyhf
User belongs to experiment group 'jupyterEnhancedDataViewer'
User belongs to experiment group 'jupyterTestcf'
info 00:27:13.539: LSP Notebooks experiment is enabled
info 00:27:13.821: Process Execution: > ~/.pyenv/versions/3.10.4/envs/base/bin/python -m pip list
> ~/.pyenv/versions/3.10.4/envs/base/bin/python -m pip list

Coding Language and Runtime Version

Python v3.10.4

Language Extension Version (if applicable)

Python Extension Version: 2023.6.0

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 4
  • Comments: 29 (11 by maintainers)

Most upvoted comments

@matthewfeickert @HeKR96 Can you try disabling the Jupyter extension and see if the problem happens?

This issue seems to be resolved when I updated to the up-to-date VScode version.

Here is my environmental info:

Version: 1.78.0 Commit: 252e5463d60e63238250799aef7375787f68b4ee Date: 2023-05-03T20:09:46.685Z Electron: 22.4.8 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Linux x64 5.19.0-41-generic Sandboxed: Yes

@karrtikr Does not crash when jupyter is disabled.

Same for me, and re-enabling freeze VS Code again (The window is not responding).

@karrtikr Does not crash when jupyter is disabled.

Hello, I’m experiencing the same issue since April 5th on Ubuntu 22.04.2 LTS and VSCode 1.77.2. Tried disabling all extensions except for Python but still ran into the same issue unfortunately.