Pollination crashes Rhino while editing Window

Hi all,

tried to edit a double pane window towards a triple.
When I drop an generic air gab this notice appears.
Working a bit back and forth Rhino crashes without creating a recovery file => all data gone since last save…

Pollination Rhino Plugin: 1.8.1.0 (08/12/2022)
System.ArgumentOutOfRangeException: Der Index lag außerhalb des Bereichs. Er darf nicht negativ und kleiner als die Sammlung sein.
Parametername: index
   bei System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   bei HoneybeeSchema.ConstrucitonThermalCalculator.Cal_layered_r_value_initial(Int32 gap_count, List`1& r_vals, List`1& emiss, Double delta_t_guess, Double avg_t_guess, Double wind_speed)
   bei HoneybeeSchema.ConstrucitonThermalCalculator.CalWindowValues(List`1 materials, Double& RValue, Double& RFactor, Double& solarT, Double& SHGC, Double& vt)
   bei HoneybeeSchema.WindowConstructionAbridged.CalThermalValues(ModelEnergyProperties libSource)
   bei Honeybee.UI.Dialog_Construction.CalRValue(IConstruction c, Boolean ShowIPUnit)
   bei Eto.PropertyStore.TriggerEvent[T](Object key, Object sender, T args)
   bei Eto.Forms.Control.OnDragDrop(DragEventArgs e)
   bei Eto.Forms.Control.Callback.OnDragDrop(Control widget, DragEventArgs e)
   bei Eto.Wpf.Forms.WpfFrameworkElement`3.HandleDrop(DragEventArgs e, DragEventArgs args) in D:\BuildAgent\work\commercial\src4\DotNetSDK\Eto\src\Eto.Wpf\Forms\WpfFrameworkElement.cs:Zeile 684.
   bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   bei System.Windows.OleDropTarget.RaiseDragEvent(RoutedEvent dragEvent, Int32 dragDropKeyStates, Int32& effects, DependencyObject target, Point targetPoint)
   bei System.Windows.OleDropTarget.MS.Win32.UnsafeNativeMethods.IOleDropTarget.OleDrop(Object data, Int32 dragDropKeyStates, Int64 point, Int32& effects)
   bei MS.Win32.UnsafeNativeMethods.DoDragDrop(IDataObject dataObject, IOleDropSource dropSource, Int32 allowedEffects, Int32[] finalEffect)
   bei System.Windows.OleServicesContext.OleDoDragDrop(IDataObject dataObject, IOleDropSource dropSource, Int32 allowedEffects, Int32[] finalEffect)
   bei System.Windows.DragDrop.OleDoDragDrop(DependencyObject dragSource, DataObject dataObject, DragDropEffects allowedEffects)
   bei System.Windows.DragDrop.DoDragDrop(DependencyObject dragSource, Object data, DragDropEffects allowedEffects)
   bei Eto.Wpf.Forms.WpfFrameworkElement`3.DoDragDrop(DataObject data, DragEffects allowedAction, Image image, PointF offset) in D:\BuildAgent\work\commercial\src4\DotNetSDK\Eto\src\Eto.Wpf\Forms\WpfFrameworkElement.cs:Zeile 1000.
   bei Eto.Forms.Control.DoDragDrop(DataObject data, DragEffects allowedEffects)
   bei Honeybee.UI.Dialog_Construction.<>c__DisplayClass32_1.<.ctor>b__9(Object sender, MouseEventArgs e)
   bei Eto.PropertyStore.TriggerEvent[T](Object key, Object sender, T args)
   bei Eto.Forms.Control.OnMouseMove(MouseEventArgs e)
   bei Eto.Forms.Control.Callback.OnMouseMove(Control widget, MouseEventArgs e)
   bei Eto.Wpf.Forms.WpfFrameworkElement`3.HandleMouseMove(Object sender, MouseEventArgs e) in D:\BuildAgent\work\commercial\src4\DotNetSDK\Eto\src\Eto.Wpf\Forms\WpfFrameworkElement.cs:Zeile 796.
   bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   bei System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   bei System.Windows.Input.InputManager.ProcessStagingArea()
   bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   bei System.Windows.Window.ShowHelper(Object booleanBox)
   bei System.Windows.Window.ShowDialog()
   bei Eto.Wpf.Forms.DialogHandler.ShowModal() in D:\BuildAgent\work\commercial\src4\DotNetSDK\Eto\src\Eto.Wpf\Forms\DialogHandler.cs:Zeile 67.
   bei Honeybee.UI.ConstructionManagerViewModel.ShowConstructionDialog(IConstruction c)
   bei Eto.Forms.RelayCommand`1.Execute(Object parameter)
   bei Eto.PropertyStore.TriggerEvent[T](Object key, Object sender, T args)
   bei Eto.Forms.Button.OnClick(EventArgs e)
   bei Eto.Forms.Button.Callback.OnClick(Button widget, EventArgs e)
   bei Eto.Wpf.Forms.Controls.ButtonHandler`3.<Initialize>b__14_0(Object sender, RoutedEventArgs e) in D:\BuildAgent\work\commercial\src4\DotNetSDK\Eto\src\Eto.Wpf\Forms\Controls\ButtonHandler.cs:Zeile 69.
   bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   bei System.Windows.Controls.Primitives.ButtonBase.OnClick()
   bei System.Windows.Controls.Button.OnClick()
   bei System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   bei System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   bei System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   bei System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   bei System.Windows.Input.InputManager.ProcessStagingArea()
   bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   bei System.Windows.Window.ShowHelper(Object booleanBox)
   bei System.Windows.Window.ShowDialog()
   bei Eto.Wpf.Forms.DialogHandler.ShowModal() in D:\BuildAgent\work\commercial\src4\DotNetSDK\Eto\src\Eto.Wpf\Forms\DialogHandler.cs:Zeile 67.
   bei Pollination.RH.RhinoCommands.PO_EnergyConstructions.ResourceManager(RhinoDoc doc)
   bei Pollination.RH.RhinoCommands.PO_EnergyConstructions.RunCommand(RhinoDoc doc, RunMode mode)

Hi, @martin6! Hmm. I haven’t seen a crash for some time. Can you provide a bit more information for recreating this on our end?

Well nothing special
Open construction manager. Copy double pane. Drag Generic air gap as 4th element. Some other glass as fifth. Save. Reopen try to change again. Delete and do again.
Something like that caused the crash.
I’m sorry I really can’t say how exactly any more. :worried:

Thank you @martin6, I can recreate this issue on my side.

Ok, this is because the construction becomes an invalid construction when adding a gas-type material at the end of the material list, and it failed to calculate the thermal property values. I just pushed a fix to catch this situation. There should be a new version an hour later. Thank you @martin6 again for reporting this issue.