Text invisible after concurrent ffmpeg invocations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gnome-terminal (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Repro steps:
Run the attached script in gnome-terminal. (Requires Python and ffmpeg.) After the script finishes, try typing in the same terminal. No text will appear. (The repro is not 100% reliable, so you may have to try the script multiple times.)
The script spawns a couple of concurrent ffmpeg processes. Their stdin must be connected to the terminal for the bug to repro. I've tried other programs in place of ffmpeg which also use stdin, but haven't found any other repro.
Observed behavior:
Typed text doesn't appear after running the script. However, the terminal still seems to receive commands. Ctrl+C still works, but doesn't fix the problem. I have to restart gnome-terminal to fix it.
Expected behavior:
Text input should work normally after the script exits.
Versions:
Ubuntu 14.04.1 LTS
gnome-terminal 3.26.0
Python 3.5.3
ffmpeg 3.4.1-1
x86_64
I also repro'd in gnome-terminal under Arch Linux. (But the Gnome bug tracker said to file with Ubuntu first, so here we are.) I wasn't able to repro when using xterm in place of gnome-terminal.
Also reproducible in xterm and various other terminal emulators, at least sometimes (not always). So not a gnome-terminal issue.
This is a pretty common phenomenon if a utility doesn't properly restore the terminal (stty?) settings. Blindly typing and executing "reset" should fix it. Not sure what exactly is going on, and if there's anything bash could do to clean up, zsh doesn't seem to suffer from this problem.