Error in Component for custom type preview after moving to Rhino 8

The component was written for a plugin in Rhino 7 (.NET Framework 4.8) and worked correctly. After the plugin with this component moved to Rhino 8 (.NET 7), the component started throwing an error. The error that the component displays sounds like “After Solution exception: Object reference not set to an instance of an object.” It is important that the component still produces the correct result, but at the same time shows an error regardless of whether the wires are connected to it or the inputs are empty.

0002

The component inherits the GH_CustomPreviewComponent class

The following methods are overridden in the Component:
AppendRenderGeometry
BeforeSolveInstance
DrawViewportMeshes
DrawViewportWires
BakeGeometry

I tried to catch the error, but Debugging did not give any results. I disabled “Enable Just My Code” in Visual Studio in Options, in this case the debug stops in System.Windows.Forms in the Control class on the OnMouseUp method inside the WmMouseUp method.

If anyone knows what could be wrong or what I should pay attention to, I would be very grateful.

Hi @p-e-t-e-r,

There is an already filled issue about this topic.
It is in progress, will be fixed on the next RC.

1 Like