I am not entirely sure what I did to cause this and I can't figure out steps to reproduce. I was trying to shrink my dock from a very large iconsize down to a smaller size. It didn't seem to be responding and then when I stopped dragging Do crashed.
Marshaling drag_failed signal
Exception in Gtk# callback delegate
Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
at System.Collections.Generic.List`1[System.Object].get_Item (Int32 index) [0x00000]
at System.Collections.ObjectModel.ReadOnlyCollection`1[Docky.Interface.AbstractDockItem].get_Item (Int32 index) [0x00000]
at Docky.Core.Default.ItemsService.ItemCanBeRemoved (Int32 item) [0x00000]
at Docky.Interface.DnDTracker.HandleDragFailed (System.Object o, Gtk.DragFailedArgs args) [0x00000]
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000]
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000]
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000]
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000]
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000]
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000]
at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000]
at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000]
at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000]
at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
at Gtk.Application.gtk_main()
at Gtk.Application.Run()
at Do.Do.Main(System.String[] args)
My best guess is that somehow when Docky.Interface .DnDTracker. HandleDragFaile d calls DockItems.IndexOf (DragState. DragItem) this returned -1. So somehow in all my clicking I must have caused a drop to occur on something that was recently removed? Perhaps a simple check in the drag handlers to ensure the DragState.DragItem exists?