G2 crash in gradient editor

@DavidRutten, G2 is crashing consistently in the gradient editor. To reproduce, turn on snapping with the magnet icon and drag control all the way to the right.

[ERROR] FATAL UNHANDLED EXCEPTION: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Grasshopper.UI.Numberline.TickLayout.<>c__DisplayClass31_0.<ToSnapSpace>g__Snap|1(Double x)
   at Grasshopper.UI.Snap.SnapSpace.Snap(Double x, Double y, Double cutoff, Double& xʹ, Double& yʹ, String& description)
   at Grasshopper.Types.Colour.GripGradientInteraction.MoveSelectedGrips(Double dx, Boolean snap)
   at Grasshopper.Types.Colour.GripGradientInteraction.RespondToMouseMove(MouseEventArgs e)
   at Grasshopper.UI.Gradient.GradientControl.MouseMoveHandler(Object sender, MouseEventArgs e)
   at Eto.PropertyStore.TriggerEvent[T](Object key, Object sender, T args)
   at Eto.Forms.Control.OnMouseMove(MouseEventArgs e)
   at Grasshopper.UI.Flex.FlexControl.OnMouseMove(MouseEventArgs e)
   at Eto.Forms.Control.Callback.OnMouseMove(Control widget, MouseEventArgs e)
   at Eto.Wpf.Forms.WpfFrameworkElement`3.HandleMouseMove(Object sender, MouseEventArgs e) in D:\BuildAgent\work\dujour\src4\DotNetSDK\Eto\src\Eto.Wpf\Forms\WpfFrameworkElement.cs:line 796
   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.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)
[END ERROR]
1 Like