files-community / Files

Building the best file manager for Windows
https://files.community
MIT License
32.92k stars 2.1k forks source link

Bug: App crashing when running as administrator and browsing for background image in Settings #15634

Closed What410802 closed 1 week ago

What410802 commented 1 week ago

Description

Files crashes every time when running as administrator and click Settings -> Appearance -> Background image -> browse. The problem does not appear in normal user mode. debug.log:

2024-06-20 22:53:54.5718|Information|App launched. Launch args type: LaunchActivatedEventArgs
2024-06-20 22:53:56.8702|Information|Drive added: C:\, Fixed
2024-06-20 22:53:57.2444|Information|Drive added: D:\, Fixed
2024-06-20 22:53:59.5592|Information|STORE: Checking for updates...
2024-06-20 23:02:21.8683|Error|System.Runtime.InteropServices.COMException (0x80004005)
   at Files.App.ViewModels.Settings.AppearanceViewModel.SelectBackgroundImage()
   at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0()
--- End of stack trace from previous location ---
   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|39_0(Int32 hr)
   at ABI.Windows.ApplicationModel.Core.IUnhandledErrorMethods.Propagate(IObjectReference _obj)
   at Microsoft.AppCenter.Utils.ApplicationLifecycleHelperWinUI.<.ctor>b__0_3(Object sender, UnhandledErrorDetectedEventArgs eventArgs)
--- End of stack trace from previous location ---
   at Microsoft.AppCenter.Utils.ApplicationLifecycleHelperWinUI.<.ctor>b__0_3(Object sender, UnhandledErrorDetectedEventArgs eventArgs)
   at ABI.System.EventHandler`1.Do_Abi_Invoke[TAbi](Void* thisPtr, IntPtr sender, TAbi args)

image

Steps To Reproduce

  1. Right click on a Files shortcut and choose Run as administrator
  2. Click the Settings icon in the upper right corner
  3. Choose Appearance
  4. Click Browse in Background image

Requirements

Files Version

3.4.1.0

Windows Version

10.0.22623.1037

Log File

debug.log

Josh65-2201 commented 1 week ago

Thanks for the report, This is an issue with Microsoft WinAppSDK https://github.com/microsoft/WindowsAppSDK/issues/2504. There is no need to run Files as admin anyway.

yaira2 commented 1 week ago

@What410802 thank you for reporting this issue, we're excited to share this is already resolved in the preview builds and will be included in the upcoming v3.5 release.