Skip to content

BUG: Flow Launcher Settings Dialog does not close Wallpaper file on Settings close #3983

@starfishpatkhoo

Description

@starfishpatkhoo

Checks

  • I have checked that this issue has not already been reported.

  • I am using the latest version of Flow Launcher.

  • I am using the prerelease version of Flow Launcher.

Problem Description

I use John's Background Switcher (JBS) to change the wallpaper regularly and I just started to use Flow Launcher to try it out. I notice that every once in a while, JBS fails to change the wallpaper. Upon further investigation, I realise that this is due to Flow Launcher's Settings dialog not releasing the wallpaper file, or opening it in an exclusive mode in the Settings dialog.

This bug therefore prevents wallpaper changers from changing the wallpaper file if the Settings dialog has been opened to the Appearance tab.

To Reproduce

  1. Reboot computer, launch flow Launcher in background - but don't do anything, check desktop make sure wallpaper is displayed properly
  2. Navigate to the current active background file - eg. %APPDATA%\johnsadventures.com\Background Switcher\ActiveBackground.jpg
  3. Using a tool like Powertoys File Locksmith, or Process Explorer, etc, check which process is locking said file - it should be: NONE - no one is using the file at the moment
  4. Launch Flow Launcher's Settings Dialog - it should be in General
  5. Double check File Locksmith (rescan if needed) - it should still be NONE - no one is using the file at the moment
  6. Go to the Appearance tab in the Flow Launcher's Settings Dialog - notice the preview has the current wallpaper correctly
  7. Double check File Locksmith (rescan if needed) - Now it says Flow Launcher is using/locked the file
  8. Close the Flow Launcher's Settings Dialog
  9. Double check File Locksmith (rescan if needed) - It STILL says Flow Launcher is using/locked the file
  10. Can repeat opening and closing the Settings Dialog, but the file continues to be used/locked by File Launcher
  11. Exit File Launcher
  12. Double check File Locksmith (rescan if needed) - now it says NONE - no one is using the file at the moment

Screenshots

Image

Flow Launcher Version

2.0.0

Windows Build Number

10.0.26100.6584

Error Log

17:10:12.7824+08:00 - INFO  - Logger.SetLogLevel - Using log level: INFO.
17:10:12.8304+08:00 - INFO  - App.OnStartup - Begin Flow Launcher startup ----------------------------------------------------
17:10:12.8304+08:00 - INFO  - App.OnStartup - Runtime info:
Flow Launcher version: 2.0.0
OS Version: 26100.6584
IntPtr Length: 8
x64: True
17:10:12.8707+08:00 - INFO  - CommunityPluginSource.FetchAsync - Loading plugins from https://fastly.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@main/plugins.json
17:10:12.8867+08:00 - INFO  - CommunityPluginSource.FetchAsync - Loading plugins from https://gcore.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@main/plugins.json
17:10:12.8867+08:00 - INFO  - CommunityPluginSource.FetchAsync - Loading plugins from https://cdn.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@main/plugins.json
17:10:12.8867+08:00 - INFO  - CommunityPluginSource.FetchAsync - Loading plugins from https://raw.githubusercontent.com/Flow-Launcher/Flow.Launcher.PluginsManifest/main/plugins.json
17:10:12.9368+08:00 - INFO  - CommunityPluginSource.FetchAsync - Loaded 274 plugins from https://raw.githubusercontent.com/Flow-Launcher/Flow.Launcher.PluginsManifest/main/plugins.json
17:10:12.9368+08:00 - INFO  - CommunityPluginSource.FetchAsync - Loaded 274 plugins from https://cdn.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@main/plugins.json
17:10:12.9557+08:00 - ERROR - CommunityPluginSource.FetchAsync - Error Occurred
EXCEPTION OCCURS: System.Threading.Tasks.TaskCanceledException: The operation was canceled.
   at void System.Net.Http.CancellationHelper.ThrowOperationCanceledException(Exception innerException, CancellationToken cancellationToken)
   at async ValueTask<int> System.Net.Http.HttpConnection+ContentLengthReadStream.ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken)
   at async ValueTask<ReadBufferState> System.Text.Json.Serialization.ReadBufferState.ReadFromStreamAsync(Stream utf8Json, CancellationToken cancellationToken, bool fillBuffer)
   at async ValueTask<T> System.Text.Json.Serialization.Metadata.JsonTypeInfo<T>.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken)
   at async Task<T> System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore<T>(HttpContent content, JsonSerializerOptions options, CancellationToken cancellationToken)
   at async Task<List<UserPlugin>> Flow.Launcher.Core.ExternalPlugins.CommunityPluginSource.FetchAsync(CancellationToken token) in C:/projects/flow-launcher/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs:line 57

