microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.87k stars 29.15k forks source link

VSCode freezes when switching from Chrome to it #28709

Closed MartonEstok closed 5 years ago

MartonEstok commented 7 years ago

Steps to Reproduce:

  1. open VSCode
  2. work a couple of minutes
  3. move to another app (chrome)
  4. move back to vscode = freezing for 10-15 seconds

I have tried to run with the disable-extensions command, clean installed it, closed minimap, tried the insders version - nothing helped.

Can you suggest a way to find the cause ?

Windows is operating normally in the meantime, nothing else is frozen.

GeorgeWL commented 5 years ago

not an opengl thing as far as I can tell, disabled it on VS code and in-browser flags, still causing issue.

in vscode by adding --disable-gpu --disable-gpu-compositing as params to the shortcut. in browser via the flags option.

scriptcoded commented 5 years ago

@GeorgeWL Hmmm, interesting... I was able to get it working by disabling OpenGL.

okayawright commented 5 years ago

same issue with the latest VS Code build on plain X11

Version: 1.31.1 Commit: 1b8e8302e405050205e69b59abb3559592bb9e60 Date: 2019-02-12T02:19:29.629Z Electron: 3.1.2 Chrome: 66.0.3359.181 Node.js: 10.2.0 V8: 6.6.346.32 OS: Linux x64 4.18.16-300.fc29.x86_64

and both Chromium 71.0.3578.98 and Chrome 74.0.3710.0

but the --disable-gpu workaround works fine here: I'm then able to debug without the application freezing on me.

I don't know whether it might be relevant in any way but when I don't disable the GPU acceleration, Chromium outputs that on start:

/usr/lib64/dri/hybrid_drv_video.so init failed
Not using hybrid_drv_video.so
[12993:12993:0220/231135.360408:ERROR:vaapi_wrapper.cc(343)] This build of Chromium requires VA-API version 1.3, system version: 1.4
[12993:12993:0220/231135.516673:ERROR:sandbox_linux.cc(364)] InitializeSandbox() called with multiple threads in process gpu-process.
[12993:12993:0220/231135.823072:ERROR:gl_surface_presentation_helper.cc(237)] GetVSyncParametersIfAvailable() failed!
...

P.S. Here's the output of vainfo:

libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_3
/usr/lib64/dri/hybrid_drv_video.so init failed
Not using hybrid_drv_video.so
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Sandybridge Mobile - 2.2.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
jpike88 commented 5 years ago

This happens to me multiple times daily, on macOS Mojave, latest official build. It's beginning to really drive me nuts. I guess I'll disable GPU if it keeps happening but this should be a higher priority fix

cbtkris commented 5 years ago

I haven’t had the issue since upgrading VS Code.. but I believe there have been several updates since my initial report. Also, I am still on OSX 10.13.6 [Sierra].

We hope you found this email of interest; however, click here if you wish to unsubscribehttp://www2.smartbear.com/SubscriptionCenter.html?utm_source=outlook&utm_medium=email&utm_content=emailsig or manage your email preferences. Privacy Policy.https://smartbear.com/privacy/

bpasero commented 5 years ago

We are building exploration builds that use a much newer version of our UI framework (Electron version 6.0.x). I wonder if this issue reproduces with one of these builds, could you try? Download:

scriptcoded commented 5 years ago

I haven't been able to reproduce this in neither 1.38.1, insiders (1.19.0) or the exploration build you linked, all on Ubuntu 18.04.2. This issue haven't happened for me for almost a year as well.

vscodebot[bot] commented 5 years ago

We closed this issue because we are unable to reproduce the problem with the steps you describe. Chances are we've already fixed your problem in a recent version of VS Code. If not, please ask us to reopen the issue and provide us with more detail. Our issue reporting guidelines might help you with that.

Happy Coding!