-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
ColorPicker and PT Run take 10 seconds to exit #5860
Comments
@enricogior The issue here seems to be because pt run isn't able to cleanly terminate itself. This codepath was added in #4472 because we were earlier using |
@enricogior I will be looking into running the PowerLauncher.exe process as admin (for #4427) and launching apps from within that non-elevated (unless the RunAsAdmin context menu button is pressed). Would this delay to exit still be problematic for Restart as admin if we make that change? |
@somil55 @arjunbalgovind |
@enricogior can you point me to the code where we terminate and relaunch PowerLauncher.exe when Restart as admin is pressed? If it is the same logic within the |
@arjunbalgovind Also the event should not be sent to all PT Run windows PowerToys/src/modules/launcher/Microsoft.Launcher/dllmain.cpp Lines 222 to 223 in b8b6dbe
but only to the main one and then return false. And we need to verify if that code does actually work for applications that don't have a visible window. |
Launcher is always terminated for me when its window is hidden. I suggest we use named event for that instead of relying on Another thing, we already react to the process powertoys.exe exit, and rely solely on that technique for ColorPicker/FZE/.../, so I wonder if we should remove the |
We should also make sure the approach we go for is non-blocking in runner to avoid the issue described in #6676. (Runner was getting blocked on the |
@arjunbalgovind |
@enricogior / @arjunbalgovind / @ivan100sic / @yuyoyuppe are we viewing this work item as done? |
can't repro on a recent master |
@crutkas |
@ivan100sic thoughts? |
It definitely has to do with C# code of PT Run, not the PowerToy interface or dllmain. When we have better understanding of PT Run itself, I guess then we'll be able to do a clean exit. |
so based on @yuyoyuppe the current workarounds in place help and can't be repo'ed against master. I think this can be migrated to a 0.29 December task then |
@crutkas |
@enricogior Launcher has logic for saving some caches (for example Image cache) when the process disposes PowerToys/src/modules/launcher/PowerLauncher/App.xaml.cs Lines 187 to 192 in f97ed9c
PowerToys/src/modules/launcher/PowerLauncher/App.xaml.cs Lines 62 to 73 in f97ed9c
@somil55 and @alekhyareddy28 can add more context on this. |
In the 0.25 release. https://github.com/microsoft/PowerToys/releases/tag/v0.25.0 |
ℹ Computer information
📝 Provide detailed reproduction steps (if any)
✔️ Expected result
ColorPIcker.exe
andPowerLauncher.exe
should quit immediately❌ Actual result
It takes 10 seconds for ColorPIcker.exe or PowerLauncher.exe to quit
Note: the
terminateProcess()
function:PowerToys/src/modules/colorPicker/ColorPicker/dllmain.cpp
Lines 157 to 166 in b8b6dbe
always ends up killing the process:
PowerToys/src/modules/colorPicker/ColorPicker/dllmain.cpp
Line 164 in b8b6dbe
The text was updated successfully, but these errors were encountered: