Powershell: integrated powershell session crashes if powershell file is open

Created on 2 Nov 2017  路  7Comments  路  Source: PowerShell/PowerShell

Steps to reproduce

Open vs code and a powershell script. After about 5s-2min, integrated powershell session crashes.

Expected behavior

powershell session does not crash

Actual behavior

integrated session crashes, error:
The PowerShell session has terminated due to an error, would you like to restart it?

Most of the time, if restarted, powershell session will crash faster, after only few seconds.

Tested with x64 and x86 powershell sessions.

Environment data

Name Value
---- -----
PSVersion 5.1.16299.15
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.15
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

plugins:
c#
docker
mssql
one dark pro
powershell
sqltools
visual studio team services
visual studio team services build status
vscode-icons

Issue-Question Resolution-External

Most helpful comment

OK I have fixed this so that it won't cause a crash.

All 7 comments

I think VS Code repo is a better place to ask.

@veepee78,

We appreciate the feedback, as this is not Windows PowerShell issue.

Please, remember to post any Windows PowerShell issues on UserVoice site as stated in the PowerShell Core landing page.

UserVoice link at: https://windowsserver.uservoice.com/forums/301869-powershell

Thanks

Looking at the EditorServices log it appears to be an unhandled exception in EditorServices, not PowerShell. Please open an issue here: https://github.com/powershell/powershelleditorservices

@veepee78 It looks like we might be hitting the Windows path length limit:
```
---> (Inner Exception #0) System.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\MaestroNG\Devel\bower\modules\pdf.js_1.5.188\node_modules\typogr\env-origin\lib\node_modules\bower\node_modules\bower-registry-client\node_modules\request\node_modules\form-data\node_modules\combined-stream\node_modules\delayed-stream\test\integration'.
````
Are there more directories or files under this path? Also, do you have long path support enabled on Windows 10?

OK I have fixed this so that it won't cause a crash.

@rkeithhill There are couple "over the windows's limit" nodejs paths under the solution. I had not enabled long path support but will test that soon.

Great if you found a cause!

Was this page helpful?
0 / 5 - 0 ratings