PSReadLine: Linux/Mac/VT: PSReadline in PowerShell 7 rc3 goes ballistic if you do not respond to its request for cursor position

Environment

PS version: 7.0.0-rc.3
PSReadline version: 2.0.0
os: Linux antares 5.4.0-4-amd64 #1 SMP Debian 5.4.19-1 (2020-02-13) x86_64 GNU/Linux
PS file version: 7.0.0.0
HostName: ConsoleHost
BufferWidth: 120
BufferHeight: 50

Also happens in Azure Cloud; this is likely in the Unix compat layer.

Steps to reproduce

Use a terminal emulator that does not respond to CSI 6 n (DSR Device Status Report 6, Cursor Position). Launch powershell. Wait.

Expected behavior

It doesn’t explode.

Actual behavior

It dumps random memory to the output stream, then just exits.

image

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 2
  • Comments: 18 (12 by maintainers)

Most upvoted comments

So I fixed my issue by reading from stdin for user input instead of using the Console APIs.

I would expect it to not dump memory to the screen and then crash without a message, in any case!

Very reasonable 😄