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] 主题色加载导致的错误 #196

Closed
BelazyFly opened this issue Nov 9, 2023 · 1 comment
Closed

[Bug] 主题色加载导致的错误 #196

BelazyFly opened this issue Nov 9, 2023 · 1 comment
Assignees
Labels
bug Something isn't working need more infomation need to fix 需要修复

Comments

@BelazyFly
Copy link

描述遇到的问题

System.ArgumentException
System.ArgumentException: An item with the same key has already been added.
at ABI.System.Collections.Generic.IDictionaryMethods2.Add(IObjectReference obj, K key, V value) at Microsoft.UI.Xaml.ResourceDictionary.Add(Object key, Object value) at Natsurainko.FluentLauncher.Services.UI.AppearanceService.ApplyThemeColorBeforePageInit(ShellPage page) at Natsurainko.FluentLauncher.Views.ShellPage..ctor() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlTypeInfoProvider.Activate_250_ShellPage() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlUserType.ActivateInstance() at ABI.Microsoft.UI.Xaml.Markup.IXamlType.Do_Abi_ActivateInstance_13(IntPtr thisPtr, IntPtr* result) --- End of stack trace from previous location --- at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr) at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr) at ABI.Microsoft.UI.Xaml.Controls.IFrameMethods.Navigate(IObjectReference _obj, Type sourcePageType, Object parameter) at Microsoft.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType, Object parameter) at Natsurainko.FluentLauncher.Services.UI.Navigation.NavigationService.NavigateTo(String key, Object parameter) at Natsurainko.FluentLauncher.Views.MainWindow.WindowEx_Activated(Object sender, WindowActivatedEventArgs args) at WinRT._EventSource_global__Windows_Foundation_TypedEventHandler_object__global__Microsoft_UI_Xaml_WindowActivatedEventArgs_.EventState.<GetEventInvoke>b__1_0(Object sender, WindowActivatedEventArgs args) at ABI.Windows.Foundation.TypedEventHandler2.Do_Abi_Invoke[TSenderAbi,TResultAbi](Void* thisPtr, TSenderAbi sender, TResultAbi args)

复现问题的步骤

System.ArgumentException
System.ArgumentException: An item with the same key has already been added.
at ABI.System.Collections.Generic.IDictionaryMethods2.Add(IObjectReference obj, K key, V value) at Microsoft.UI.Xaml.ResourceDictionary.Add(Object key, Object value) at Natsurainko.FluentLauncher.Services.UI.AppearanceService.ApplyThemeColorBeforePageInit(ShellPage page) at Natsurainko.FluentLauncher.Views.ShellPage..ctor() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlTypeInfoProvider.Activate_250_ShellPage() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlUserType.ActivateInstance() at ABI.Microsoft.UI.Xaml.Markup.IXamlType.Do_Abi_ActivateInstance_13(IntPtr thisPtr, IntPtr* result) --- End of stack trace from previous location --- at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr) at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr) at ABI.Microsoft.UI.Xaml.Controls.IFrameMethods.Navigate(IObjectReference _obj, Type sourcePageType, Object parameter) at Microsoft.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType, Object parameter) at Natsurainko.FluentLauncher.Services.UI.Navigation.NavigationService.NavigateTo(String key, Object parameter) at Natsurainko.FluentLauncher.Views.MainWindow.WindowEx_Activated(Object sender, WindowActivatedEventArgs args) at WinRT._EventSource_global__Windows_Foundation_TypedEventHandler_object__global__Microsoft_UI_Xaml_WindowActivatedEventArgs_.EventState.<GetEventInvoke>b__1_0(Object sender, WindowActivatedEventArgs args) at ABI.Windows.Foundation.TypedEventHandler2.Do_Abi_Invoke[TSenderAbi,TResultAbi](Void* thisPtr, TSenderAbi sender, TResultAbi args)

期望的表现

