Skip to content

PSReadLine crashes on latest build of PowerShell #2482

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

Closed
kborowinski opened this issue May 21, 2021 · 5 comments
Closed

PSReadLine crashes on latest build of PowerShell #2482

kborowinski opened this issue May 21, 2021 · 5 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@kborowinski
Copy link

kborowinski commented May 21, 2021

Environment

PSReadLine: 2.2.0-beta2
PowerShell: 7.2.0-preview.5
OS: Microsoft Windows 10.0.19043
BufferWidth: 237
BufferHeight: 9001

Exception report

System.TypeLoadException: Could not load type 'System.Management.Automation.Subsystem.PredictionResult' from assembly 'Microsoft.PowerShell.PSReadLine.Polyfiller, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
   at Microsoft.PowerShell.PSConsoleReadLine.PredictionViewBase.Reset()
   at Microsoft.PowerShell.PSConsoleReadLine.PredictionInlineView.Reset()
   at Microsoft.PowerShell.PSConsoleReadLine.Prediction.Reset()
   at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)

Steps to reproduce

psreadline

Probable cause

Are recent changes to prediction interface causing this?

Workaround

Rollback PSReadLine module to version 2.1.0 or rollback PowerShell to version 7.2.0-preview.5-46-ge927e94aedb6c425ec98174ac28a1de9feecd72a

@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label May 21, 2021
@iSazonov
Copy link

Are recent changes to prediction interface causing this?

I think yes. The interface was updated but PSRL is still not. (I guess you could disable the feature in config.)

@kborowinski
Copy link
Author

kborowinski commented May 22, 2021

@iSazonov I did disable the prediction with Set-PSReadLineOption -PredictionSource None but it does not help. I'll rollback the PowerShell to version 7.2.0-preview.5-46-ge927e94aedb6c425ec98174ac28a1de9feecd72a and wait for the PSReadLine update.

@gwojan
Copy link

gwojan commented May 24, 2021

I ran into the same issue with the latest daily build.

### Environment
PSReadLine: 2.2.0-beta2
PowerShell: 7.2.0-daily20210521.1
OS: Microsoft Windows 10.0.19042
BufferWidth: 160
BufferHeight: 42

@daxian-dbw
Copy link
Member

daxian-dbw commented May 28, 2021

Thanks for reporting and using the preview version of PowerShell!
This is a duplicate of #2495. The powershell-7.2.0-preview.6 contains a release note for this:

PSReadLine 2.2.0-beta1 and 2.2.0-beta2 do not work with this preview of PowerShell due to breaking changes in the prediction interface. The upcoming PSReadLine 2.2.0-beta3 release will resolve this. Use PSReadLine 2.1.0 as the temporary workaround.

@ghost ghost removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label May 28, 2021
@daxian-dbw daxian-dbw added the Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. label May 28, 2021
@gwojan
Copy link

gwojan commented Jun 1, 2021

@daxian-dbw I just grabbed the latest build of PSReadLine from AppVeyor and so far so good! ☺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

4 participants