vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Existing instance with save prompt closes when opening another workspace.

Open wtjones opened this issue 9 months ago • 4 comments

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

  • VS Code Version: 1.98.0
  • OS Version: Windows 11 23H2

Steps to Reproduce:

  1. Open a workspace via code --disable-extensions {folder}

  2. Make some unsaved changes, then try to close the file.

    • Prompt opens: Do you want to save the changes you made to …
  3. Open another workspace via code --disable-extensions {folder}

    • First instance is closed out.
    • Prompt opens: Another instance of code is running but not responding.
    • When closing the prompt, processes remain but without UI. Force kill is required.

wtjones avatar Mar 05 '25 19:03 wtjones

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.98.0. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.98.0. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

I retested on VS Code Version: 1.98.0 with the same result.

wtjones avatar Mar 05 '25 19:03 wtjones

I cannot reproduce:

Image

bpasero avatar Mar 07 '25 12:03 bpasero

I tried with vanilla cmd like you are doing and I can still repro.

I also discovered that I don't need to open the 2nd workspace. If I wait about a minute or so on the save prompt, the UI disappears and leaves the processes running.

Update: Sometimes I don't need to open the 2nd instance. This isn't always the case.

Image

I don't see anything in event viewer, however I found an error in the exthost.log at around the same time. (Attached)

exthost.log

Update: This was a red herring. I disabled the built-in extensions as well and no longer get the error, but with the same behavior:

code --disable-extensions --disable-extension vscode.git --disable-extension vscode.github --disable-extension  vscode.github-authentication --disable-extension  vscode.microsoft-authentication {my folder}
2025-03-07 08:29:57.249 [info] Extension host with pid 27028 started
2025-03-07 08:29:57.249 [info] Skipping acquiring lock for c:\Users\my_user\AppData\Roaming\Code\User\workspaceStorage\0ff875fb9aafeb7f893388f2fbd3774a.
2025-03-07 08:29:57.266 [info] ExtensionService#_doActivateExtension vscode.github-authentication, startup: false, activationEvent: 'onAuthenticationRequest:github'
2025-03-07 08:29:57.306 [info] ExtensionService#_doActivateExtension vscode.microsoft-authentication, startup: false, activationEvent: 'onAuthenticationRequest:microsoft'
2025-03-07 08:29:58.280 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '*', root cause: vscode.git
2025-03-07 08:29:58.289 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*'
2025-03-07 08:29:58.366 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2025-03-07 08:29:58.814 [info] Eager extensions activated
2025-03-07 08:29:58.890 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2025-03-07 08:29:58.897 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
2025-03-07 08:30:11.230 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage'
2025-03-07 08:30:30.829 [info] Extension host terminating: renderer closed the MessagePort
2025-03-07 08:30:30.860 [info] Extension host with pid 27028 exiting with code 0

wtjones avatar Mar 07 '25 14:03 wtjones

@wtjones to clarify: when you see the dialog to save or dont save and let that running for 1 minute, the process crashes?

bpasero avatar Mar 08 '25 06:03 bpasero

Not crash, but the UX disappears and the processes remain. If I try to open code again it will say that instances are open. So far I can't repo on Linux. I'll try to repro on another windows box.

wtjones avatar Mar 09 '25 22:03 wtjones

I think this is probably not something that will result in a fix/change from us but a configuration issue on your system.

bpasero avatar Mar 10 '25 05:03 bpasero

I was able reproduce, but only in the same environment. I suspect it could be related to security software, but I'm unable to find log events backing that up.

Closing this for now, thanks.

wtjones avatar Mar 14 '25 17:03 wtjones