Creating new specific window materials crashes Revit

Hey everyone, again writing here! I noticed a bug while setting up the construction manager. I created a specific window material for a particular window in my model and every time I try to recall it in the construction manager Revit crashes. Any idea on how to solve this?

Down here the revit error and I cannot upload the log as new user

Thanks!

Data/Ora: 2023-11-10 15:50:02 +01:00
Applicazione: Revit.exe
Errore: Access violation - code c0000005 (first/second chance not available)
Nome modulo con arresto anomalo: mscorlib.dll
Indirizzo eccezione: 0x00007ff99846b563
Codice eccezione: c0000005
Flag eccezione: 80
Parametri eccezione: 0, 0
Tipo di eccezione gestita: System.NullReferenceException
Indirizzo eccezione gestita: 0x000001e7d7b6e370

Hi @therealtorte,

Thank you for reporting this issue. Can you help us to recreate the error? Will this happen with any window material? If you can tell us about the minimum steps to recreate it we should be able to fix it for you.

Sure! I am using Revit 2024 with updated plugin. Under Material Manager I am perfectly able to create “Ploycarbonate” material and I see it in the materials list. Then I open the Construction Manager and duplicate a window. When I edit the duplicate, I remove the original material from the list and as soon as I click on the newly created material to insert it in the construction, it crashes. It doesn’t even let me move in in the list, it crashes as soon as I touch it.

Thank you for the explanation. I wasn’t able to recreate the issue on my end. Can you take a screenshot of the “Ploycarbonate” material? I wonder if there is something with the material that causes the issue.

There you go!

Thanks! Now I can recreate the issue both in Rhino and Revit.

@mingbo, here is the error message.

PO.V1.36.0.0 (Oct 30, 2023)
System.NullReferenceException: Object reference not set to an instance of an object.
   at HoneybeeSchema.EnergyWindowMaterialGlazing.ToString(Boolean detailed)
   at Honeybee.UI.Dialog_Construction.<>c__DisplayClass31_1.<.ctor>b__9(Object s, EventArgs e)
   at Eto.PropertyStore.TriggerEvent[T](Object key, Object sender, T args)
   at Eto.Forms.Grid.OnSelectionChanged(EventArgs e)
   at Eto.Forms.Grid.Callback.OnSelectionChanged(Grid widget, EventArgs e)
   at Eto.Wpf.Forms.Controls.GridHandler`2.<AttachEvent>b__22_4(Object sender, SelectedCellsChangedEventArgs e) in D:\BuildAgent\work\commercial\src4\DotNetSDK\Eto\src\Eto.Wpf\Forms\Controls\GridHandler.cs:line 209
   at System.Windows.Controls.DataGrid.OnSelectedCellsChanged(SelectedCellsChangedEventArgs e)
   at System.Windows.Controls.DataGrid.NotifySelectedCellsChanged()
   at System.Windows.Controls.DataGrid.ChangingSelectedCellsHelper.Dispose()
   at System.Windows.Controls.DataGrid.MakeFullRowSelection(ItemInfo info, Boolean allowsExtendSelect, Boolean allowsMinimalSelect)
   at System.Windows.Controls.DataGrid.HandleSelectionForCellInput(DataGridCell cell, Boolean startDragging, Boolean allowsExtendSelect, Boolean allowsMinimalSelect)
   at System.Windows.Controls.DataGridCell.OnAnyMouseLeftButtonDown(MouseButtonEventArgs e)
   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.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
   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)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Window.ShowHelper(Object booleanBox)
   at System.Windows.Window.ShowDialog()
   at Eto.Wpf.Forms.DialogHandler.ShowModal() in D:\BuildAgent\work\commercial\src4\DotNetSDK\Eto\src\Eto.Wpf\Forms\DialogHandler.cs:line 67
   at Honeybee.UI.ConstructionManagerViewModel.ShowConstructionDialog(IConstruction c, Boolean isIDEditable)
   at Honeybee.UI.ConstructionManagerViewModel.<get_DuplicateCommand>b__29_0()
   at Eto.Forms.RelayCommand`1.Execute(Object parameter)
   at Eto.PropertyStore.TriggerEvent[T](Object key, Object sender, T args)
   at Eto.Forms.Button.OnClick(EventArgs e)
   at Eto.Forms.Button.Callback.OnClick(Button widget, EventArgs e)
   at 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:line 69
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   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.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.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)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Window.ShowHelper(Object booleanBox)
   at System.Windows.Window.ShowDialog()
   at Eto.Wpf.Forms.DialogHandler.ShowModal() in D:\BuildAgent\work\commercial\src4\DotNetSDK\Eto\src\Eto.Wpf\Forms\DialogHandler.cs:line 67
   at Eto.Forms.Dialog`1.ShowModal(Control owner)
   at Pollination.RH.RhinoCommands.PO_ConstructionManager.ResourceManager(RhinoDoc doc)
   at Pollination.RH.RhinoCommands.PO_ConstructionManager.RunCommand(RhinoDoc doc, RunMode mode)

Hi @therealtorte and @mostapha thanks for reporting issues, I am able to recreate it on my end and just pushed a fix. It will be ready in the next release.

I forgot to update this discussion but this has been resolved in the latest releases of the Rhino and Revit plugins.