Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random Crash #530

Open
Tyman2007 opened this issue Apr 14, 2019 · 3 comments
Open

Random Crash #530

Tyman2007 opened this issue Apr 14, 2019 · 3 comments
Labels

Comments

@Tyman2007
Copy link

Tyman2007 commented Apr 14, 2019

The steps recreated are unknown. Basically just have it open then use it for a bit. Here are a couple:

Exception: System.InvalidOperationException: Failed to compare two elements in the array. ---> System.ArgumentException: At least one object must implement IComparable.
   at System.Collections.Comparer.Compare(Object a, Object b)
   at MS.Internal.Data.SortFieldComparer.Compare(Object o1, Object o2)
   at System.Array.BinarySearch(Array array, Int32 index, Int32 length, Object value, IComparer comparer)
   --- End of inner exception stack trace ---
   at System.Array.BinarySearch(Array array, Int32 index, Int32 length, Object value, IComparer comparer)
   at System.Collections.ArrayList.BinarySearch(Int32 index, Int32 count, Object value, IComparer comparer)
   at MS.Internal.Data.DataExtensionMethods.Search(IList list, Int32 index, Int32 count, Object value, IComparer comparer)
   at System.Windows.Data.ListCollectionView.AdjustBefore(NotifyCollectionChangedAction action, Object item, Int32 index)
   at System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
   at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)
   at POESKillTree.TreeGenerator.ViewModels.AdvancedTabViewModel.<get_AddPseudoConstraintCommand>b__77_0() in C:\Users\Sören\git\PoESkillTreeEmmitJ\WPFSKillTree\TreeGenerator\ViewModels\AdvancedTabViewModel.cs:line 483
   at POESKillTree.Common.ViewModels.RelayCommand.<>c__DisplayClass0_0.<.ctor>b__0(Object _) in C:\Users\Sören\git\PoESkillTreeEmmitJ\WPFSKillTree\Common\ViewModels\RelayCommand.cs:line 18
   at POESKillTree.Common.ViewModels.RelayCommand`1.Execute(T parameter) in C:\Users\Sören\git\PoESkillTreeEmmitJ\WPFSKillTree\Common\ViewModels\RelayCommand.cs:line 107
   at POESKillTree.Common.ViewModels.AbstractRelayCommand`1.Execute(Object parameter) in C:\Users\Sören\git\PoESkillTreeEmmitJ\WPFSKillTree\Common\ViewModels\RelayCommand.cs:line 79
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Exception: System.ArgumentException: At least one object must implement IComparable.
   at System.Collections.Comparer.Compare(Object a, Object b)
   at MS.Internal.Data.SortFieldComparer.Compare(Object o1, Object o2)
   at System.Array.BinarySearch(Array array, Int32 index, Int32 length, Object value, IComparer comparer)
Exception: System.InvalidOperationException: Failed to compare two elements in the array. ---> System.ArgumentException: At least one object must implement IComparable.
   at System.Collections.Comparer.Compare(Object a, Object b)
   at MS.Internal.Data.SortFieldComparer.Compare(Object o1, Object o2)
   at System.Array.BinarySearch(Array array, Int32 index, Int32 length, Object value, IComparer comparer)
   --- End of inner exception stack trace ---
   at System.Array.BinarySearch(Array array, Int32 index, Int32 length, Object value, IComparer comparer)
   at System.Collections.ArrayList.BinarySearch(Int32 index, Int32 count, Object value, IComparer comparer)
   at MS.Internal.Data.DataExtensionMethods.Search(IList list, Int32 index, Int32 count, Object value, IComparer comparer)
   at System.Windows.Data.ListCollectionView.AdjustBefore(NotifyCollectionChangedAction action, Object item, Int32 index)
   at System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
   at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)
   at POESKillTree.TreeGenerator.ViewModels.AdvancedTabViewModel.<get_AddPseudoConstraintCommand>b__77_0() in C:\Users\Sören\git\PoESkillTreeEmmitJ\WPFSKillTree\TreeGenerator\ViewModels\AdvancedTabViewModel.cs:line 483
   at POESKillTree.Common.ViewModels.RelayCommand.<>c__DisplayClass0_0.<.ctor>b__0(Object _) in C:\Users\Sören\git\PoESkillTreeEmmitJ\WPFSKillTree\Common\ViewModels\RelayCommand.cs:line 18
   at POESKillTree.Common.ViewModels.RelayCommand`1.Execute(T parameter) in C:\Users\Sören\git\PoESkillTreeEmmitJ\WPFSKillTree\Common\ViewModels\RelayCommand.cs:line 107
   at POESKillTree.Common.ViewModels.AbstractRelayCommand`1.Execute(Object parameter) in C:\Users\Sören\git\PoESkillTreeEmmitJ\WPFSKillTree\Common\ViewModels\RelayCommand.cs:line 79
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Exception: System.ArgumentException: At least one object must implement IComparable.
   at System.Collections.Comparer.Compare(Object a, Object b)
   at MS.Internal.Data.SortFieldComparer.Compare(Object o1, Object o2)
   at System.Array.BinarySearch(Array array, Int32 index, Int32 length, Object value, IComparer comparer)
@brather1ng brather1ng added the bug label Apr 16, 2019
@brather1ng
Copy link
Member

I tried and failed reproducing this. The stack trace also doesn't make much sense to me because it indicates the crash happens when adding pseudo attribute constraints and that they are not comparable as required for sorting. The first doesn't fit your description of random crashes and the sorting behavior used should make sure pseudo attributes are always comparable.

Do you recall any details on what kind of actions you did that lead to crashes?
Does it occur rarely enough that I might have simply not played around with the program enough?
Could you provide me with a build file it happens on or is switching builds one of the things you have to do to get it to crash?
If you have customized your pseudo attribute xmls, it would be great if you could add them here so I can try to reproduce it with them.

@Tyman2007
Copy link
Author

Tyman2007 commented May 14, 2019

I did modify my pseudoattributes. Specifically damage.xml https://pastebin.com/q7r6R12M

I use the advanced generator a lot. Been about a month since I've messed around with anything so I don't remember the exact scenarios atm. iirc these would just happen at pretty much any time, but there's a strong chance it's involved with the advanced generator/pseudo attributes I have looking at it.

The crash isn't very consistent though.

@brather1ng
Copy link
Member

Still couldn't reproduce it and have no idea what might cause it. Maybe it'll happen randomly while debugging other stuff at some point.

If it happens again to you, please add the build it happened on. Might be related to that specific build, generator settings and/or pseudo attribute combination.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants