vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Visual Studio Code is no longer responding

Open h2u opened this issue 11 years ago • 40 comments

Sometimes editor just freeze. Kill task helps only. Have this problem at work and home. I noticed that this started after latest update (0.10.1).

Working in PHP files.

Windows 10 64.

h2u avatar Nov 19 '15 08:11 h2u

image

this is how my task manager looks at VSC freeze

h2u avatar Nov 19 '15 08:11 h2u

I have the same issue since 0.10.1, vscode stops responde every 5mins when it starts. I am writing PHP and js, OS win7 64 bit

bingzheyuan avatar Nov 19 '15 11:11 bingzheyuan

I am having the same issue when working on PHP files. At first I thought it was the new linter but I deliberately set the php.validate.executablePath to an invalid binary and the freezes still happen - I can confirm that php.exe is not getting called. The next thing I tried was to disable auto save; That did not help either. I am pretty sure that I can rule out both as the cause.

The next thing I did was running Process Monitor and Explorer to see if I can see anything that will lead to the freeze but I wasn't able to come up with anything. It is, however, always the same code.exe process that goes haywire. The affected process is launched with the following command:

"C:\Program Files (x86)\Microsoft VS Code\code.exe" "c:\Program Files (x86)\Microsoft VS Code\resources\app\out\bootstrap" --type=pluginHost

The process hanging has the following threads running:

threads

The stack of the endlessly running thread is as follows:

stack

Using Process Monitor I didn't see anything special regarding the freezes, I am also unable to reliably reproduce this but it is happening every few minutes, however, if the editor is left alone it seems ro run fine. It's only when you actually write some code that the editor seems to freeze after a while.

This is affecting me since 0.10.1 on Windows 7 x64, all possible patches applied.

Edit: I also downloaded the editor's source to have another project to test this on and I experienced no freezes typing away in various files. At least on my machine this seems like it is related to PHP files. I haven't been able to test anything else besides typescript/js/PHP though.

DerTolleEmil avatar Nov 19 '15 12:11 DerTolleEmil

Also happening to me while editing PHP files, although I haven't tried other files too. I thought it was extension related, but then I removed all extensions and it's still happening.

matthewjohnston4 avatar Nov 19 '15 13:11 matthewjohnston4

I'm experiencing this issue as well. Very often when working on files that are opened via WinSCP I get CPU spikes and then the program eventually freezes up and crashes. When I kill the Code process thread that is running up the CPU it levels out and doesn't crash, but Code says something about a plugin was terminated. Is there a way to backdate to an older exe version of Code? Code is no longer usable for me and I would like to be able to use the previous version until this gets fixed? Anyone know of a way to do this (go back to 0.9~)?

blackwire avatar Nov 19 '15 15:11 blackwire

@blackwire Version 0.9.2: https://az764295.vo.msecnd.net/public/0.9.2/VSCodeSetup.exe

~~Not quite sure how to prevent the auto updating though, not sure if there is an option.~~ Edit regarding auto update: https://github.com/Microsoft/vscode/issues/160#issuecomment-158104614

As for my freezes: I don't have any extensions or plugins that are not shipped by default. I think you are experiencing a different problem. Killing the pluginHost fork on my machine does nothing to get it back to a working state, instead code crashes completely.

DerTolleEmil avatar Nov 19 '15 15:11 DerTolleEmil

@blackwire, i was searching for old releases but didn't found anything.

h2u avatar Nov 19 '15 15:11 h2u

@DerTolleEmil So, I don't have any non standard plugins either. Though, when I opened task manager and killed the process thread that was running as a part of code (not the app) that is using 30+% CPU it terminates intellisense I think, because it's no longer working after that point.

blackwire avatar Nov 19 '15 15:11 blackwire

@DerTolleEmil Thank you for the older version download! You saved my day! I can keep this open for today and get some work done without it crashing all the time. Life.. saver.

blackwire avatar Nov 19 '15 15:11 blackwire

@blackwire Are you working on PHP files or are you using another language? So far I can only reproduce this when I edit files that are interpreted as PHP code.

