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

Terminating Exceptions not handled correctly, throw REPL ArgumentOutOfRangeException #3677

Closed
JustinGrote opened this issue Nov 9, 2021 · 8 comments · Fixed by PowerShell/PowerShellEditorServices#1651
Assignees
Labels
Bug: Pre-release Bugs reproducing only in the pre-release extension. Issue-Bug A bug to squash.

Comments

@JustinGrote
Copy link
Collaborator

JustinGrote commented Nov 9, 2021

Issue Type: Bug

Open PSES:
throw 'oops'

StackTrace

An error occurred while running the REPL loop:System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') at System.Collections.Generic.List`1.get_Item(Int32 index) at Microsoft.PowerShell.EditorServices.Utility.PSCommandExtensions.MergePipelineResults(PSCommand psCommand) in C:\Users\JGrote\Projects\PowerShellEditorServices\src\PowerShellEditorServices\Utility\PSCommandExtensions.cs:line 59 at Microsoft.PowerShell.EditorServices.Utility.PSCommandExtensions.AddOutputCommand(PSCommand psCommand) in C:\Users\JGrote\Projects\PowerShellEditorServices\src\PowerShellEditorServices\Utility\PSCommandExtensions.cs:line 45 at Microsoft.PowerShell.EditorServices.Services.PowerShell.Execution.SynchronousPowerShellTask`1.ExecuteNormally(CancellationToken cancellationToken) in C:\Users\JGrote\Projects\PowerShellEditorServices\src\PowerShellEditorServices\Services\PowerShell\Execution\SynchronousPowerShellTask.cs:line 106 at Microsoft.PowerShell.EditorServices.Services.PowerShell.Execution.SynchronousPowerShellTask`1.Run(CancellationToken cancellationToken) in C:\Users\JGrote\Projects\PowerShellEditorServices\src\PowerShellEditorServices\Services\PowerShell\Execution\SynchronousPowerShellTask.cs:line 55 at Microsoft.PowerShell.EditorServices.Services.PowerShell.Execution.SynchronousTask`1.ExecuteSynchronously(CancellationToken executorCancellationToken) in C:\Users\JGrote\Projects\PowerShellEditorServices\src\PowerShellEditorServices\Services\PowerShell\Execution\SynchronousTask.cs:line 92--- End of stack trace from previous location --- at Microsoft.PowerShell.EditorServices.Services.PowerShell.Execution.SynchronousTask`1.get_Result() in C:\Users\JGrote\Projects\PowerShellEditorServices\src\PowerShellEditorServices\Services\PowerShell\Execution\SynchronousTask.cs:line 60 at Microsoft.PowerShell.EditorServices.Services.PowerShell.Execution.SynchronousTask`1.ExecuteAndGetResult(CancellationToken cancellationToken) in C:\Users\JGrote\Projects\PowerShellEditorServices\src\PowerShellEditorServices\Services\PowerShell\Execution\SynchronousTask.cs:line 109 at Microsoft.PowerShell.EditorServices.Services.PowerShell.Host.PsesInternalHost.InvokePSCommand[TResult](PSCommand psCommand, PowerShellExecutionOptions executionOptions, CancellationToken cancellationToken) in C:\Users\JGrote\Projects\PowerShellEditorServices\src\PowerShellEditorServices\Services\PowerShell\Host\PsesInternalHost.cs:line 364 at Microsoft.PowerShell.EditorServices.Services.PowerShell.Host.PsesInternalHost.InvokePSCommand(PSCommand psCommand, PowerShellExecutionOptions executionOptions, CancellationToken cancellationToken) in C:\Users\JGrote\Projects\PowerShellEditorServices\src\PowerShellEditorServices\Services\PowerShell\Host\PsesInternalHost.cs:line 368 at Microsoft.PowerShell.EditorServices.Services.PowerShell.Host.PsesInternalHost.InvokeInput(String input, CancellationToken cancellationToken) in C:\Users\JGrote\Projects\PowerShellEditorServices\src\PowerShellEditorServices\Services\PowerShell\Host\PsesInternalHost.cs:line 681 at Microsoft.PowerShell.EditorServices.Services.PowerShell.Host.PsesInternalHost.DoOneRepl(CancellationToken cancellationToken) in C:\Users\JGrote\Projects\PowerShellEditorServices\src\PowerShellEditorServices\Services\PowerShell\Host\PsesInternalHost.cs:line 643

Details

Extension version: 2021.11.0
VS Code version: Code - Insiders 1.63.0-insider (a7104f13ff61bcd9f4c827d8fe3c0d27bb479fd8, 2021-11-08T05:14:49.440Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No

System Info
Item Value
CPUs AMD Ryzen 7 4700U with Radeon Graphics (8 x 1996)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.36GB (3.63GB free)
Process Argv --file-uri file:///c%3A/Users/JGrote/Projects/vscode-powershell/extension-dev.code-workspace --crash-reporter-id 4453efaa-0821-4555-88e2-3de8bad9109e
Screen Reader no
VM 0%
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805:30301674
pythonvspyt200:30323110
vsccppwt:30382699
bridge0708:30335490
pygetstartedt2:30353727
bridge0723:30353136
pythonrunftest32:30365365
pythonf5test824:30361779
javagetstartedt:30350119
pythonvspyt187:30365360
pydsgst2:30361790
vsaa593:30376534
vsc1dsc:30394499

@ghost ghost added the Needs: Triage Maintainer attention needed! label Nov 9, 2021
@andyleejordan andyleejordan added Bug: Pre-release Bugs reproducing only in the pre-release extension. Issue-Bug A bug to squash. and removed Needs: Triage Maintainer attention needed! labels Nov 9, 2021
@andyleejordan andyleejordan changed the title [Preview] Terminating Exceptions not handled correctly, throw REPL ArgumentOutOfRangeException Terminating Exceptions not handled correctly, throw REPL ArgumentOutOfRangeException Nov 9, 2021
@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Nov 15, 2021
@JustinGrote
Copy link
Collaborator Author

Fixed the null exception and now have a weird one here:s
image

Keep getting a type initialization exception on the extension method AsPSObject
image

@SeeminglyScience
Copy link
Collaborator

Drill into InnerException there for the real exception. That one is just a wrapper

@ili101
Copy link

ili101 commented Nov 18, 2021

Make this Committed-vNext?

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Nov 18, 2021
@JustinGrote
Copy link
Collaborator Author

Make this Committed-vNext?

The PR is complete, I imagine @andschwa will review in the next week or two

@StevenBucher98
Copy link
Contributor

@JustinGrote was there a reason your PR was closed around this issue?

@StevenBucher98 StevenBucher98 removed the Needs: Maintainer Attention Maintainer attention needed! label Nov 30, 2021
@JustinGrote JustinGrote self-assigned this Nov 30, 2021
@JustinGrote
Copy link
Collaborator Author

@JustinGrote was there a reason your PR was closed around this issue?

Mistake. Reopened :)

@andyleejordan
Copy link
Member

Thanks for identifying and providing the fix for this @JustinGrote!

@andyleejordan andyleejordan moved this to Todo in Sea Biscuit Jan 24, 2022
@andyleejordan andyleejordan moved this from Todo to Done in Sea Biscuit Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Pre-release Bugs reproducing only in the pre-release extension. Issue-Bug A bug to squash.
Projects
No open projects
Status: Done
5 participants