microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.96k stars 29.18k forks source link

Terminating a Task with a Pseudoterminal while the terminal is hidden breaks the task permanently #100648

Closed csk-ableton closed 4 years ago

csk-ableton commented 4 years ago

Steps to Reproduce:

  1. Download the minimal example cancel-bug.zip - It's creating a task with a Pseudoterminal and a notification for showing the tasks progress. The Cancel button of the notification will terminate the task.
  2. Run the extension
  3. Create a tasks.json:
    {
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Custom Exec",
            "type": "customexec",
            "presentation": {
                "reveal": "silent"
            }
        },
    ]
    }

    The important part is "reveal": "silent" so the terminal will not be shown while the task is running.

  4. Run the task
  5. Press the Cancel button on the task notification
  6. Run the task again

Expected: The task runs again Actual: Nothing happens. The terminal is stuck with the message: > Executing task: Custom Exec <. vscode needs to be restarted to be able to start the task again.

The bug doesn't occur if the terminal is shown.

Does this issue occur when all extensions are disabled?: Yes

alexr00 commented 4 years ago

@csk-ableton can you try this again with the latest insiders? I am not able to reproduce the issue with your sample (thank you for providing a simple sample!)

csk-ableton commented 4 years ago

@alexr00 Thanks for looking into this. I was able to reproduce with 1.46.1 but NOT with 1.47.0-insider. Maybe I made a mistake testing the insider version. Sorry about that. Glad this is fixed :)