Skip to content

Extension host terminated unexpectedly #342

Closed

Description

@OraCool

Environment data

VS Code version:

  • Version 1.19.0-insider
  • Commit 8a12b29
  • Date 2017-12-04T05:14:19.063Z
  • Shell 1.7.9
  • Renderer 58.0.3029.110
  • Node 7.9.0
  • Architecture x64

Python Extension version: Version 0.8.0 (9 November 2017)
Python Version: Python 3.6.3 :: Anaconda, Inc.
OS and version: Windows 10 Enterprise Edition

Actual behavior

image

Expected behavior

Start MS Python extension

Steps to reproduce:

  • Install ms-python extension from Microsoft
  • Create new empty py file.
  • Wait for an amount of time after opening Python file. Error appears.

Logs

Output from Python output panel

Output from Console window (Help->Developer Tools menu)


/C:/Program Files/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:2734 Extension host terminated unexpectedly.
e.doShow @ /C:/Program Files/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:2734

image

Activity

  1. DonJayamanne commented on Dec 4, 2017

    @DonJayamanne

    Please try reinstalling the extension. Also, do you have other installed on the current system?

  2. OraCool commented on Dec 5, 2017

    @OraCool
    Author

    Tried several times to reinstall the extension. Doesn't help.
    I have a lot of extensions installed, But I've disabled all and only ms-python is enabled.

  3. Zedonboy commented on Dec 13, 2017

    @Zedonboy

    Any solution Yet?

  4. brettcannon commented on Dec 13, 2017

    @brettcannon
    Member

    Unfortunately not because the error is "it crashed" which doesn't help debug why the extension crashed.

  5. DonJayamanne commented on Dec 13, 2017

    @DonJayamanne

    OraCool (@OraCool) are you able to help us diagnose this issue by debug this at your end?
    I could send the instructions for this. Thanks

  6. OraCool commented on Dec 15, 2017

    @OraCool
    Author

    I can help if needed. Please let me know what should I do

  7. DonJayamanne commented on Dec 16, 2017

    @DonJayamanne

    OraCool (@OraCool)
    One last thing, please could you try disabling all other extensions and testing this out.

    Here are the instructions:

    If the extension does not load, you'll get errors in the debugger console, and that's what we're interested in. If it does work, then we could try something else.

  8. OraCool commented on Dec 18, 2017

    @OraCool
    Author

    I've passed all the steps from the instruction and got the following error:
    image
    Changing settings in the local workspace for "editor.detectIndentation" doesn't help.
    Secon window is closing after I open *.py code or try to open "Python: Select Interpreter" in command palette:
    image
    In the extension's debugger window I am getting the following exception (if it will help):
    image

  9. 127 remaining items

  10. Ayanjit commented on May 16, 2018

    @Ayanjit

    Flo (@mawenzy) Awesome!!! Thanks a lot for your solution. It worked for me. Now, I can sleep in peace.
    In my case mingw path had semicolon in the path variables. How did you find this solution?

  11. DonJayamanne commented on May 16, 2018

    @DonJayamanne

    OraCool (@OraCool) Jingsong Xu (@xjsxujingsong) Jingsong Xu (@xjsxujingsong)
    Please could you also check if you have similar (#342 (comment)) invalid entries in your current path variable.

  12. brettcannon commented on May 16, 2018

    @brettcannon
    Member

    Flo (@mawenzy) Ayanjit can either of you provide your PATH settings before and after? Semi-colons are the path separator on Windows so that shouldn't cause a problem (but we have had issues with PATH and node previously). But if we can have an example of where it does and does not work we can also track down where we need to be careful about this sort of thing.

  13. mawenzy commented on May 16, 2018

    @mawenzy

    Brett Cannon (@brettcannon) adding a semicolon to a path results in this particular path to be written in quotations marks, so usually it looks like this:
    PATH=path1;path2;path3
    But when for example path2 has a semicolon in it, is reads:
    PATH=path1;"path2";path3

  14. brettcannon commented on May 16, 2018

    @brettcannon
    Member

    Flo (@mawenzy) Ah, so you had a directory like C:\I\like\semi;colons and it ended up as PATH=path1;"C:\I\like\semi;colons";path3? And then making it PATH=path1;path3 solved it?

  15. mawenzy commented on May 16, 2018

    @mawenzy

    Yes, exactly

  16. brettcannon commented on May 16, 2018

    @brettcannon
    Member

    Flo (@mawenzy) Great, thanks for this! We will see if it's on our end, VS Code, or Node's.

  17. xjsxujingsong commented on May 17, 2018

    @xjsxujingsong

    Don Jayamanne (@DonJayamanne) Just checked that. It works fine now. I accidentally add an additional ";" in the path variable. Thanks!!

  18. vinjohn commented on May 21, 2018

    @vinjohn

    Flo (@mawenzy) Thanks, it solves my issue!
    for my case, when I type "path" in cmd, results contain path with "", like PATH=path1;"path2";path3...
    I find one cases may cause this issue, that is using alias path, such as %CUDA_PATH%;%CUDA_SDK_PATH%. After I replaced alias path with full path, issue disappeared.

  19. arjunkharbanda commented on May 21, 2018

    @arjunkharbanda
    
    C:\Users\Arjun Kharbanda>path
    PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\nodejs\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\WINDOWS\System32\OpenSSH\;C:\Users\Arjun Kharbanda\AppData\
    about:blankLocal\Programs\Python\Python36\Scripts\;C:\Users\Arjun Kharbanda\AppData\Local\Programs\Python\Python36\;C:\Users\Arjun Kharbanda\AppData\Local\Programs\Python\Python36\Scripts;C:\Users\Arjun Kharbanda\AppData\Local\Programs\Python\Python36;C:\Users\Arjun Kharbanda\AppData\Local\Microsoft\WindowsApps;C:\Users\Arjun Kharbanda\AppData\Roaming\npm;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\Arjun Kharbanda\AppData\Local\GitHubDesktop\bin;"C:\Users\Arjun Kharbanda\AppData\Local\Programs\Python\Python36\Scripts\;";"C:\Users\Arjun Kharbanda\AppData\Local\Programs\Python\Python36;C:\Users\Arjun Kharbanda\AppData\Local\atom\bin;;C:\Users\Arjun Kharbanda\AppData\Local\hyper\app-2.0.0\resources\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\Arjun Kharbanda\AppData\Local\Microsoft\WindowsApps
    ``` how fix this?
    
  20. DonJayamanne commented on May 21, 2018

    @DonJayamanne

    Arjun Kharbanda (@arjunkharbanda)

    • Please remove invalid entries.
      • Looks like you have about:blank in there. Please edit your environment variables to remove invalid items such as the one above and any empty lines.
      • You might have some empty items as well, as there are two ;; (replace with ;).
      • You seem to have paths with " that do not seem to have matching closing "
        Once again, remove invalid items, by editing you PATH environment variable.
  21. arjunkharbanda commented on May 21, 2018

    @arjunkharbanda

    looks like the issue is resolved it's is due to invalid values in PATH in environment variables. Can it be fixed in future updates?

  22. d3r3kk commented on May 22, 2018

    @d3r3kk

    Closing, we will track issue #1698 that will resolve this issue from our end.

  23. locked as resolved and limited conversation to collaborators on Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions