Flow-Launcher / Flow-Launcher/Flow.Launcher
BUG: Flow Launcher not gracefully shutting down when invoking taskkill
- Dominant language
- C#
- Stars
- 15.6k
- Forks
- 644
- Avg merge
- 16h 51m
- Merged PRs (30d)
- 3
Description
### Checks
- [X] I have checked that this issue has not already been reported.
- [X] I am using the latest version of Flow Launcher.
### Problem Description
During developement of my plugin, I noticed that flow launcher is not shutting down gracefully when using "taskkill /IM Flow.Launcher.exe" to stop the app. Causing me to use the /F (Force) flag. I don't think this is intended so reporting this here.
This is especially useful to deploy .NET plugin builds automatically by creating a run config that does:
1. Kill FlowLauncher
2. Deploy new .dll to plugin folder
3. Start FlowLauncher again
Interesting is that when I Invoke the taskkill command, the shortcut to open FlowLauncher doesn't work anymore.
### To Reproduce
1. Start FlowLauncher
2. Invoke "taskkill /IM Flow.Launcher.exe"
3. Program is still running, but shortcut for search doesn't work anymore
PowerShell Commands:
```
Start-Process C:\Users\[user]\AppData\Local\FlowLauncher\Flow.Launcher.exe
taskkill /im Flow.Launcher.exe
tasklist /FI "IMAGENAME eq Flow*"
```
See Screenshot. I waited few seconds between the commands of course.
### Screenshots

### Flow Launcher Version
1.17.2
### Windows Build Number
10.0.22631.3155
### Error Log
I did a fresh log clear before copying the log. But it does not seem to log the taskkill event in the log.
```shell
15:59:17.1556+01:00 - INFO - App.OnStartup - Begin Flow Launcher startup ----------------------------------------------------
15:59:17.1556+01:00 - INFO - App.OnStartup - Runtime info:
Flow Launcher version: 1.17.2
OS Version: 22631.3155
IntPtr Length: 8
x64: True
15:59:17.3208+01:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <1ms>
15:59:17.3208+01:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <1ms>
15:59:17.3208+01:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <1ms>
15:59:17.3208+01:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <1ms>
15:59:17.3304+01:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <19ms>
15:59:17.3304+01:00 - INFO - CommunityPluginSource.FetchAsync - Loading plugins from https://fastly.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json
15:59:17.3304+01:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <20ms>
15:59:17.3304+01:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <21ms>
15:59:17.3439+01:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <26ms>
15:59:17.3439+01:00 - INFO - Flow.Launcher.Plugin.Program.Main - Preload programs cost <6ms>
15:59:17.3439+01:00 - INFO - Flow.Launcher.Plugin.Program.Main - Number of preload win32 programs <225>
15:59:17.3439+01:00 - INFO - Flow.Launcher.Plugin.Program.Main - Number of preload uwps <46>
15:59:17.3439+01:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <29ms>
15:59:17.3439+01:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <32ms>
15:59:17.3611+01:00 - INFO - CommunityPluginSource.FetchAsync - Loading plugins from https://gcore.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json
15:59:17.3611+01:00 - INFO - CommunityPluginSource.FetchAsync - Loading plugins from https://cdn.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json
15:59:17.3611+01:00 - INFO - CommunityPluginSource.FetchAsync - Loading plugins from https://raw.githubusercontent.com/Flow-Launcher/Flow.Launcher.PluginsManifest/plugin_api_v2/plugins.json
15:59:17.3611+01:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <48ms>
15:59:17.3611+01:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <49ms>
15:59:17.3778+01:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <58ms>
15:59:17.4659+01:00 - INFO - CommunityPluginSource.FetchAsync - Loaded 151 plugins from https://cdn.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json
15:59:17.4680+01:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <150ms>
15:59:17.6187+01:00 - INFO - App.OnStartup - Dependencies Info:
Python Path:
Node Path:
15:59:17.8267+01:00 - INFO - App.OnStartup - End Flow Launcher startup ----------------------------------------------------
15:59:17.8267+01:00 - INFO - App.OnStartup - Startup cost <728ms>
15:59:18.4111+01:00 - INFO - ImageLoader.Initialize - Preload images cost <1059ms>
15:59:18.4111+01:00 - INFO - ImageLoader.Initialize - Number of preload images is <91>, Images Number: 91, Unique Items 58
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue with the listed PowerShell commands: launch Flow.Launcher.exe, run taskkill /im Flow.Launcher.exe, and check tasklist and the search shortcut. Trace the application's shutdown handling and determine why the process remains active; done means taskkill exits cleanly and the launcher can be started and used again without the /F flag.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100