17:10:12.9557+08:00 - ERROR - CommunityPluginSource.FetchAsync - Error Occurred
EXCEPTION OCCURS: System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at async ValueTask<ReadBufferState> System.Text.Json.Serialization.ReadBufferState.ReadFromStreamAsync(Stream utf8Json, CancellationToken cancellationToken, bool fillBuffer)
   at async ValueTask<T> System.Text.Json.Serialization.Metadata.JsonTypeInfo<T>.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken)
   at async Task<T> System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore<T>(HttpContent content, JsonSerializerOptions options, CancellationToken cancellationToken)
   at async Task<List<UserPlugin>> Flow.Launcher.Core.ExternalPlugins.CommunityPluginSource.FetchAsync(CancellationToken token) in C:/projects/flow-launcher/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs:line 57

17:10:12.9557+08:00 - INFO  - PluginManager.InitializePluginsAsync - Total init cost for <Plugin Indicator> is <1ms>
17:10:12.9557+08:00 - INFO  - PluginManager.InitializePluginsAsync - Total init cost for <URL> is <7ms>
17:10:12.9557+08:00 - INFO  - PluginManager.InitializePluginsAsync - Total init cost for <Process Killer> is <2ms>
17:10:12.9557+08:00 - INFO  - PluginManager.InitializePluginsAsync - Total init cost for <Plugins Manager> is <2ms>
17:10:12.9557+08:00 - INFO  - PluginManager.InitializePluginsAsync - Total init cost for <System Commands> is <3ms>
17:10:12.9557+08:00 - INFO  - PluginManager.InitializePluginsAsync - Total init cost for <Web Searches> is <5ms>
17:10:12.9557+08:00 - INFO  - PluginManager.InitializePluginsAsync - Total init cost for <Shell> is <7ms>
17:10:12.9680+08:00 - INFO  - PluginManager.InitializePluginsAsync - Total init cost for <Browser Bookmarks> is <10ms>
17:10:12.9680+08:00 - INFO  - PluginManager.InitializePluginsAsync - Total init cost for <Calculator> is <13ms>
17:10:12.9680+08:00 - INFO  - PluginManager.InitializePluginsAsync - Total init cost for <Windows Settings> is <15ms>
17:10:12.9831+08:00 - INFO  - Main.InitAsync - Preload programs cost <10ms>
17:10:12.9831+08:00 - INFO  - Main.InitAsync - Number of preload win32 programs <207>
17:10:12.9831+08:00 - INFO  - Main.InitAsync - Number of preload uwps <23>
17:10:12.9831+08:00 - INFO  - PluginManager.InitializePluginsAsync - Total init cost for <Explorer> is <29ms>
17:10:12.9831+08:00 - INFO  - PluginManager.InitializePluginsAsync - Total init cost for <Win Hotkey> is <31ms>
17:10:12.9831+08:00 - INFO  - PluginManager.InitializePluginsAsync - Total init cost for <Program> is <37ms>
17:10:13.7431+08:00 - INFO  - App.OnStartup - End Flow Launcher startup ----------------------------------------------------
17:10:13.7431+08:00 - INFO  - App.OnStartup - Startup cost <999ms>
17:10:13.9455+08:00 - INFO  - ImageLoader.InitializeAsync - Preload images cost <1054ms>
17:10:13.9455+08:00 - INFO  - ImageLoader.InitializeAsync - Number of preload images is <150>, Images Number: 150, Unique Items 101

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions