Another crash during drag netmodule
kant2002 opened this issue · 0 comments
kant2002 commented
I made attempt to drag netmodule in order to reproduce #88
and receive another crash. This one looks a lot like Avalonia is to blame since crash happens during call to
AvaloniaILSpy/SharpTreeView/SharpTreeView.cs
Line 762 in b640ba5
and even if ILSpy doing something incorrectly, that's on Avalonia. I will keep that here, unless I was able reproduce with pure Avalonia.
Stack trace.
Sorry, we crashed
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
at ICSharpCode.TreeView.TreeFlattener.get_Item(Int32 index) in /home/kant/d/github/AvaloniaILSpy/SharpTreeView/TreeFlattener.cs:line 64
at Avalonia.Controls.ItemsSourceView`1.GetAt(Int32 index) in /_/src/Avalonia.Controls/ItemsSourceView.cs:line 243
at Avalonia.Controls.Selection.SelectedItems`1.GetEnumerator()+MoveNext() in /_/src/Avalonia.Controls/Selection/SelectedItems.cs:line 89
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Avalonia.Controls.Primitives.SelectingItemsControl.OnSelectionModelSelectionChanged(Object sender, SelectionModelSelectionChangedEventArgs e) in /_/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs:line 814
at Avalonia.Controls.Selection.SelectionModel`1.CommitOperation(Operation operation, Boolean raisePropertyChanged) in /_/src/Avalonia.Controls/Selection/SelectionModel.cs:line 706
at Avalonia.Controls.Selection.SelectionModel`1.EndBatchUpdate() in /_/src/Avalonia.Controls/Selection/SelectionModel.cs:line 214
at Avalonia.Controls.Selection.SelectionModel`1.BatchUpdateOperation.Dispose() in /_/src/Avalonia.Controls/Selection/SelectionModel.cs:line 764
at Avalonia.Controls.Selection.InternalSelectionModel.OnSelectedItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in /_/src/Avalonia.Controls/Selection/InternalSelectionModel.cs:line 277
at Avalonia.Collections.AvaloniaList`1.Clear() in /_/src/Avalonia.Base/Collections/AvaloniaList.cs:line 229
at Avalonia.Collections.AvaloniaList`1.System.Collections.IList.Clear() in /_/src/Avalonia.Base/Collections/AvaloniaList.cs:line 556
at ICSharpCode.TreeView.SharpTreeView.SetSelectedNodes(IEnumerable`1 nodes) in /home/kant/d/github/AvaloniaILSpy/SharpTreeView/SharpTreeView.cs:line 762
at ICSharpCode.TreeView.SharpTreeView.UpdateFocusedNode(List`1 newSelection, Int32 topSelectedIndex) in /home/kant/d/github/AvaloniaILSpy/SharpTreeView/SharpTreeView.cs:line 192
at ICSharpCode.TreeView.SharpTreeView.flattener_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in /home/kant/d/github/AvaloniaILSpy/SharpTreeView/SharpTreeView.cs:line 184
at ICSharpCode.TreeView.TreeFlattener.RaiseCollectionChanged(NotifyCollectionChangedEventArgs e) in /home/kant/d/github/AvaloniaILSpy/SharpTreeView/TreeFlattener.cs:line 36
at ICSharpCode.TreeView.TreeFlattener.NodesRemoved(Int32 index, IEnumerable`1 nodes) in /home/kant/d/github/AvaloniaILSpy/SharpTreeView/TreeFlattener.cs:line 51
at ICSharpCode.TreeView.SharpTreeNode.OnChildrenChanged(NotifyCollectionChangedEventArgs e) in /home/kant/d/github/AvaloniaILSpy/SharpTreeView/SharpTreeNode.cs:line 189
at ICSharpCode.ILSpy.TreeNodes.ILSpyTreeNode.OnChildrenChanged(NotifyCollectionChangedEventArgs e) in /home/kant/d/github/AvaloniaILSpy/ILSpy.Core/TreeNodes/ILSpyTreeNode.cs:line 93
at ICSharpCode.TreeView.SharpTreeNodeCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in /home/kant/d/github/AvaloniaILSpy/SharpTreeView/SharpTreeNodeCollection.cs:line 33
at ICSharpCode.TreeView.SharpTreeNodeCollection.RemoveRange(Int32 index, Int32 count) in /home/kant/d/github/AvaloniaILSpy/SharpTreeView/SharpTreeNodeCollection.cs:line 124
at ICSharpCode.ILSpy.TreeNodes.AssemblyListTreeNode.<>c__DisplayClass6_0.<BindToObservableCollection>b__1(Object sender, NotifyCollectionChangedEventArgs e) in /home/kant/d/github/AvaloniaILSpy/ILSpy.Core/TreeNodes/AssemblyListTreeNode.cs:line 67
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
at System.Collections.ObjectModel.Collection`1.RemoveAt(Int32 index)
at ICSharpCode.ILSpy.TreeNodes.AssemblyListTreeNode.Drop(DragEventArgs e, Int32 index) in /home/kant/d/github/AvaloniaILSpy/ILSpy.Core/TreeNodes/AssemblyListTreeNode.cs:line 112
at ICSharpCode.TreeView.SharpTreeNode.InternalDrop(DragEventArgs e, Int32 index) in /home/kant/d/github/AvaloniaILSpy/SharpTreeView/SharpTreeNode.cs:line 619
at ICSharpCode.TreeView.SharpTreeView.OnDrop(DragEventArgs e) in /home/kant/d/github/AvaloniaILSpy/SharpTreeView/SharpTreeView.cs:line 453
at ICSharpCode.TreeView.SharpTreeView.<>c.<.cctor>b__0_2(SharpTreeView x, DragEventArgs e) in /home/kant/d/github/AvaloniaILSpy/SharpTreeView/SharpTreeView.cs:line 37
at Avalonia.Interactivity.RoutedEvent.<>c__DisplayClass23_0.<AddClassHandler>b__0(ValueTuple`2 args) in /_/src/Avalonia.Interactivity/RoutedEvent.cs:line 94
at System.Reactive.AnonymousObserver`1.OnNextCore(T value) in /_/Rx.NET/Source/src/System.Reactive/AnonymousObserver.cs:line 67
at System.Reactive.ObserverBase`1.OnNext(T value) in /_/Rx.NET/Source/src/System.Reactive/ObserverBase.cs:line 36
at System.Reactive.Subjects.Subject`1.OnNext(T value) in /_/Rx.NET/Source/src/System.Reactive/Subjects/Subject.cs:line 145
at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e) in /_/src/Avalonia.Interactivity/EventRoute.cs:line 148
at Avalonia.Interactivity.EventRoute.RaiseEvent(IInteractive source, RoutedEventArgs e) in /_/src/Avalonia.Interactivity/EventRoute.cs:line 79
at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e) in /_/src/Avalonia.Interactivity/Interactive.cs:line 123
at Avalonia.Input.DragDropDevice.RaiseDragEvent(Interactive target, IInputRoot inputRoot, Point point, RoutedEvent`1 routedEvent, DragDropEffects operation, IDataObject data, KeyModifiers modifiers) in /_/src/Avalonia.Input/DragDropDevice.cs:line 32
at Avalonia.Input.DragDropDevice.Drop(IInputRoot inputRoot, Point point, IDataObject data, DragDropEffects effects, KeyModifiers modifiers) in /_/src/Avalonia.Input/DragDropDevice.cs:line 84
at Avalonia.Input.DragDropDevice.ProcessRawEvent(RawDragEvent e) in /_/src/Avalonia.Input/DragDropDevice.cs:line 100
at Avalonia.Input.InputManager.ProcessInput(RawInputEventArgs e) in /_/src/Avalonia.Input/InputManager.cs:line 37
at Avalonia.Platform.InProcessDragSource.RaiseEventAndUpdateCursor(RawDragEventType type, IInputRoot root, Point pt, RawInputModifiers modifiers) in /_/src/Avalonia.Controls/Platform/InProcessDragSource.cs:line 69
at Avalonia.Platform.InProcessDragSource.<ProcessMouseEvents>g__CheckDraggingAccepted|19_0(RawInputModifiers changedMouseButton, <>c__DisplayClass19_0& ) in /_/src/Avalonia.Controls/Platform/InProcessDragSource.cs:line 166
at Avalonia.Platform.InProcessDragSource.ProcessMouseEvents(RawPointerEventArgs e)
at System.Reactive.AnonymousSafeObserver`1.OnNext(T value) in /_/Rx.NET/Source/src/System.Reactive/AnonymousSafeObserver.cs:line 54
at System.Reactive.Subjects.Subject`1.OnNext(T value) in /_/Rx.NET/Source/src/System.Reactive/Subjects/Subject.cs:line 145
at Avalonia.Input.InputManager.ProcessInput(RawInputEventArgs e) in /_/src/Avalonia.Input/InputManager.cs:line 37
at Avalonia.X11.X11Window.<ScheduleInput>b__121_0() in /_/src/Avalonia.X11/X11Window.cs:line 740
at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority) in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 37
at Avalonia.X11.X11PlatformThreading.HandleX11(CancellationToken cancellationToken) in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 169
at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken) in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 245
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 61
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 126
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 175
at ICSharpCode.ILSpy.Program.Main(String[] args) in /home/kant/d/github/AvaloniaILSpy/ILSpy/Program.cs:line 22