System.InvalidOperationException: Cannot change source while update is in progress
See original GitHub issueDescribe the bug
System.InvalidOperationException: Cannot change source while update is in progress.
at Avalonia.Controls.Selection.SelectionModel`1.SetSource(IEnumerable value) in .\Avalonia\src\Avalonia.Controls\Selection\SelectionModel.cs:line 282
at Avalonia.Controls.Selection.InternalSelectionModel.SetSource(IEnumerable value) in .\Avalonia\src\Avalonia.Controls\Selection\InternalSelectionModel.cs:line 121
at Avalonia.Controls.Selection.InternalSelectionModel.Update(IEnumerable source, Optional`1 selectedItems) in .\Avalonia\src\Avalonia.Controls\Selection\InternalSelectionModel.cs:line 75
at Avalonia.Controls.Primitives.SelectingItemsControl.EndUpdating() in .\Avalonia\src\Avalonia.Controls\Primitives\SelectingItemsControl.cs:line 1245
at Avalonia.Controls.Primitives.SelectingItemsControl.OnDataContextEndUpdate() in .\Avalonia\src\Avalonia.Controls\Primitives\SelectingItemsControl.cs:line 546
at Avalonia.StyledElement.DataContextNotifying(StyledElement element, Boolean updateStarted) in .\Avalonia\src\Avalonia.Base\StyledElement.cs:line 768
at Avalonia.StyledElement.DataContextNotifying(AvaloniaObject o, Boolean updateStarted) in .\Avalonia\src\Avalonia.Base\StyledElement.cs:line 737
at Avalonia.PropertyStore.PropertyNotifying.Dispose() in .\Avalonia\src\Avalonia.Base\PropertyStore\PropertyNotifying.cs:line 26
at Avalonia.PropertyStore.ValueStore.InheritedValueChanged(AvaloniaProperty property, EffectiveValue oldValue, EffectiveValue newValue) in .\Avalonia\src\Avalonia.Base\PropertyStore\ValueStore.cs:line 795
at Avalonia.PropertyStore.ValueStore.InheritedValueChanged(AvaloniaProperty property, EffectiveValue oldValue, EffectiveValue newValue) in .\Avalonia\src\Avalonia.Base\PropertyStore\ValueStore.cs:line 793
at Avalonia.PropertyStore.ValueStore.InheritedValueChanged(AvaloniaProperty property, EffectiveValue oldValue, EffectiveValue newValue) in .\Avalonia\src\Avalonia.Base\PropertyStore\ValueStore.cs:line 793
at Avalonia.PropertyStore.ValueStore.InheritedValueChanged(AvaloniaProperty property, EffectiveValue oldValue, EffectiveValue newValue) in .\Avalonia\src\Avalonia.Base\PropertyStore\ValueStore.cs:line 793
at Avalonia.PropertyStore.ValueStore.InheritedValueChanged(AvaloniaProperty property, EffectiveValue oldValue, EffectiveValue newValue) in .\Avalonia\src\Avalonia.Base\PropertyStore\ValueStore.cs:line 793
at Avalonia.PropertyStore.ValueStore.InheritedValueChanged(AvaloniaProperty property, EffectiveValue oldValue, EffectiveValue newValue) in .\Avalonia\src\Avalonia.Base\PropertyStore\ValueStore.cs:line 793
at Avalonia.PropertyStore.ValueStore.InheritedValueChanged(AvaloniaProperty property, EffectiveValue oldValue, EffectiveValue newValue) in .\Avalonia\src\Avalonia.Base\PropertyStore\ValueStore.cs:line 793
at Avalonia.PropertyStore.ValueStore.InheritedValueChanged(AvaloniaProperty property, EffectiveValue oldValue, EffectiveValue newValue) in .\Avalonia\src\Avalonia.Base\PropertyStore\ValueStore.cs:line 793
at Avalonia.PropertyStore.ValueStore.InheritedValueChanged(AvaloniaProperty property, EffectiveValue oldValue, EffectiveValue newValue) in .\Avalonia\src\Avalonia.Base\PropertyStore\ValueStore.cs:line 793
at Avalonia.PropertyStore.ValueStore.SetInheritanceParent(AvaloniaObject newParent) in .\Avalonia\src\Avalonia.Base\PropertyStore\ValueStore.cs:line 395
at Avalonia.AvaloniaObject.set_InheritanceParent(AvaloniaObject value) in .\Avalonia\src\Avalonia.Base\AvaloniaObject.cs:line 77
at Avalonia.StyledElement.Avalonia.Controls.ISetLogicalParent.SetParent(ILogical parent) in .\Avalonia\src\Avalonia.Base\StyledElement.cs:line 477
at Avalonia.Controls.Primitives.PopupFlyoutBase.HideCore(Boolean canCancel) in .\Avalonia\src\Avalonia.Controls\Flyouts\PopupFlyoutBase.cs:line 179
at Avalonia.Controls.Primitives.PopupFlyoutBase.OnPopupClosed(Object sender, EventArgs e) in .\Avalonia\src\Avalonia.Controls\Flyouts\PopupFlyoutBase.cs:line 384
at Avalonia.Controls.Primitives.Popup.CloseCore() in .\Avalonia\src\Avalonia.Controls\Primitives\Popup.cs:line 728
at Avalonia.Controls.Primitives.Popup.Close() in .\Avalonia\src\Avalonia.Controls\Primitives\Popup.cs:line 505
at Avalonia.Controls.Primitives.Popup.WindowLostFocus() in .\Avalonia\src\Avalonia.Controls\Primitives\Popup.cs:line 899
at Avalonia.Win32.WindowImpl.AppWndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) in .\Avalonia\src\Windows\Avalonia.Win32\WindowImpl.AppWndProc.cs:line 705
at Avalonia.Win32.WindowImpl.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) in .\Avalonia\src\Windows\Avalonia.Win32\WindowImpl.WndProc.cs:line 23
To Reproduce Steps to reproduce the behavior:
- Run “ControlCatalog.NetCore”
- Click on “Settings” ➝Switch “Normal” to “Minimized”
Expected behavior The app does not crash
Desktop (please complete the following information):
- OS: Windows 10
- Version 11.0.0-rc1.1
Issue Analytics
- State:
- Created 4 months ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Temporary Value Error During Entity Framework Core Modify
My update method attaches a new user and then sets the state to modified. Every time though I get the error: System.InvalidOperationException: ' ......
Read more >InvalidOperationException Class (System)
Some common causes of InvalidOperationException exceptions. Updating a UI thread from a non-UI thread. Changing a collection while iterating it
Read more >Visual Studio fails after upgradeing to 17.1.1.
I was running Visual Studio 2022 ~17.0.6, then decided to update to 17.1.1. The upgrade process appeared normal and seemed to be successful....
Read more >WSUS Server "Cannot save configuration because the ...
I went in to the WSUS admin panel and changed the "Update File and Languages" setting by removing everything except English. Now the...
Read more >Error when changing Scripts - Unity Forum
This error seems to pop up every time I change code in Entities.ForEach. Restarting the editor fixes the problem, but it's very annoying...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can reproduce as op said.
EDIT: Now I see. You have to do one more step. Click Settings again after switching. Sorry.