Ptvs: Invalid interpreter option freezes Visual Studio

Created on 25 Mar 2016  ·  7Comments  ·  Source: microsoft/PTVS

Visual Studio 2015 Update 1, IronPython 2.7.5 (64-bit)

Under Python Tools, Interactive Windows enter an invalid value for Interpreter Options (such as "-InvalidOption!!!"). Open the interactive window and enter any command, e.g. "import sys". There is no output for the command, but the IDE is still responsive. Select Reset from the context menu. Visual Studio completely freezes and I have to kill the devenv.exe process.

REPL bug

All 7 comments

I seem to have a similar issue, but happening in different circumstances.

When I configure cpython 3.5 (compiled earlier by me from source) as the interpreter, if I type anything in the interactive window, the IDE freezes. Other cpythons I have around my system seem to work fine.

If I keep interacting with the devenv window, from time to time the following warning pops up:
2016-03-27 13_02_59-program manager
but the IDE never recovers.

untitled

As a note, starting a project with the same interpreter works just fine - can run, debug, etc, it's just the interactive window that takes down the whole IDE.

correction

Just out of the blue, I decided to delete the python 3.5 python env in vs and I added it again, this time specifying only the prefix path.

I clicked Auto Detect and it properly detected all the settings and now the interactive window works.

new correction
My problem is actually specifying PYTHONPATH as Path environment variable. With it off, everything works.
2016-03-27 13_39_36-start page - microsoft visual studio

@foxx1337 If you don't specify the path environment variable, we should default to PYTHONPATH anyway. Is there any chance you have PYTHONPATH set globally and you've changed the option where we ignore global values? If not, can you create a new issue? I believe yours is unrelated to the original one.

@shift-evgeny This is likely a bug in our handling of IronPython when it fails to start. Thanks for spotting it!

FYI, this bug also exists when using:

  • Visual Studio 2015 (14.0.25431.01 Update 3)
  • PTVS 2.2.40825.00-14.0
  • Python 3.5 (64-bit)

I can confirm the https://github.com/Microsoft/PTVS/issues/1191#issuecomment-202044681 workaround fixes the problem.

@mloskot Can you answer the follow-up question I posed to foxx1337 then? I don't understand how that workaround would make a difference, and so I need more information to figure out what's actually going on here.

@zooba I don't specify PYTHONPATH env variable. I don't specify any Python-related env variables.

I can't reproduce this from the information available on VS 2017, and we won't be updating VS 2015 for it, so I'm going to close this.

Was this page helpful?
0 / 5 - 0 ratings