Skip to content

Extension terminal can accidentally be spawned twice #4160

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
6 tasks done
andyleejordan opened this issue Aug 31, 2022 · 0 comments · Fixed by #4161
Closed
6 tasks done

Extension terminal can accidentally be spawned twice #4160

andyleejordan opened this issue Aug 31, 2022 · 0 comments · Fixed by #4161
Assignees
Labels

Comments

@andyleejordan
Copy link
Member

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

As reported on the Discord by @PrzemyslawKlys, it is possible to spawn the extension terminal twice on accident. If the extension is in the process of starting, and another event initiates a start, two terminals will be spawned. The start() function of the session manager is not re-entrant, but as there are multiple events that may enter it, it needs a simple lock that waits for the original call to finish if it's called while already starting.

PowerShell Version

N/A

Visual Studio Code Version

N/A

Extension Version

v2022.8.5

Steps to Reproduce

While extension is still starting, do something like run a PowerShell debug config which also starts the extension.

Visuals

No response

Logs

No response

@andyleejordan andyleejordan self-assigned this Aug 31, 2022
@ghost ghost added the Needs: Triage Maintainer attention needed! label Aug 31, 2022
@andyleejordan andyleejordan removed the Needs: Triage Maintainer attention needed! label Aug 31, 2022
@andyleejordan andyleejordan moved this to In Progress in American Pharoah Aug 31, 2022
Repository owner moved this from In Progress to Done in American Pharoah Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant