Skip to content
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

VS Code blocks Windows from shutting down when there is an update or confirm dialog #150013

Open
strich opened this issue May 20, 2022 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug install-update VS Code installation and upgrade system issues windows VS Code on Windows issues
Milestone

Comments

@strich
Copy link

strich commented May 20, 2022

Issue Type: Bug

I have been using VS Code for a long time now and love it in most respects. However one of the most frustrating "bugs" is has is its post-exit update process and confirm dialogs - It blocks Windows from shutting down!

Repro: Open an out of date VS Code and ensure an update is ready to install after you close it. Tell Windows to shut down WITHOUT closing VS Code. Windows will sit there and eventually time out the shutdown request leaving you PC on unattended.
The same thing will occur if there is a confirm dialog that blocks VS Code from shutting down.

What I expect: VS Code should respect the users' decision to shut down and force quit itself.

VS Code version: Code 1.67.2 (c3511e6, 2022-05-17T18:15:52.058Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No

System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i9-12900K (24 x 3187)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: unavailable_off
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 63.79GB (34.48GB free)
Process Argv --crash-reporter-id 663667d1-fedf-464d-99ad-7c648ef14bbc
Screen Reader no
VM 0%
Extensions: none
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30492333
vsclangdf:30486550
90j3a820:30492286

@alexr00 alexr00 assigned deepak1556 and unassigned alexr00 May 30, 2022
@deepak1556 deepak1556 added bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues electron Issues and items related to Electron confirmation-pending labels Dec 7, 2022
@deepak1556
Copy link
Contributor

Unable to repro with latest stable 1.74

@deepak1556 deepak1556 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 9, 2022
@strich
Copy link
Author

strich commented Dec 9, 2022

This happened literally last night to me. I performed a shutdown with VSCode still running and it blocked the shutdown with an update process until the shutdown automatically aborted.

Version appears to be 1.73.1 as of today (Unsure if the version failed update last night of this was the latest as of yesterday). I've forced an update again and it is now 1.74.

@deepak1556
Copy link
Contributor

/cc @joaomoreno if you are aware of the inno updater blocking shutdown ? I am unable to repro the scenarios described in this issue.

@deepak1556 deepak1556 reopened this Dec 9, 2022
@deepak1556 deepak1556 added info-needed Issue requires more information from poster and removed bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues electron Issues and items related to Electron labels Dec 9, 2022
@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug install-update VS Code installation and upgrade system issues windows VS Code on Windows issues and removed info-needed Issue requires more information from poster labels Dec 14, 2022
@joaomoreno joaomoreno added this to the Backlog milestone Dec 14, 2022
@joaomoreno
Copy link
Member

Very likely Inno Setup prevents shutting down while a Setup operation is in progress.

@DC4JG
Copy link

DC4JG commented Jul 7, 2023

As of today and update to v1.80.0 it is still blocking Windows from shutdown.
I always shutdown my Windows via win+x u u and this issue is happening on every single VSCode update for months.

@rgary87
Copy link

rgary87 commented Aug 2, 2023

Same thing here on VSC 1.80.0 and windows 11.

@artyfarty
Copy link

It happens to me for years.

@alyonstraffio
Copy link

I also experience this, windows + wsl.

My theory is that the WSL instance is terminate by windows as part of the shutdown, but the vscode instance either started the install or is waiting on something from the WSL instance. If the shutdown is interrupted the vscode window is usually responsive to UI input but stuck waiting for a response from WSL. In this state it never seems to be able to restart WSL like it normally would on starting vscode from a fresh start.

Currently there isn't any indication that an update is coming through, I find out later when my laptop didn't shutdown properly. It also can mean the user account remains logged in because shutdown is aborted and power is being drawn which is not good for security or battery charge.

Possible solution, disable vscode on close auto update when using WSL and instead give an alert making the user do it manually. Alternatively detect if an update has failed due to WSL shutdown and abort the on close auto update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug install-update VS Code installation and upgrade system issues windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests

9 participants