System.ArgumentException
System.ArgumentException: An item with the same key has already been added.
at ABI.System.Collections.Generic.IDictionaryMethods2.Add(IObjectReference obj, K key, V value) at Microsoft.UI.Xaml.ResourceDictionary.Add(Object key, Object value) at Natsurainko.FluentLauncher.Services.UI.AppearanceService.ApplyThemeColorBeforePageInit(ShellPage page) at Natsurainko.FluentLauncher.Views.ShellPage..ctor() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlTypeInfoProvider.Activate_250_ShellPage() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlUserType.ActivateInstance() at ABI.Microsoft.UI.Xaml.Markup.IXamlType.Do_Abi_ActivateInstance_13(IntPtr thisPtr, IntPtr* result) --- End of stack trace from previous location --- at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr) at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr) at ABI.Microsoft.UI.Xaml.Controls.IFrameMethods.Navigate(IObjectReference _obj, Type sourcePageType, Object parameter) at Microsoft.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType, Object parameter) at Natsurainko.FluentLauncher.Services.UI.Navigation.NavigationService.NavigateTo(String key, Object parameter) at Natsurainko.FluentLauncher.Views.MainWindow.WindowEx_Activated(Object sender, WindowActivatedEventArgs args) at WinRT._EventSource_global__Windows_Foundation_TypedEventHandler_object__global__Microsoft_UI_Xaml_WindowActivatedEventArgs_.EventState.<GetEventInvoke>b__1_0(Object sender, WindowActivatedEventArgs args) at ABI.Windows.Foundation.TypedEventHandler2.Do_Abi_Invoke[TSenderAbi,TResultAbi](Void* thisPtr, TSenderAbi sender, TResultAbi args)

环境

22631.2506 23H2 Windows 11 专业版

在微软商店下载的应该是现在所知最新版

附件

System.ArgumentException
System.ArgumentException: An item with the same key has already been added.
at ABI.System.Collections.Generic.IDictionaryMethods2.Add(IObjectReference obj, K key, V value) at Microsoft.UI.Xaml.ResourceDictionary.Add(Object key, Object value) at Natsurainko.FluentLauncher.Services.UI.AppearanceService.ApplyThemeColorBeforePageInit(ShellPage page) at Natsurainko.FluentLauncher.Views.ShellPage..ctor() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlTypeInfoProvider.Activate_250_ShellPage() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlUserType.ActivateInstance() at ABI.Microsoft.UI.Xaml.Markup.IXamlType.Do_Abi_ActivateInstance_13(IntPtr thisPtr, IntPtr* result) --- End of stack trace from previous location --- at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr) at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr) at ABI.Microsoft.UI.Xaml.Controls.IFrameMethods.Navigate(IObjectReference _obj, Type sourcePageType, Object parameter) at Microsoft.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType, Object parameter) at Natsurainko.FluentLauncher.Services.UI.Navigation.NavigationService.NavigateTo(String key, Object parameter) at Natsurainko.FluentLauncher.Views.MainWindow.WindowEx_Activated(Object sender, WindowActivatedEventArgs args) at WinRT._EventSource_global__Windows_Foundation_TypedEventHandler_object__global__Microsoft_UI_Xaml_WindowActivatedEventArgs_.EventState.<GetEventInvoke>b__1_0(Object sender, WindowActivatedEventArgs args) at ABI.Windows.Foundation.TypedEventHandler2.Do_Abi_Invoke[TSenderAbi,TResultAbi](Void* thisPtr, TSenderAbi sender, TResultAbi args)

@BelazyFly BelazyFly added the bug Something isn't working label Nov 9, 2023
@natsurainko natsurainko changed the title 启动器未知错误 [Bug] 主题色加载导致的错误 Jan 27, 2024
@natsurainko natsurainko self-assigned this Jan 27, 2024
@natsurainko
Copy link
Member

在 2.2.6.0 中修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need more infomation need to fix 需要修复
Projects
None yet
Development

No branches or pull requests

2 participants