Skip to content

Preview 2019.11.0/1 Read-Host paste dropping letters. #2291

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
ili101 opened this issue Nov 6, 2019 · 9 comments · Fixed by PowerShell/PowerShellEditorServices#1207
Closed
Labels

Comments

@ili101
Copy link

ili101 commented Nov 6, 2019

Issue Type: Bug

Same as in #1753 but only when pasting and sometime it misses random letters and not just the first one.

  1. Copy something.
  2. Run a file with Read-Host with F5.
  3. Paste in console.
    Paste

Extension version: 2019.11.1
VS Code version: Code 1.39.2 (6ab598523be7a800d7f3eb4d92d7ab9a66069390, 2019-10-15T15:35:18.241Z)
OS version: Windows_NT x64 10.0.18362

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (8 x 3392)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.93GB (6.52GB free)
Process Argv
Screen Reader no
VM 67%
@ghost ghost added the Needs: Triage Maintainer attention needed! label Nov 6, 2019
@SydneyhSmith
Copy link
Collaborator

@ili101 thanks for opening this issue! We are able to reproduce this and are investigating what may be causing this.

@SydneyhSmith SydneyhSmith added Area-PSReadLine Issue-Bug A bug to squash. Area-Debugging and removed Needs: Triage Maintainer attention needed! labels Nov 12, 2019
@SydneyhSmith
Copy link
Collaborator

@ili101 we have published a fix for this, please let us know if you are still hitting this issue--thanks!

@SydneyhSmith SydneyhSmith added the Resolution-Fixed Will close automatically. label Jan 30, 2020
@ili101
Copy link
Author

ili101 commented Feb 23, 2020

Still a problem on 2020.2.0 Preview

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Feb 23, 2020
@TylerLeonhardt
Copy link
Member

This doesn't repro on non-Windows. I'll have to try when I get into the office tomorrow.

@SeeminglyScience any thoughts?

@SeeminglyScience
Copy link
Collaborator

Maybe race condition here?

https://github.com/PowerShell/PowerShellEditorServices/blob/4c12d38a3f08d92c90846fa1dbb8a71495c4ad48/src/PowerShellEditorServices/Services/PowerShellContext/Console/WindowsConsoleOperations.cs#L35-L54

Maybe because the handle is released before the field is nulled?

Shot in the dark, if that doesn't pan out let me know and I'll take a closer look.

@TylerLeonhardt
Copy link
Member

TylerLeonhardt commented Feb 25, 2020

This only seems to affect the first call to Read-Host and only when running with debugging (F5) for the first time in a session.

@SeeminglyScience
Copy link
Collaborator

Oh you know what, I bet the PSRL ReadKey thread isn't getting cancelled.

@TylerLeonhardt
Copy link
Member

But wouldn't subsequent F5's have the same issue then?

@TylerLeonhardt
Copy link
Member

Ok I've got a PR out for this!

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

Successfully merging a pull request may close this issue.

4 participants