Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor Services Crashes when Large Amount of Text is Removed #1524

Closed
gabrieljtaylor opened this issue Sep 11, 2018 · 1 comment
Closed

Editor Services Crashes when Large Amount of Text is Removed #1524

gabrieljtaylor opened this issue Sep 11, 2018 · 1 comment

Comments

@gabrieljtaylor
Copy link

gabrieljtaylor commented Sep 11, 2018

Issue Description

I am experiencing frequent and consistent crashes of the PowerShell extension whenever a large amount of text (that includes the last line of a script) is removed, either via deletion or via the text being pasted over. This is happening consistently and always produces the same error in the EditorServices log (see the error below or via the attached file).

I assume this is related to something within the extension parsing the script text and being unhappy with too much being removed at one time (possibly PSScriptAnalyzer?), though the error message doesn't make it clear what action is being performed when the extension crashes.

The EditorServices log shows the following error message:

2018-09-11 13:03:06.644 [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: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

(Call stack removed from this quote; refer to the attached file for the call stack)

Attached Logs

PowerShellExtensionCrashLogs.zip

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.17134
VSCode 1.27.1
PowerShell Extension Version 1.8.4

PowerShell Information

Name Value
PSVersion 5.1.17134.228
PSEdition Desktop
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.17134.228
BuildVersion 10.0.17134.228
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
gitlens eamodio 8.5.6
mssql ms-mssql 1.4.0
notepadplusplus-keybindings ms-vscode 1.0.2
PowerShell ms-vscode 1.8.4
xml DotJoshJohnson 2.3.2
@gabrieljtaylor gabrieljtaylor changed the title Editor Services Crashes when Replacing All Text in a Script via Copy/Paste Editor Services Crashes when Large Amount of Text is Removed Sep 11, 2018
@rjmholt
Copy link
Contributor

rjmholt commented Sep 11, 2018

Thanks for opening an issue @gabrieljtaylor. This is a duplicate of PowerShell/PowerShellEditorServices#739.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants