PTVS
PTVS copied to clipboard
IntelliSense hangs indefinitely on various occasions, only process restart helps
Describe the bug
While in regular IntelliSense contexts, the process hangs with a modal window and never unfreezes. Only restarting devenv.exe "helps".
Steps to Reproduce
This occurs sporadically but regular enough to make it a big deal. Here, for example, I can't even say what it does, I was just trying to watch the value of a variable:
I do not invoke any sort of formatting at that point.
Expected behavior
No freezing and no infinite freezing.
Additional context and screenshots
Visual Studio Version 17.7.0 Preview 2.0. Python 3.9.16 Conda environment is used.
Also noticed at these hanging moments there's node.exe doing something really heavy:
Not mine, I don't touch these technologies myself.
Yapf formatter is used. For some reason, this node.exe is spawned and eats high memory for no obvious reason:
I am not using node js anywhere in my work.
When I remove "node.exe" from the disk to find who's using it, here is:
So I would guess there's something wrong like infinite recursion or overflow in the PyLance server, but then VS waits for its completion indefinitely completely hanging the thing.
Thanks for the issue. Would you be able to provide a minimal, self-contained code sample that we can use to repro your issue? Additionally, could you try if you can repro this in vscode if possible? This will help us narrow down whether the issue lies with Pylance or PTVS. Thank you!
@StellaHuang95 sorry, but it does so on pretty much any python code and really sporadically. Mind that I do NOT request it to format code and I do NOT insert any code when it hangs with this "Formatting selection" modal.
I found this problem is years old and comes in different flavours: https://stackoverflow.com/questions/36727108/copy-dialog-formatting-selection-is-freezing-causing-the-gui-to-hang-how-to Even though that's a 6 years old issue, it's pretty much the same as my case. As it appears, it is not Python-specific, people experience a lot of it in C# too. There must be a fundamental flaw somewhere deeper in the VS architecture.
Thanks, we will try to repro the issue. Meanwhile, if you believe it's not a python specific issue, it might fall outside the scope of this repository. In such cases, we recommend reporting the problem to the VS team via Visual Studio -> Help -> Report a problem so that it goes to the appropriate team who can assist you further.
@StellaHuang95 well, it's hard to say. I never met it with C++ or C#. Only Python.
Do you have a simple code example or repo link to your code we could try against?