Skip to content

editor becomes unresponsive all the time since last update #7391

Closed

Description

@preexo
  • VSCode Version:1.2.0
  • OS Version:Windows 10

Steps to Reproduce:

  1. Open Visual Studio Code
  2. Update to latest version

I just updated my Visual Studio Code to the latest version. Congratulations, since then it is unresponsive all the time. I can work for a few seconds, then I hit a key, it freezes and can only be solved by killing the process through task manager...
It was running nice and smooth before the latest update, which I got today. Sadly I can't work like this and need a reliable editor, so I have to go back to use something else now.

Good luck.

Activity

  1. danielepolencic commented on Jun 8, 2016

    @danielepolencic

    Since the last update, the editor is very slow for me too. I'm on Mac (10.10.5) and I just upgraded to 1.2.0

    EDIT: I run VS Code vanilla. No plugins.

  2. doyint commented on Jun 8, 2016

    @doyint

    I am experiencing the same thing to plus saving the JS file the title are start to flicker and will not save.

  3. workingj commented on Jun 8, 2016

    @workingj

    I am experiencing the same thing if i open a third file-tab.
    It also does not refresh the window if i (alt-tab) into an other open programm, like browser etc.
    _ Edit: I work on Windows 7._

  4. calebegg commented on Jun 9, 2016

    @calebegg

    I'm also seeing a lot of freezing with the latest update. I can generally only go ~10 minutes between freezes, and when it freezes all I can do is kill the whole process. Is there somewhere we can look for crash dumps/log files?

    1.2.0 on Ubuntu 14.04; I almost exclusively use VSCode for TypeScript.

  5. added
    important
    on Jun 9, 2016
  6. alexdima commented on Jun 9, 2016

    @alexdima
    Member

    I am sorry you are experiencing this. To help us reproduce, can you please give us more details. Is there a common pattern between these freezes (I see that they occur on Windows 10, Windows 7, Ubuntu and Mac), so I'm thinking they are not OS specific (if they have the same root cause).

    What sort of languages are you working on? I see TypeScript and JavaScript mentioned. Is that true for everybody? We have had quite a few issues with the TS/JS grammars (sometimes they recurse to death). Is it possible that this happens when opening a certain file or a file containing a certain pattern that would cause the grammars to go crazy?

    We would appreciate any other details to repro this.

  7. added
    freeze-slow-crash-leak
    on Jun 9, 2016
  8. alexdima commented on Jun 9, 2016

    @alexdima
    Member

    Are you using the new integrated terminal?

  9. added
    candidate
    on Jun 9, 2016
  10. calebegg commented on Jun 9, 2016

    @calebegg

    Are you using the new integrated terminal?

    I'm not.

    We would appreciate any other details to repro this.

    I tried it a bit more today, and, at least for me, it seems to always happen when I try to save. I press ctrl+S, but the save operation never completes (the black dot never goes away, and the file never actually gets saved). I then have to kill the process and try again. It happens maybe 5-10% of the time (or less) when I try to save (most save operations are successful and instant)

    The files I'm editing are on a networked filesystem, which might be related, though I'm confident that that's not the direct cause, because (a) this has always worked in previous versions and (b) I'm not seeing this problem in other editors, including a 1.1 install of VS Code.

  11. doyint commented on Jun 9, 2016

    @doyint

    That's exactly the same thing for me, I think it might be .js file related because I have some html and php file open in different tabs and it never happened on those files, I initially thought it might be because the terminal was opened, but that wasn't the case, and I also thought it may be because their is a grunt watchify on the folders I am working on, but it's wasn't the case either, I have also started removing some plugins, which initially things seems fine, so I would attribute that to the plugin bug. But then I am still getting the same issue again.

    Windows 7
    I am on cooperate network.

    I installed V1.1 to see if I could revert back but that problem still occurred.
    I am back on v1.2

    Temporary solution for now is:
    After press CTRL + S to save, the flickering starts to happen, as if it's trying to save but then cant save which sends it's in a endless loop.
    If I press CTRL + Z, to undo, it will stop and eventually save the file, the implication of that is, I lose the complete history of the file, so I can't further undo any actions, prior to me saving it.
    Solution B: Sometimes I also find if the flickering is happening, if I switch to debug to view git file changes, then this also terminate the flickering and saves the file also. Again I still lose the file history meaning I can't undo any changes made prior.

    It's a pain to work with now.

    I hope this is enough information.

  12. preexo commented on Jun 10, 2016

    @preexo
    Author

    I am using VS code only for PHP programming. I could use it a few seconds, a couple of keystrokes and it would freeze and never wake up again.
    I just gave it another try and just uninstalled, then reinstalled it. It seems fine for now.

    Even though all users are describing similar symptoms, we all seem to use it a tiny bit different and therefore it might all be related to completely different problems.

    Anyway, it works fine for me at the moment.

    Is there no debug more with log files or anything that we could append the next time this happens?

  13. 37 remaining items

  14. calebegg commented on Jun 27, 2016

    @calebegg

    Here's a similar file that kills my VSCode within a few seconds. 96K lines, 3.9MB.

    http://ca.lebe.gg/files/out.d.ts

    Like I said, I don't necessarily expect VSCode to be able to handle such large, generated files, but the problem is that if I depend on a symbol from this file elsewhere, it also seems to crash VSCode eventually.

    Also, if it helps, my deps on files of this size worked fine pre-1.2. This all only started with VSCode 1.2.

  15. added
    important
    on Jun 27, 2016
  16. alexdima commented on Jun 28, 2016

    @alexdima
    Member

    Caleb Eggensperger (@calebegg) Thank you so much for the repro file! I can immediately reproduce.

    fyi Erich Gamma (@egamma) Martin Aeschlimann (@aeschli)

    It is the TypeScript TM grammar. I have done the following change in our code:
    image

    The grammar keeps on pushing states and never leaves them. Again!

    [15740:0628/125238:INFO:CONSOLE(218)] "SCOPES CNT: 429", source: file:///C:/Alex/src/vscode/out/vs/editor/node/textMate/TMSyntax.js (218)
    [15740:0628/125238:INFO:CONSOLE(218)] "SCOPES CNT: 429", source: file:///C:/Alex/src/vscode/out/vs/editor/node/textMate/TMSyntax.js (218)
    [15740:0628/125238:INFO:CONSOLE(218)] "SCOPES CNT: 428", source: file:///C:/Alex/src/vscode/out/vs/editor/node/textMate/TMSyntax.js (218)
    [15740:0628/125238:INFO:CONSOLE(218)] "SCOPES CNT: 428", source: file:///C:/Alex/src/vscode/out/vs/editor/node/textMate/TMSyntax.js (218)
    [15740:0628/125238:INFO:CONSOLE(218)] "SCOPES CNT: 426", source: file:///C:/Alex/src/vscode/out/vs/editor/node/textMate/TMSyntax.js (218)
    [15740:0628/125238:INFO:CONSOLE(218)] "SCOPES CNT: 428", source: file:///C:/Alex/src/vscode/out/vs/editor/node/textMate/TMSyntax.js (218)
    [15740:0628/125238:INFO:CONSOLE(218)] "SCOPES CNT: 429", source: file:///C:/Alex/src/vscode/out/vs/editor/node/textMate/TMSyntax.js (218)
    [15740:0628/125238:INFO:CONSOLE(218)] "SCOPES CNT: 429", source: file:///C:/Alex/src/vscode/out/vs/editor/node/textMate/TMSyntax.js (218)
    [15740:0628/125238:INFO:CONSOLE(218)] "SCOPES CNT: 429", source: file:///C:/Alex/src/vscode/out/vs/editor/node/textMate/TMSyntax.js (218)
    [15740:0628/125238:INFO:CONSOLE(218)] "SCOPES CNT: 429", source: file:///C:/Alex/src/vscode/out/vs/editor/node/textMate/TMSyntax.js (218)
    

    This means that the grammar has a scope stack of depth 429, causing each token to have 429 scopes. It leads us to a DoS through OOM.

    I am not sure when we last updated the TS grammar and why it started showing up in 1.2. Martin Aeschlimann (@aeschli) ?

  17. aeschli commented on Jun 28, 2016

    @aeschli
    Contributor

    There were 2 update to TS in 1.3:
    700d736 and 88f88a9

  18. alexdima commented on Jun 28, 2016

    @alexdima
    Member

    Martin Aeschlimann (@aeschli) I can reproduce on master

    Also, if it helps, my deps on files of this size worked fine pre-1.2. This all only started with VSCode 1.2.

    So we need to assume the bad grammar change got in first in 1.2

  19. calebegg commented on Jun 28, 2016

    @calebegg

    It could also be that the pre-parsing of files that aren't open in the editor got introduced (I assume to speed up opening times) in 1.2. I have no idea, though.

  20. dbaeumer commented on Jun 29, 2016

    @dbaeumer
    Member

    Removing my assignment since this is in very good hands.

  21. removed
    info-needed
    on Jun 29, 2016
  22. alexdima commented on Jul 1, 2016

    @alexdima
    Member

    After adopting [email protected] (see #7912) (where the StackElement is immutable) this .d.ts does not cause an OOM for me anymore:

    image

    It is significant to note that the TypeScript grammar gets so broken for this example that at the end of the file it has entered 7152 rules that are not left!!! I will create a separate bug for them.

    The good thing is we no longer crash.

  23. added
    verification-needed
    on Jul 1, 2016
  24. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

freeze-slow-crash-leakimportantverification-neededverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions