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

Bug: COMException in AppThemeModeService.SetAppThemeMode #15332

Closed
yaira2 opened this issue May 8, 2024 · 2 comments · Fixed by #15391
Closed

Bug: COMException in AppThemeModeService.SetAppThemeMode #15332

yaira2 opened this issue May 8, 2024 · 2 comments · Fixed by #15391
Assignees
Labels
bug Something isn't working 👀 crash Bug reports involving a crash

Comments

@yaira2
Copy link
Member

yaira2 commented May 8, 2024

Description

System.Runtime.InteropServices.COMException

Steps To Reproduce

Unknown (presumably it's when changing a theme setting)

Requirements

  • Add error handling to prevent this crash

Files Version

v3.4

Windows Version

WINDOWS 10.0.19045

Log File

WinRT
ExceptionHelpers.<ThrowExceptionForHR>g__Throw|39_0 (Int32 hr)
Files.App.Services
AppThemeModeService.SetAppThemeMode (Window window, AppWindowTitleBar titleBar, Nullable`1 rootTheme, Boolean callThemeModeChangedEvent)
Files.App.Services
AppThemeModeService.ApplyResources ()
Files.App.ViewModels.Settings
AppearanceViewModel.set_AppThemeBackgroundColor (String value)
Files.App.ViewModels.Settings
AppearanceViewModel.set_SelectedAppThemeResources (AppThemeResourceItem value)
ABI.Microsoft.UI.Xaml
DependencyPropertyChangedCallback.Do_Abi_Invoke (IntPtr thisPtr, IntPtr sender, IntPtr dp)
WinRT
ExceptionHelpers.<ThrowExceptionForHR>g__Throw|39_0 (Int32 hr)
ABI.Windows.ApplicationModel.Core
IUnhandledErrorMethods.Propagate (IObjectReference _obj)
Microsoft.AppCenter.Utils
ApplicationLifecycleHelperWinUI.<ctor>b__0_3 (Object sender, UnhandledErrorDetectedEventArgs eventArgs)
@yaira2 yaira2 added bug Something isn't working 👀 good first issue Good issue for new contributors to get started with crash Bug reports involving a crash and removed good first issue Good issue for new contributors to get started with labels May 8, 2024
@0x5bfa
Copy link
Member

0x5bfa commented May 13, 2024

It's really weird that this happens in this very method, which is almost the same as before in ThemeHelper.

Do you think it's fine to add try-catch to the method?
If failed, output the exception to the logger.

@0x5bfa 0x5bfa self-assigned this May 13, 2024
@yaira2
Copy link
Member Author

yaira2 commented May 13, 2024

That should work, and we can log additional info to help debug in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 👀 crash Bug reports involving a crash
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants