Skip to content

Laptop crashes and restart after executing code #17238

@Mosesh219

Description

@Mosesh219

Type: Performance Issue

Dear Vs Code Team,

I have an issue in running a simple code with a dataset containing only 5 entries on a Jupyter Notebook. The execution of these lines in particular

'PandasTools.AddMoleculeColumnToFrame(mols_df,'SMILES')
mols_df.head(2)' 

consumes a lot RAM memory till it crashes and the laptop restarts showing me that "the device has ran into a problem". I tried executing the same code and using the same dataset on other PC with even lower specs, it works fine. Furthermore, I have installed the latest system drivers as well as installing and uninstalling VS code but the same issue persists. Also, I checked this issue with the manufacturing company of my laptop, they advised that there is no problem with my laptop and advised the problem should be in VS code itself.

from pathlib import Path
import math
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
import matplotlib.patches as mpatches
from rdkit import Chem
from rdkit.Chem import Descriptors, Draw, PandasTools
PandasTools.RenderImagesInAllDataFrames(images=True)
mols = pd.read_csv('H17M000 - Copy.smi', sep='\t', header=None, names=['SMILES', 'ID'])
mols_df = pd.DataFrame(data=mols)

PandasTools.AddMoleculeColumnToFrame(mols_df,'SMILES')
mols_df.head(2)'

VS Code version: Code 1.107.1 (994fd12f8d3a5aa16f17d42c041e5809167e845a, 2025-12-17T14:15:14.850Z)
OS version: Windows_NT x64 10.0.26200
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) Ultra 9 275HX (24 x 3072)
GPU Status 2d_canvas: enabled
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.46GB (20.70GB free)
Process Argv --crash-reporter-id a871c3ce-f460-4719-8226-456f7f58752b
Screen Reader no
VM 0%
Process Info
CPU %	Mem MB	   PID	Process
    0	    87	 16492	code
    0	     3	  2240	   crashpad-handler
    0	    15	  9988	   utility-network-service
    0	    77	 11448	shared-process
    0	   294	 11456	window [1] (Settings - 2d - Visual Studio Code)
    0	    96	 18320	extension-host [1]
    0	     3	 15656	     c:\Users\mouss\.vscode\extensions\ms-python.python-2025.20.1-win32-x64\python-env-tools\bin\pet.exe server
    0	     1	 16068	       C:\windows\system32\conhost.exe 0x4
    0	  1556	 19164	     c:\Users\mouss\miniconda3\envs\my-rdkit-env\python.exe -m ipykernel_launcher --f=c:\Users\mouss\AppData\Roaming\jupyter\runtime\kernel-v3737cc3a713ef1bc51c7c136d85904dc1d6552341.json
    0	     7	  2064	       C:\windows\system32\conhost.exe 0x4
    0	   264	 28736	     electron-nodejs (bundle.js)
    0	     5	 28916	     c:\Users\mouss\miniconda3\envs\my-rdkit-env\python.exe c:\Users\mouss\.vscode\extensions\ms-toolsai.jupyter-2025.9.1-win32-x64\pythonFiles\vscode_datascience_helpers\kernel_interrupt_daemon.py --ppid 18320
    0	     1	 28972	       C:\windows\system32\conhost.exe 0x4
    0	    38	 26860	   window
    0	    72	 27304	   gpu-process
    0	    19	 27720	pty-host
    0	    10	 23592	     C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command "try { . \"c:\Users\mouss\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\contrib\terminal\common\scripts\shellIntegration.ps1\" } catch {}"
    0	     2	 28324	     conpty-agent
    0	     9	 28380	     C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command "try { . \"c:\Users\mouss\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\contrib\terminal\common\scripts\shellIntegration.ps1\" } catch {}"
    0	     2	 29016	     conpty-agent
    0	     2	 29236	     conpty-agent
    0	    11	 29296	     C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command "try { . \"c:\Users\mouss\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\contrib\terminal\common\scripts\shellIntegration.ps1\" } catch {}"
    0	    24	 28040	file-watcher [1]
Workspace Info
|  Window (Settings - 2d - Visual Studio Code)
|    Folder (2d): 8 files
|      File types: smi(4) py(1)
|      Conf files:;
Extensions (9)
Extension Author (truncated) Version
debugpy ms- 2025.18.0
python ms- 2025.20.1
vscode-pylance ms- 2025.10.4
vscode-python-envs ms- 1.14.0
jupyter ms- 2025.9.1
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.3.0
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
A/B Experiments
vsliv368cf:30146710
vswsl492cf:30256860
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31436602
aj953862:31281341
82j33506:31327384
nes-set-on:31351930
6abeh943:31336334
envsdeactivate2:31353495
cloudbuttont:31379625
todos-1:31405332
3efgi100_wstrepl:31403338
use-responses-api:31390855
2a0ce269:31428710
ec5jj548:31422691
terminalsuggestenabled:31431119
cp_cls_c_966_ss:31435507
c0683394:31419495
478ah919:31426797
a5gib710:31434435
7a04d226_do_not_restore_last_panel_session:31438103
anthropic_thinking_t:31432745
406hc587_ask_agent:31428393
cp_cls_c_1081:31433293

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from posternotebook-executionKernels issues (start/restart/switch/execution, install ipykernel)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions