You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Im using Net 9, Windows app sdk 1.6.4 and community toolkit mvvm 8.4.
This is my background service sending a message to my view model which sets the value in ui using UiDispatcherQueue.TryEnqueue.
Its added via services.AddHostedService();. Host is started via Host.StartAsync();.
PerformanceMonitorBackgroundService.cs
ShellViewModel.cs
When closing the program via X button I get sometimes following exception:
Error code: -2147418113
Stacktrace:
at WinRT.ExceptionHelpers.g__Throw|38_0(Int32 hr)
at ABI.Microsoft.UI.Xaml.Controls.ITextBlockMethods.set_Text(IObjectReference _obj, String value)
at Microsoft.UI.Xaml.Controls.TextBlock.set_Text(String value)
at Lm.Ui.Views.ShellPage.XamlBindingSetters.Set_Microsoft_UI_Xaml_Controls_TextBlock_Text(TextBlock obj, String value, String targetNullValue) in F:\C#\Lm\Lm.Ui\obj\x86\Debug\net9.0-windows10.0.22621.0\Views\ShellPage.g.cs:line 55
at Lm.Ui.Views.ShellPage.ShellPage_obj1_Bindings.Update_ViewModel_MemoryUsage(String obj, Int32 phase) in F:\C#\Lm\Lm.Ui\obj\x86\Debug\net9.0-windows10.0.22621.0\Views\ShellPage.g.cs:line 288
at Lm.Ui.Views.ShellPage.ShellPage_obj1_Bindings.ShellPage_obj1_BindingsTracking.PropertyChanged_ViewModel(Object sender, PropertyChangedEventArgs e) in F:\C#\Lm\Lm.Ui\obj\x86\Debug\net9.0-windows10.0.22621.0\Views\ShellPage.g.cs:line 365
at CommunityToolkit.Mvvm.ComponentModel.ObservableObject.OnPropertyChanged(PropertyChangedEventArgs e)
at Lm.Ui.ViewModels.ShellViewModel.set_MemoryUsage(String value) in F:\C#\Lm\Lm.Ui\obj\x86\Debug\net9.0-windows10.0.22621.0\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator\Lm.Ui.ViewModels.ShellViewModel.g.cs:line 26
at Lm.Ui.ViewModels.ShellViewModel.<>c__DisplayClass13_0.b__0() in F:\C#\Lm\Lm.Ui\ViewModels\ShellViewModel.cs:line 59
at ABI.Microsoft.UI.Dispatching.DispatcherQueueHandler.Do_Abi_Invoke(IntPtr thisPtr)
What can I do to avoid that? If other information needed, please tell me.
Thx and best regards
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
Im using Net 9, Windows app sdk 1.6.4 and community toolkit mvvm 8.4.
This is my background service sending a message to my view model which sets the value in ui using UiDispatcherQueue.TryEnqueue.
Its added via services.AddHostedService();. Host is started via Host.StartAsync();.
PerformanceMonitorBackgroundService.cs
ShellViewModel.cs
When closing the program via X button I get sometimes following exception:
What can I do to avoid that? If other information needed, please tell me.
Thx and best regards
Beta Was this translation helpful? Give feedback.
All reactions