DerTolleEmil avatar Nov 19 '15 16:11 DerTolleEmil

@blackwire One more thing regarding auto-update: Edit your %appdata%\code\storage.json file and change "updateChannel": "stable" to "updateChannel": "none". That will disable automatic updates.

DerTolleEmil avatar Nov 19 '15 16:11 DerTolleEmil

Is everyone else using WinSCP too?

matthewjohnston4 avatar Nov 19 '15 16:11 matthewjohnston4

@matthewjohnston4 I'm not, my files are all saved locally without anything else touching them.

DerTolleEmil avatar Nov 19 '15 16:11 DerTolleEmil

@DerTolleEmil I work primarily in PHP and yes, the issue does seem to arise while I'm working in a PHP file. Also, thank you very much for the update trick! This is great. I'll wait for issues to be resolved with the new version. I really like some of the features, but I need it to be stable before I can take it. Sad too because I was excited to see the themes were working properly. I'll be patient. Again, you've saved my bacon. I'll be able to get some things accomplished today.

blackwire avatar Nov 19 '15 16:11 blackwire

@DerTolleEmil, thank you for older version.

h2u avatar Nov 19 '15 17:11 h2u

I got another freeze trying out a few things in a markdown file. I decided to try to reproduce the error and I did make a bit of progress but not much yet.

Here is what's working so far:

I created a new .php file with the following content:

<?php
echo "asd";

echo "asd"
echo "asd";
?>

The empty line and the missing semicolon are on purpose. I open the file and then open the editor's development console and switch to the "console" tab. All I need to do now is go to the blank line and enter a function name, for example fopen(). As soon as I type the opening bracket you'll see the [Plugin Host] provideSignatureHelp console entry followed by the object containing the corresponding help text. So far so good, however, every now and then when I use an invalid function name I don't get the [Plugin Host] no entry console output but instead I don't get anything at all. What follows are those two warnings the next time I hover over a function or press ctrl+space to open the autocomplete hints:

WARNING: Promise with no error callback:undefined Error: Promise did not implement oncancel(...)

Unfortunately I don't have the line numbers right now because I un-minified the workbench.main.js file. However, the two log entries are printed by this code block:

define("vs/base/common/winjs.base", ["./winjs.base.raw", "vs/base/common/errors"], function(e, t) {
    "use strict";

    function n(e) {
        var n = e.detail,
            r = n.id;
        return n.parent ? void(n.handler && o && delete o[r]) : (o[r] = n, void(1 === Object.keys(o).length && setTimeout(function() {
            var e = o;
            o = {}, Object.keys(e).forEach(function(n) {
                var r = e[n];
                r.exception ? t.onUnexpectedError(r.exception) : r.error && t.onUnexpectedError(r.error), console.log("WARNING: Promise with no error callback:" + r.id), console.log(r), r.exception && console.log(r.exception.stack)
            })
        }, 0)))
    }

From that point on the whole autocomplete/suggestion system acts completely crazy. Most of the time it won't show anything at all but a simple Loading... (and it never goes back to the desired behavior) and sometimes the editor will just freeze. The time between the errors and the editor freezing seems to be random.

Unfortunately it's not really 100% reproducible (I get it to freeze in 3 out of 10 tries or so).

Also, since I am just seeing that issue #266 has been referenced here as well. I also noticed that pasting lots of code (I copied a few hundred lines of simple php echo "asd"; lines) seems to work as well sometimes although that might just be a coincidence. At least I wasn't really able to properly reproduce anything.

DerTolleEmil avatar Nov 19 '15 23:11 DerTolleEmil

Experiencing very crashy behavior together with PHP aswell

mworchel avatar Nov 20 '15 01:11 mworchel

same issue,

ghost avatar Nov 20 '15 09:11 ghost

I'm facing this problem every minutes!

al1b avatar Nov 20 '15 20:11 al1b

This issue is under investigation, stay tuned!

bpasero avatar Nov 20 '15 21:11 bpasero