Skip to content

Crash in Example #98

@HeinA

Description

@HeinA

'ello

If I just randomly click on the Menu Item in the Desktop example, I quickly get an exception:

Unhandled exception. System.InvalidOperationException: The control Projektanker.Icons.Avalonia.Icon already has a visual parent ContentPresenter while trying to add it as a child of ContentPresenter. at Avalonia.Visual.Avalonia.Collections.IAvaloniaListItemValidator<Avalonia.Visual>.Validate(Visual item) at Avalonia.Controls.Presenters.ContentPresenter.UpdateChild(Object content) at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) at Avalonia.Layout.Layoutable.Measure(Size availableSize) at Avalonia.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) at Avalonia.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged) at Avalonia.Controls.Grid.MeasureOverride(Size constraint) at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) at Avalonia.Layout.Layoutable.Measure(Size availableSize) at Avalonia.Controls.Presenters.ContentPresenter.MeasureOverride(Size availableSize) at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) at Avalonia.Layout.Layoutable.Measure(Size availableSize) at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize) at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) at Avalonia.Layout.Layoutable.Measure(Size availableSize) at Avalonia.Controls.Border.MeasureOverride(Size availableSize) at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) at Avalonia.Layout.Layoutable.Measure(Size availableSize) at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize) at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) at Avalonia.Layout.Layoutable.Measure(Size availableSize) at Avalonia.Controls.StackPanel.MeasureOverride(Size availableSize) at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) at Avalonia.Layout.Layoutable.Measure(Size availableSize) at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize) at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) at Avalonia.Layout.Layoutable.Measure(Size availableSize) at Avalonia.Controls.Border.MeasureOverride(Size availableSize) at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) at Avalonia.Layout.Layoutable.Measure(Size availableSize) at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize) at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) at Avalonia.Layout.Layoutable.Measure(Size availableSize) at Avalonia.Controls.Presenters.ContentPresenter.MeasureOverride(Size availableSize) at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) at Avalonia.Layout.Layoutable.Measure(Size availableSize) at Avalonia.Controls.DockPanel.MeasureOverride(Size availableSize) at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) at Avalonia.Layout.Layoutable.Measure(Size availableSize) at Avalonia.Controls.Border.MeasureOverride(Size availableSize) at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) at Avalonia.Layout.Layoutable.Measure(Size availableSize) at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize) at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) at Avalonia.Layout.Layoutable.Measure(Size availableSize) at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize) at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) at Avalonia.Layout.Layoutable.Measure(Size availableSize) at Avalonia.Layout.LayoutManager.Measure(Layoutable control) at Avalonia.Layout.LayoutManager.Measure(Layoutable control) at Avalonia.Layout.LayoutManager.Measure(Layoutable control) at Avalonia.Layout.LayoutManager.Measure(Layoutable control) at Avalonia.Layout.LayoutManager.Measure(Layoutable control) at Avalonia.Layout.LayoutManager.Measure(Layoutable control) at Avalonia.Layout.LayoutManager.Measure(Layoutable control) at Avalonia.Layout.LayoutManager.Measure(Layoutable control) at Avalonia.Layout.LayoutManager.Measure(Layoutable control) at Avalonia.Layout.LayoutManager.Measure(Layoutable control) at Avalonia.Layout.LayoutManager.ExecuteMeasurePass() at Avalonia.Layout.LayoutManager.ExecuteLayoutPass() at Avalonia.Media.MediaContext.FireInvokeOnRenderCallbacks() at Avalonia.Media.MediaContext.RenderCore() at Avalonia.Media.MediaContext.Render() at Avalonia.Threading.DispatcherOperation.InvokeCore() at Avalonia.Threading.DispatcherOperation.Execute() at Avalonia.Threading.Dispatcher.ExecuteJob(DispatcherOperation job) at Avalonia.Threading.Dispatcher.ExecuteJobsCore(Boolean fromExplicitBackgroundProcessingCallback) at Avalonia.Threading.Dispatcher.Signaled() at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg) at Avalonia.Win32.Win32DispatcherImpl.RunLoop(CancellationToken cancellationToken) at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl impl) at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame frame) at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.StartCore(String[] args) at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, Action`1 lifetimeBuilder) at ShellExample.Desktop.Program.Main(String[] args) in C:\Users\Hein\RiderProjects\AvaloniaInside.Shell\src\Example\ShellExample\ShellExample.Desktop\Program.cs:line 14

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions