Windows Terminal becomes unusable after running gradle in WSL #17234

Closed
opened 2026-01-31 05:36:11 +00:00 by claunia · 5 comments
Owner

Originally created by @mjsztainbok on GitHub (Apr 13, 2022).

Windows Terminal version

1.11.3471.0

Windows build number

10.0.19043.0

Other Software

gradle 7.4

Steps to reproduce

Do a gradle build which produces errors

Expected Behavior

The terminal window operates correctly and can accept keyboard input

Actual Behavior

Sometimes after the gradle build the tab stops responding and it doesn't respond to keypresses. You can still scroll the tab though.
It also shows still shows the cursor on focus. Pressing Ctrl-L to reset the UI in the shell doesn't do anything.

This is how the window looks:
image

Originally created by @mjsztainbok on GitHub (Apr 13, 2022). ### Windows Terminal version 1.11.3471.0 ### Windows build number 10.0.19043.0 ### Other Software gradle 7.4 ### Steps to reproduce Do a gradle build which produces errors ### Expected Behavior The terminal window operates correctly and can accept keyboard input ### Actual Behavior Sometimes after the gradle build the tab stops responding and it doesn't respond to keypresses. You can still scroll the tab though. It also shows still shows the cursor on focus. Pressing Ctrl-L to reset the UI in the shell doesn't do anything. This is how the window looks: ![image](https://user-images.githubusercontent.com/67809434/163069656-dbb9e34c-db3f-48fe-8750-53e4ac8b65b9.png)
Author
Owner

@zadjii-msft commented on GitHub (Apr 13, 2022):

Hmm. That's sure weird. I honestly don't know what would cause that... Like, I don't think there's anything that gradle can emit to prevent the Terminal from sending more input. I suppose it's possible that gradle left the tty in a bad state, where input is no longer echoed. That's maybe something. You might be able to still enter reset or stty sane in this state, and hopefully the shell still receives those?

How are you running gradle? As gradel.exe? Via WSL? Or via msys2/cygwin/etc?

@zadjii-msft commented on GitHub (Apr 13, 2022): Hmm. That's sure weird. I honestly don't know what would cause that... Like, I don't think there's anything that gradle can emit to prevent the Terminal from sending more input. I suppose it's possible that gradle left the tty in a bad state, where input is no longer echoed. That's maybe something. You might be able to still enter `reset` or `stty sane` in this state, and hopefully the shell still receives those? How are you running gradle? As gradel.exe? Via WSL? Or via msys2/cygwin/etc?
Author
Owner

@mjsztainbok commented on GitHub (Apr 13, 2022):

I'm running the Linux version of gradle in Ubuntu on WSL:

------------------------------------------------------------
Gradle 7.4
------------------------------------------------------------

Build time:   2022-02-08 09:58:38 UTC
Revision:     f0d9291c04b90b59445041eaa75b2ee744162586

Kotlin:       1.5.31
Groovy:       3.0.9
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          11.0.14.1 (Ubuntu 11.0.14.1+1-Ubuntu-0ubuntu1.20.04)
OS:           Linux 5.10.60.1-microsoft-standard-WSL2 amd64

The shell doesn't get any inputs when it's like this so no commands work. It's not a case of it not echoing the input. It's not receiving the input at all.

@mjsztainbok commented on GitHub (Apr 13, 2022): I'm running the Linux version of gradle in Ubuntu on WSL: ``` ------------------------------------------------------------ Gradle 7.4 ------------------------------------------------------------ Build time: 2022-02-08 09:58:38 UTC Revision: f0d9291c04b90b59445041eaa75b2ee744162586 Kotlin: 1.5.31 Groovy: 3.0.9 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 11.0.14.1 (Ubuntu 11.0.14.1+1-Ubuntu-0ubuntu1.20.04) OS: Linux 5.10.60.1-microsoft-standard-WSL2 amd64 ``` The shell doesn't get any inputs when it's like this so no commands work. It's not a case of it not echoing the input. It's not receiving the input at all.
Author
Owner

@mjsztainbok commented on GitHub (Jun 10, 2022):

Actually it's not just gradle where this happens. It seems to occur after any failing commands in the shell in WSL

@mjsztainbok commented on GitHub (Jun 10, 2022): Actually it's not just gradle where this happens. It seems to occur after any failing commands in the shell in WSL
Author
Owner

@zadjii-msft commented on GitHub (Aug 15, 2022):

Honestly, I have no idea what's going on here. Does this repro in a vintage console window, as well as in a Terminal window? Do you have a minimal repro of a command that causes this (smaller than just "sometimes after a gradle build"/? Does the content of the tab "reflow" if you resize the terminal window to be a smaller width? (that might help ID if the Terminal control itself is hung, or it's something else behind the scenes that's hung.

@zadjii-msft commented on GitHub (Aug 15, 2022): Honestly, I have no idea what's going on here. Does this repro in a vintage console window, as well as in a Terminal window? Do you have a minimal repro of a command that causes this (smaller than just "sometimes after a gradle build"/? Does the content of the tab "reflow" if you resize the terminal window to be a smaller width? (that might help ID if the Terminal control itself is hung, or it's something else behind the scenes that's hung.
Author
Owner

@ghost commented on GitHub (Aug 19, 2022):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Aug 19, 2022): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17234