vscode icon indicating copy to clipboard operation
vscode copied to clipboard

The background of main interface became grey.

Open tengyuntian opened this issue 2 years ago • 32 comments

Issue Type: Bug

I am using Jupyter Notebook in VS code. When I wheeled down the interface, it became grey. It happened before. Cannot see any pics clearly.

VS Code version: Code 1.69.1 (b06ae3b2d2dbfe28bca3134cc6be65935cdfea6a, 2022-07-12T08:21:24.514Z) OS version: Windows_NT x64 10.0.19044 Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 x 3192)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.80GB (21.36GB free)
Process Argv --crash-reporter-id 1c7786f7-3567-42d0-bd46-6060e36fc1d0
Screen Reader no
VM 0%
Extensions (7)
Extension Author (truncated) Version
copilot Git 1.31.6194
python ms- 2022.10.0
vscode-pylance ms- 2022.7.30
jupyter ms- 2022.6.1101950301
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.8
cpptools ms- 1.10.8

(2 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333
vsclangdf:30486550

tengyuntian avatar Jul 14 '22 21:07 tengyuntian

@tengyuntian can you please share a screenshot of what you were seeing?

rebornix avatar Jul 15 '22 18:07 rebornix

image image

This happens again. The screenshot is attached.

tengyuntian avatar Jul 20 '22 17:07 tengyuntian

similar to my issue, but not identical behavior: https://github.com/microsoft/vscode/issues/155820

tjex avatar Jul 21 '22 08:07 tjex

Happened again. As the pic shows. I have to restart the .ipynb script.

image

tengyuntian avatar Jul 22 '22 19:07 tengyuntian

@tengyuntian does it happen all the time or it only happens when you run some cells which emit rich outputs (with widgets)?

rebornix avatar Jul 27 '22 22:07 rebornix

@tengyuntian does it happen all the time or it only happens when you run some cells which emit rich outputs (with widgets)?

It happened when I run cells with huge outputs. Also, it will happen sometimes when my ipynb is too long.

tengyuntian avatar Jul 27 '22 23:07 tengyuntian

@tengyuntian thanks, that's really helpful. Would it make sense to provide a code snippet that get your VS Code into this state and share with us?

rebornix avatar Aug 03 '22 19:08 rebornix

@tengyuntian thanks, that's really helpful. Would it make sense to provide a code snippet that get your VS Code into this state and share with us?

My script is growing longer, and the data need to be processed is becoming larger and larger with my research going on. So the "grey background" problems happen more and more often. I have to close the Jupyter Notebook and open it again to eliminate it. But this action results in longer waiting time for re-running all functions and importing all data. I think the key problem is that the amount of data is too large. The data is in .txt format. I have over 30 txt files with a total number of lines over 1 million. And they will be plotted into hundreds of plots to show the experimental results.

tengyuntian avatar Aug 04 '22 20:08 tengyuntian

I found that every time it is running hard and has no responding, if I scroll the interface up/down, it will crash and the background becomes grey, and all the outputs are hidden in the grey.

tengyuntian avatar Aug 08 '22 23:08 tengyuntian

Capture

tengyuntian avatar Aug 11 '22 17:08 tengyuntian

Is there anything I can do to avoid this? Every time I open a notebook with heavy data outputs, it will become grey and sometimes not responding. When it becomes grey, I cannot see or select any output and I have to re-open and re-run everything, then it happens again.

tengyuntian avatar Aug 11 '22 17:08 tengyuntian

I am running into the same issue these days again and again, is there any workaround to figure it out? I cannot do anything if I work with the visual studio code, help

kevindany avatar Sep 08 '22 02:09 kevindany

I am also experiencing this issue. VSCode+Jupyter is completely unusable.

kelleyjbrady avatar Sep 20 '22 23:09 kelleyjbrady

@kevindany, @tengyuntian I was able to resolve this by exporting my .ipynb to a .py file, then converting the .py file back into a .ipynb.

  1. Open the problem .ipynb
  2. CTRL+SHIFT+P
  3. Select Jupyter: Convert to Python Script
  4. Open the .py file
  5. Right click whitespace in the file and select Export Current File as Jupyter Notebook

Bonus points, you should be able to use git mv to carry over the versioning from the problematic file to the reconstituted one. (Rename the broken file to literally anything, then rename the reconstituted file to be same as the broken file's original name using git mv)

kelleyjbrady avatar Sep 21 '22 16:09 kelleyjbrady

@kevindany, @tengyuntian I was able to resolve this by exporting my .ipynb to a .py file, then converting the .py file back into a .ipynb.

  1. Open the problem .ipynb
  2. CTRL+SHIFT+P
  3. Select Jupyter: Convert to Python Script
  4. Open the .py file
  5. Right click whitespace in the file and select Export Current File as Jupyter Notebook

Bonus points, you should be able to use git mv to carry over the versioning from the problematic file to the reconstituted one. (Rename the broken file to literally anything, then rename the reconstituted file to be same as the broken file's original name using git mv)

It does not work :-(, it grays again

kevindany avatar Sep 22 '22 11:09 kevindany

Same issue here. As soon as my notebook reaches a certain length, it turns grey/black whenever I run any cell with a longer output or a graph.

grendelaglaeca avatar Jan 26 '23 21:01 grendelaglaeca

I am also having this issue when I make plots with Plotly over large data. I tried to make a jupyter notebook for each large plot (one plot per notebook) but it still does not work. I didn't have this issue before this (I have had plots with large datasets before, but it was okay). Is there a temporary solution for this? like clearing a cache or something to temporarily fix the problem?

FLabbaf97 avatar Feb 09 '23 19:02 FLabbaf97

I'm having the same problem with plotly plots of large point clouds, in addition to turning gray I get " VSCode not reponding" and the program crahes everytime I try to poen that notebook.

AhmedBaza1 avatar Feb 15 '23 11:02 AhmedBaza1

I am also experiencing the same issue. Does anyone found anything helpful?

samadroohi avatar Mar 10 '23 01:03 samadroohi

Same. VS Code and Jupyter Notebooks do not appear to be working well together...

rjager avatar Mar 10 '23 15:03 rjager

Same on the latest ubuntu, latest vscode.

image

Not sure if plotly is to blame since deleting the renderer extension didn't help. It might be just due to the big length of the notebook.

pochtar avatar Mar 16 '23 04:03 pochtar

@kevindany, @tengyuntian I was able to resolve this by exporting my .ipynb to a .py file, then converting the .py file back into a .ipynb.

Thanks, it worked.

isra-st avatar Apr 05 '23 09:04 isra-st

same here with a large-ish notebook. ctrl+shift+P -> Developer: Reload Window fixes the problem (easier than renaming), but that also restarts the notebook which is not ideal

Linusnie avatar Apr 18 '23 13:04 Linusnie

Found the same problem

Cells background become grey, editor becomes sluggish, modal window pops ups saying window is not responding.

This behaviour happens with a notebook with a cell containing a function that reads a 200Mb file. Tried the previous workarounds (exporting file, reload window, copy to new notebook) but it keeps happening again.

Version: 1.77.3 (Universal) Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710 Date: 2023-04-12T09:19:37.325Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Darwin x64 22.4.0 Sandboxed: Yes

Using python kernel 3.10.9

frantic0 avatar Apr 20 '23 18:04 frantic0

same problem here on ubuntu 20.04.

kpierce8 avatar May 10 '23 19:05 kpierce8

Hi, has this issue been resolved yet? I keep getting it, also with large files, but it's getting more frequent

carlavdb avatar May 11 '23 12:05 carlavdb

same problum her O.o any1 no ware probum iz?

SirCheeseGrill avatar May 20 '23 23:05 SirCheeseGrill

Background grays out for medium sized notebooks (vscode: Version: 1.74.3) - must be memory issue. Does not happen for small notebooks but should be considered a SERIOUS BUG as all output in notebook becomes invisible. Screen Shot 2023-05-25 at 4 28 05 PM

andy-smileid avatar May 25 '23 22:05 andy-smileid

I'm running into this same issue (vscode version 1.79.1), but for me it appears to be tied to the libraries I'm importing into the notebook, not the size of the dataframes I'm operating on. For example, if I import plotly, this issue arises even if I never use any plotly functions in the notebook - even basic pandas operations (e.g. df.head()) will result in the graying out behavior.

UPDATE: I don't know why this fixed the issue, but switching from conda/mamba to poetry as my package manager resolved the problems I was having.

benamishkin avatar Jun 15 '23 04:06 benamishkin

I see the same issue (version 1.79.1 Darwin ARM). The first sign of it is that the timer next to the spinning wheel tends to update slower and Code Helper (Renderer) seems to use a lot of CPU (>100%). At some point the underlying process that was running in the cell (in my case R) stops using CPU but the renderer doesn't detect that the process is done and the spinning arrows keep turning. This even after a complete machine restart with low memory pressure (R is using about 1 GB of memory). Eventually after this I will get the grey background shown in screenshots and VSCode becomes unusable (at least on that window, even quitting takes a while). I tried hiding the output of the cell before running, but doesn't seem to make a difference. The timer gets updated later retrospectively (so showing initially a longer time and then getting back to 1m 29s as shown below.

image

After that, I cannot create any more cells on that notebook.

Update: Turning off warnings (there were a lot of it being written by R into the cell output) in R, avoids the problem. So it seems to be an issue with the amount of IO written into the cell output. Having said that, I have been producing a lot of these calls in the past (with loads of warnings) without issues.

pcm32 avatar Jun 15 '23 08:06 pcm32