Skip to content

aggdraw.Draw causes kernel to die, not in web interface, only in VS Code #14243

@danielfaust

Description

@danielfaust

Applies To

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

What happened?

After installing aggdraw in a conda environment via conda install -c conda-forge aggdraw I had the following issue:

I ran this cell

import aggdraw
# print('aggdraw version', aggdraw.__version__) # = 1.3.16
d = aggdraw.Draw("RGB", (100, 100), (0,0,0))

and after a very short time the kernel died. Same happens when I use agg_draw = aggdraw.Draw(pil_image).

The result was The Kernel crashed while executing code in the the current cell or a previous cell. Please review the code in the cell(s) to identify a possible cause of the failure. Click [here](https://aka.ms/vscodeJupyterKernelCrash) for more info. View Jupyter [log](command:jupyter.viewOutput) for further details.

It is possible to use the cell for complex drawing and a following cell to print some text even after using time.sleep(5), but sooner or later the message of the crashed kernel comes up and then it's no longer possible to re-run the notebook.

Clicking "Restart" hangs up the restarting task, it stays at "Restarting Kernel: Python 3.11". I then need to remove the kernel via the web ui because the small "Restarting Kernel" notification offers no way to abort this.

VS Code is running locally on Windows (192.168.30.41), the Jupyter instance is running on a Linux server (192.168.30.25), to which VS Code is also connected via the SSH Extension (Visual Studio Code Remote).

miniconda got installed around 3 days ago.

VS Code Version

Version: 1.81.1 (user setup) Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794 Date: 2023-08-09T22:22:42.175Z Electron: 22.3.18 ElectronBuildId: 22689846 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.22621

Jupyter Extension Version

v2023.7.1002162226

Jupyter logs

[D 2023-09-02 00:43:55.831 ServerApp] Accepting token-authenticated request from 192.168.30.41
[D 2023-09-02 00:43:55.832 ServerApp] 200 GET /api/sessions?1693608235866 (51f58065604841788378348310d01476@192.168.30.41) 1.12ms
[D 2023-09-02 00:43:55.832 ServerApp] Accepting token-authenticated request from 192.168.30.41
[D 2023-09-02 00:43:55.838 ServerApp] 200 GET /api/contents/notebooks/Mapping?content=1&1693608235866 (51f58065604841788378348310d01476@192.168.30.41) 7.19ms
[I 2023-09-02 00:43:56.189 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (1/5), keep random ports
[W 2023-09-02 00:43:56.189 ServerApp] kernel c74a501a-185c-4460-a98b-856f5d262c4c restarted
[D 2023-09-02 00:43:56.192 ServerApp] Websocket closed c74a501a-185c-4460-a98b-856f5d262c4c:7fb8392c-61ee-4454-a288-79098c81f89b
[I 2023-09-02 00:43:56.192 ServerApp] Starting buffering for c74a501a-185c-4460-a98b-856f5d262c4c:7fb8392c-61ee-4454-a288-79098c81f89b
[D 2023-09-02 00:43:56.192 ServerApp] Clearing buffer for c74a501a-185c-4460-a98b-856f5d262c4c
[D 2023-09-02 00:43:56.195 ServerApp] Accepting token-authenticated request from 192.168.30.25
[D 2023-09-02 00:43:56.196 ServerApp] Generating new user for token-authenticated request: 2c09be001d1c46848ac775834800c1e4
[D 2023-09-02 00:43:56.201 ServerApp] Starting kernel: ['/home/user/miniconda3/envs/gdal/bin/python3', '-m', 'ipykernel_launcher', '-f', '/home/user/.local/share/jupyter/runtime/kernel-c74a501a-185c-4460-a98b-856f5d262c4c.json']
[D 2023-09-02 00:43:56.204 ServerApp] Connecting to: tcp://127.0.0.1:43485
[D 2023-09-02 00:43:56.205 ServerApp] 101 GET /api/kernels/c74a501a-185c-4460-a98b-856f5d262c4c/channels?session_id=7fb8392c-61ee-4454-a288-79098c81f89b&token=[secret] (2c09be001d1c46848ac775834800c1e4@192.168.30.25) 10.12ms
[D 2023-09-02 00:43:56.206 ServerApp] Opening websocket /api/kernels/c74a501a-185c-4460-a98b-856f5d262c4c/channels
[I 2023-09-02 00:43:56.206 ServerApp] Connecting to kernel c74a501a-185c-4460-a98b-856f5d262c4c.
[D 2023-09-02 00:43:56.206 ServerApp] Getting buffer for c74a501a-185c-4460-a98b-856f5d262c4c
[I 2023-09-02 00:43:56.206 ServerApp] Restoring connection for c74a501a-185c-4460-a98b-856f5d262c4c:7fb8392c-61ee-4454-a288-79098c81f89b
[D 2023-09-02 00:43:56.206 ServerApp] Nudge: not nudging busy kernel c74a501a-185c-4460-a98b-856f5d262c4c
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[D 2023-09-02 00:43:56.562 ServerApp] activity on c74a501a-185c-4460-a98b-856f5d262c4c: status (busy)
[D 2023-09-02 00:43:56.563 ServerApp] activity on c74a501a-185c-4460-a98b-856f5d262c4c: status (idle)
[D 2023-09-02 00:43:56.569 ServerApp] activity on c74a501a-185c-4460-a98b-856f5d262c4c: status (busy)
[D 2023-09-02 00:43:56.576 ServerApp] activity on c74a501a-185c-4460-a98b-856f5d262c4c: execute_input
[D 2023-09-02 00:43:56.580 ServerApp] activity on c74a501a-185c-4460-a98b-856f5d262c4c: stream
[D 2023-09-02 00:43:56.581 ServerApp] activity on c74a501a-185c-4460-a98b-856f5d262c4c: status (idle)
[D 2023-09-02 00:44:05.741 ServerApp] Accepting token-authenticated request from 192.168.20.25
[D 2023-09-02 00:44:05.741 ServerApp] Generating new user for token-authenticated request: 0dd7402b8a7042068fe8ff0b45ed9bce
[D 2023-09-02 00:44:05.741 ServerApp] 200 GET /api/kernels?1693608245737 (0dd7402b8a7042068fe8ff0b45ed9bce@192.168.20.25) 1.27ms
[D 2023-09-02 00:44:05.742 ServerApp] Accepting token-authenticated request from 192.168.20.25

Coding Language and Runtime Version

Python 3.11.4 (main, Jul 5 2023, 13:45:01) [GCC 11.2.0] on linux

Language Extension Version (if applicable)

Python v2023.14.0

Anaconda Version (if applicable)

conda 23.5.2 (miniconda latest, Python 3.11)

Running Jupyter locally or remotely?

Remote

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugfreeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuesvariable-explorer

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions