Construction Manager Error: Object reference not set to an instance of an object

I am creating a new construction from scratch in the Construction Manager. I have create several Materials by duplicating existing Materials that were close and setting my own thickness and conductivity. However, when I combine these materials into a Wall Assembly I receive the following error:

System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Object.GetType()
   at HoneybeeSchema.Extension.AddMaterial(ModelEnergyProperties modelEnergyCollection, IMaterial material)
   at HoneybeeSchema.Extension.AddMaterials(ModelEnergyProperties modelEnergyCollection, IEnumerable`1 materials)
   at Honeybee.UI.ConstructionViewData.CheckResources(ModelEnergyProperties libSource)
   at Honeybee.UI.ConstructionManagerViewModel.AddUserData(IConstruction item)
   at Honeybee.UI.ConstructionManagerViewModel.ShowConstructionDialog(IConstruction c)
   at Honeybee.UI.ConstructionManagerViewModel.<get_AddOpaqueConstructionCommand>b__16_0()
   at Eto.Forms.RelayCommand`1.Execute(Object parameter)
   at Eto.Forms.MenuItem.OnClick(EventArgs e)
   at Eto.Forms.MenuItem.Callback.OnClick(MenuItem widget, EventArgs e)
   at Eto.Wpf.Forms.Menu.MenuItemHandler`3.OnClick() in D:\BuildAgent\work\commercial\src4\DotNetSDK\Eto\src\Eto.Wpf\Forms\Menu\MenuItemHandler.cs:line 34
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
   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.DispatcherOperation.InvokeImpl()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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 60
   at Pollination.RH.RhinoCommands.PO_EnergyConstructions.ResourceManager(RhinoDoc doc)
   at Pollination.RH.RhinoCommands.PO_EnergyConstructions.RunCommand(RhinoDoc doc, RunMode mode)

Here is the Construction Schema:

{
  "type": "OpaqueConstructionAbridged",
  "materials": [
    "Stone Face 8in",
    "Generic Brick 12in",
    "Wall Air Gap 1in",
    "Clay Blocks 4in",
    "Gypsum Or Plaster Board 1in"
  ],
  "identifier": "New Opaque Construction fec27",
  "display_name": "Yale Kirtland Hall"
}

Stone Face

{
  "roughness": "MediumRough",
  "type": "EnergyMaterial",
  "thickness": 0.2032,
  "conductivity": 2.5,
  "density": 1920.0,
  "specific_heat": 790.0,
  "thermal_absorptance": 0.9,
  "solar_absorptance": 0.65,
  "visible_absorptance": 0.65,
  "identifier": "Stone Face 8in",
  "display_name": "Stone Face 8in"
}

Brick

{
  "roughness": "MediumRough",
  "type": "EnergyMaterial",
  "thickness": 0.3048,
  "conductivity": 0.9,
  "density": 1920.0,
  "specific_heat": 790.0,
  "thermal_absorptance": 0.9,
  "solar_absorptance": 0.65,
  "visible_absorptance": 0.65,
  "identifier": "Generic Brick 12in",
  "display_name": "Generic Brick 12in"
}

Air Gap

{
  "roughness": "Smooth",
  "type": "EnergyMaterial",
  "thickness": 0.0254,
  "conductivity": 0.667,
  "density": 1.28,
  "specific_heat": 1000.0,
  "thermal_absorptance": 0.9,
  "solar_absorptance": 0.7,
  "visible_absorptance": 0.7,
  "identifier": "Wall Air Gap 1in",
  "display_name": "Wall Air Gap 1in"
}

Clay Blocks

{
  "roughness": "MediumSmooth",
  "type": "EnergyMaterial",
  "thickness": 0.1016,
  "conductivity": 1.0,
  "density": 1800.0,
  "specific_heat": 920.0,
  "thermal_absorptance": 0.9,
  "solar_absorptance": 0.65,
  "visible_absorptance": 0.65,
  "identifier": "Clay Blocks 4in",
  "display_name": "Clay Blocks 4in"
}

Plaster

{
  "roughness": "MediumSmooth",
  "type": "EnergyMaterial",
  "thickness": 0.0254,
  "conductivity": 0.57961212171595045,
  "density": 800.00182919117651,
  "specific_heat": 1089.2971854559414,
  "thermal_absorptance": 0.9,
  "solar_absorptance": 0.7,
  "visible_absorptance": 0.7,
  "identifier": "Gypsum Or Plaster Board 1in",
  "display_name": "Gypsum Or Plaster Board 1in"
}

Hi @justinshultz, this was an issue in the older version, have you tried the new version? I did a test with your data here, I can’t reproduce this issue.

1 Like

Hi @mingbo, I downloaded and reinstalled the plugin from the below post last week. Is the download link not updated? If not, where can I always find the most recent download?

Hi @justinshultz, it is the same link. It always points you to the latest installer.

@mingbo I have reinstalled the Rhino Plugin and noticed several UI changes right away. I must have still been running an older version of the Rhino Plugin. Hopefully the new Plugin will alleviate the problems I had. Thank you for bringing to my attention that I was running an older version unexpectedly.

1 Like

Please let me know if everything works as expected.

No problems with the Construction Manager using the new plugin. Thank you all for the hard work!

1 Like