Vscode-powershell: Crash "Errors caught while waiting for EditorServicesHost to complete execution" between two conflicting file

Created on 26 Jul 2018  路  4Comments  路  Source: PowerShell/vscode-powershell

Issue Description

Hi, I'm currently experimenting with Powershell DSC, and I have problem working with both my configuration script file and my configuration data file open at the same time.

Configuration Script = DSQ_INSTALL_IIS.ps1
Configuration Data = VmTest.psd1

I changed my service log to "powershell.developer.editorServicesLogLevel": "Diagnostic" to see what the problem was.

My powershell terminal is crashing throwing this error at the very moment I'm trying to type something :

VERBOSE: ERRORS caught while waiting for EditorServicesHost to complete execution
VERBOSE: One or more errors occurred.
...
Value is not between 1 and 2
Parameter name: lineNumber
Actual value was 8
....

Here is what I did :
1 - Open only DSQ_INSTALL_IIS.ps1, no problem working in it.
2 - Open only VmTest.psd1, no problem working in it.
3 - Open DSQ_INSTALL_IIS.ps1, then VmTest.psd1.
4 - Working in VmTest.psd1 while both files open is fine
5 - Working in DSQ_INSTALL_IIS.ps1 while both files open make the extension crash.
6 - Closing and reopen vscode with both open at the same time doesn't make it any better.

I attached logs and files.

Thank you !!

Attached Logs

Issue.zip

Environment Information

Visual Studio Code

| Name | Version |
| --- | --- |
| Operating System | Windows_NT x64 10.0.17134 |
| VSCode | 1.25.1|
| PowerShell Extension Version | 1.8.1 |

PowerShell Information

|Name|Value|
|---|---|
|PSVersion|5.1.17134.165|
|PSEdition|Desktop|
|PSCompatibleVersions|1.0 2.0 3.0 4.0 5.0 5.1.17134.165|
|BuildVersion|10.0.17134.165|
|CLRVersion|4.0.30319.42000|
|WSManStackVersion|3.0|
|PSRemotingProtocolVersion|2.3|
|SerializationVersion|1.1.0.1|

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)

|Extension|Author|Version|
|---|---|---|
|PowerShell|ms-vscode|1.8.1|;

Issue-Bug

All 4 comments

Hi @MayPLaY, thanks for opening an issue. My first guess is that EditorServices doesn't like the hashes in the path. I've opened an issue in the EditorServices repo to track this.

Hey!

To add on top of the logs I already gave you, I got a lot of crash with this kind of message too, it's getting hard working with the terminal.

In case that help!
Thanks a lot again.

2018-08-05 21:21:00.948 [ERROR] C:\PowerShellEditorServices\src\PowerShellEditorServices.Protocol\MessageProtocol\ProtocolEndpoint.cs: In method 'OnListenTaskCompleted', line 391: 
ProtocolEndpoint message loop terminated due to unhandled exception:
System.AggregateException: One or more errors occurred. ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: Position 67:36 is outside of the column range of 1 to 29.

@MayPLaY I've been doing some work in this area and released some fixes for it in the last release. Are you still experiencing this issue?

@rjmholt Looks pretty good to me so far, haven't been able to reproduce it at all. I'll open a new issue if it ever comes back.

Thanks a lot.

Was this page helpful?
0 / 5 - 0 ratings