amwx / FluentAvalonia

Control library focused on fluent design and bringing more WinUI controls into Avalonia
MIT License
1.05k stars 97 forks source link

'Command bar' crashes on resizing the window after opening the overflow menu #565

Open moomiji opened 6 months ago

moomiji commented 6 months ago

Describe the bug

Desktop/Platform (please complete the following information):

Additional context

System.ArgumentException
  HResult=0x80070057
  Message=Attempt to call InvalidateArrange on wrong LayoutManager.
  Source=Avalonia.Base
  StackTrace:
   at Avalonia.Layout.LayoutManager.InvalidateArrange(Layoutable control)
   at Avalonia.Layout.LayoutManager.ExecuteArrangePass()
   at Avalonia.Layout.LayoutManager.InnerLayoutPass()
   at Avalonia.Layout.LayoutManager.ExecuteLayoutPass()
   at Avalonia.Controls.WindowBase.HandleResized(Size clientSize, WindowResizeReason reason)
   at Avalonia.Controls.Window.HandleResized(Size clientSize, WindowResizeReason reason)
   at Avalonia.Win32.WindowImpl.AppWndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   at Avalonia.Win32.WindowImpl.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   at Avalonia.Win32.WindowImpl.WndProcMessageHandler(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   at FluentAvalonia.Interop.Win32Interop.CallWindowProcW(IntPtr lpPrevWndProc, HWND hWnd, UInt32 msg, WPARAM wParam, LPARAM lParam)
   at FluentAvalonia.UI.Windowing.Win32WindowManager.WndProc(HWND hWnd, UInt32 msg, WPARAM wParam, LPARAM lParam) in .\src\FluentAvalonia\UI\Windowing\Win32\Win32WindowManager.cs:line 106
   at FluentAvalonia.UI.Windowing.Win32WindowManager.WndProcStatic(IntPtr hwnd, UInt32 msg, IntPtr wParam, IntPtr lParam) in .\src\FluentAvalonia\UI\Windowing\Win32\Win32WindowManager.cs:line 410
   at Avalonia.Win32.Interop.UnmanagedMethods.DefWindowProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   at Avalonia.Win32.WindowImpl.AppWndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   at Avalonia.Win32.WindowImpl.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   at Avalonia.Win32.WindowImpl.WndProcMessageHandler(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   at FluentAvalonia.Interop.Win32Interop.CallWindowProcW(IntPtr lpPrevWndProc, HWND hWnd, UInt32 msg, WPARAM wParam, LPARAM lParam)
   at FluentAvalonia.UI.Windowing.Win32WindowManager.WndProc(HWND hWnd, UInt32 msg, WPARAM wParam, LPARAM lParam) in .\src\FluentAvalonia\UI\Windowing\Win32\Win32WindowManager.cs:line 151
   at FluentAvalonia.UI.Windowing.Win32WindowManager.WndProcStatic(IntPtr hwnd, UInt32 msg, IntPtr wParam, IntPtr lParam) in .\src\FluentAvalonia\UI\Windowing\Win32\Win32WindowManager.cs:line 410
dcooperch commented 1 month ago

I have experienced this crash several times as well.