I am experiencing a problem with...

Crashes pretty often on code that normally works fine on PowerShell 5.1
Follow the instructions in the README about
capturing and sending logs.
1599205059-7015219d-fc87-4e0d-be85-0b4fdefd29921599158419835.zip
| Name | Version |
| --- | --- |
| Operating System | Windows_NT x64 10.0.19042 |
| VSCode | 1.48.2|
| PowerShell Extension Version | 2020.7.0 |
|Name|Value|
|---|---|
|PSVersion|7.1.0-preview.6|
|PSEdition|Core|
|GitCommitId|7.1.0-preview.6|
|OS|Microsoft Windows 10.0.19042|
|Platform|Win32NT|
|PSCompatibleVersions|1.0 2.0 3.0 4.0 5.0 5.1.10032.0 6.0.0 6.1.0 6.2.0 7.0.0 7.1.0-preview.6|
|PSRemotingProtocolVersion|2.3|
|SerializationVersion|1.1.0.1|
|WSManStackVersion|3.0|
Visual Studio Code Extensions(Click to Expand)
|Extension|Author|Version|
|---|---|---|
|better-toml|bungcip|0.3.2|
|bracket-pair-colorizer-2|CoenraadS|0.2.0|
|errorlens|usernamehw|3.2.1|
|format-selection-as-html|adrianwilczynski|2.3.0|
|github-linker|gimenete|0.2.3|
|gitlens|eamodio|10.2.2|
|line-endings|steditor|1.0.3|
|markdown-all-in-one|yzhang|3.3.0|
|material-icon-theme|PKief|4.2.0|
|open-in-browser|techer|2.0.0|
|powershell-preview|ms-vscode|2020.7.0|
|project-manager|alefragnani|11.2.0|
|run-in-powershell|tobysmith568|1.1.0|
|vscode-markdownlint|DavidAnson|0.36.3|
|vscode-toggle-quotes|BriteSnow|0.3.3|
|vscode-wakatime|WakaTime|4.0.7|
|vscode-yaml|redhat|0.10.1|
|xml|DotJoshJohnson|2.5.1|
Thanks @PrzemyslawKlys we are working on a preview release right now and then will give this another look, once we have those fixes out
Thanks for your patience, the new preview release is out and we think it solves this issue--when you have a chance would you mind giving it a try and letting us know? Thanks!
Ah now we have a stack trace!
But it's not an encouraging stack trace. Indicates a race occurring probably due to a bad registration somewhere...
Likely not related but looks like this stack trace is occurring repeatedly:
System.ArgumentNullException: Pipeline response (OmniSharp.Extensions.LanguageServer.Protocol.Models.Hover) must not be null (Parameter 'request')
at OmniSharp.Extensions.JsonRpc.Pipelines.ResponseMustNotBeNullProcessor`2.Process(T request, R response, CancellationToken cancellationToken)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)
at OmniSharp.Extensions.JsonRpc.InputHandler.<>c__DisplayClass38_0.<<RouteRequest>b__5>d.MoveNext()
cc: @david-driscoll vscode might have changed the hover request FYI
1600964135-61374922-774f-4bfd-8572-71f93b778d7d1600964134180.zip
Another log. Keep in mind that this crash is not ever X days, but we're talking every X minutes if at all. I'm unable to use PowerShell 7.1 at all in code.
This is actually fixed in the latest version of the library, it was a bug I introduced (I got a little happy 馃槩 )
Thats great. Thank you. Just wanted to make sure it's fixed before next stable release.
@david-driscoll thanks, just curious what was the issue and how did you manage to fix it?
oh I had added a IPipelineBehavior<,> that was checking for null returns... because I clearly forgot null returns were valid. It made sense at the time, but I wasn't paying attention to spec at that point.
Needless to say I was wrong and removed it.
PR where I removed them: https://github.com/OmniSharp/csharp-language-server-protocol/commit/0b9e85dc111a75578bd00103bc3c87852543d76b
When #3294 is finished, this should be resolved as the preview will contain OmniSharp v0.19 with this fix.
@PrzemyslawKlys can you verify that this no longer repros with the latest preview release?
I've not seen this issuee since very long time now. Even before you "fixed it" on Apr14
Most helpful comment
oh I had added a
IPipelineBehavior<,>that was checking for null returns... because I clearly forgot null returns were valid. It made sense at the time, but I wasn't paying attention to spec at that point.Needless to say I was wrong and removed it.
PR where I removed them: https://github.com/OmniSharp/csharp-language-server-protocol/commit/0b9e85dc111a75578bd00103bc3c87852543d76b