# GH2: Curvature Display faults (NullReferenceException)

**URL:** <https://discourse.mcneel.com/t/gh2-curvature-display-faults-nullreferenceexception/225059>\
**Category:** Grasshopper2\
**Tags:** windows, grasshopper2-bug\
**Created:** [November 24, 2026, 3:10pm UTC](https://discourse.mcneel.com/t/gh2-curvature-display-faults-nullreferenceexception/225059 "2026-11-24T15:10:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gerard](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gerard/32/757794_2.png) [@Gerard](https://discourse.mcneel.com/u/Gerard)\
**Post date:** [November 24, 2026, 3:10pm UTC](https://discourse.mcneel.com/t/gh2-curvature-display-faults-nullreferenceexception/225059/1 "2026-11-24T15:10:49Z")

</div>

Hi David,

This is a GH2 bug report generated by Claude. Over here we are testing GH1 to GH2 conversions of scripts I made in the past and Claude does a very useful job for this.

@stevebaer, @brian, @CallumSykes, @Gijs , is it an idea that McNeel creates a Discourse place where we can upload posts generated by an AI agent? And that your AI agent is able to examine them?

This is the bug:

The **Curvature Display** component faults on the attached ship hull surface. On a sphere and on a plane it works fine.

[Curvature Display fault - hull surface.ghz](https://discourse.mcneel.com/uploads/short-url/o9uFRdd1Hnt7Mw70h2uuu7LRbfz.ghz) (19.1 KB)

[Hull surface (Rhino 8 format).3dm](https://discourse.mcneel.com/uploads/short-url/xZte6COA0f0jKx6rlSegSyfC0jc.3dm) (15.5 KB)

 ![Screenshot - canvas](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/9/8/7/987d485431e532e9a8db6c2f2413c4caafdebd21.png)

**To reproduce**

1. Open the attached `.ghz` (the surface is internalised in a Surface parameter).
2. The surface is connected to _Curvature Display \> Shape_, all other inputs are default.

**Result:** the component turns red and gives no mesh.  
**Expected:** a mesh coloured by curvature.

**Error**

```auto
NullReferenceException: Object reference not set to an instance of an object.
   at DisplayComponents.Analysis.CurvatureShader.HarvestCurvature(Surface surface, Mesh mesh, CurvatureKind kind, Double[]& k)
   at DisplayComponents.Analysis.CurvatureShader.ShapeToMesh(Object shape, Double absoluteTolerance, Double angularTolerance, CurvatureKind kind, Double[]& k)
   at DisplayComponents.Analysis.CurvatureShader.Process(IDataAccess access)
   at Grasshopper2.Components.Component.ComputeInternal(Solution solution, CallStack stack)
   at Grasshopper2.Doc.ActiveObject.ComputeAndAssign(ObjectSolutionState state, Solution solution, CallStack stack)

```

**Possible cause**  
The surface is a single untrimmed NURBS surface, degree 3 x 3, 10 x 9 control points, model units mm (about 100 m long). At one corner (u = max, v = min, point 92399.1, 0, 0) the first derivative in the U direction is almost zero (length about 2e-5). At exactly that corner RhinoCommon `Surface.CurvatureAt(u, v)` returns null; everywhere else it returns a value. My guess is that `HarvestCurvature` does not check for a null result.

This kind of corner is normal in ship hull surfaces. Grasshopper 1 colours the same surface by Gaussian curvature without problems.

**System**  
Rhino 9.1.26300.6001 (build date 27 Oct 2026), Grasshopper 2 from the same build, Windows 11 (10.0.26200).

\_SystemInfo:  
Rhino 9 SR1 2026-10-27 (Rhino 9, 9.1.26300.06001, Git hash:master @ d4917e26aa263f8c01aa5cc598b4c2d06e13e913)  
License type: Not For Resale Lab, build 2026-10-27  
License details: Cloud Zoo

Windows 11 (10.0.26200 SR0.0) or greater (Physical RAM: 31GB)  
.NET 10.0.15

Computer platform: DESKTOP

Standard graphics configuration using DirectX  
Primary display: NVIDIA RTX A2000 (NVidia) Memory: 6GB, Driver date: 7-10-2026 (M-D-Y). DirectX(11)

> Accelerated graphics device with 4 adapter port(s)

- Windows Main Display attached to adapter port #0
- Secondary monitor attached to adapter port #1

Secondary graphics devices.  
Intel(R) Graphics (Intel) Memory: 18GB, Driver date: 8-24-2026 (M-D-Y).

> Integrated graphics device with 4 adapter port(s)

- There are no monitors attached to this device!

DirectX Settings  
Safe mode: Off

OpenBLAS: OpenBLAS 0.3.30 DYNAMIC\_ARCH NO\_AFFINITY Haswell MAX\_THREADS=64.

Rhino plugins that do not ship with Rhino

Rhino plugins that ship with Rhino  
C:\Program Files\Rhino 9\Plug-ins\Commands.rhp “Commands” 9.1.26300.6001  
C:\Program Files\Rhino 9\Plug-ins\rdk.rhp “Renderer Development Kit”   
C:\Program Files\Rhino 9\Plug-ins\RhinoAI\net8.0\RhinoAI.rhp “RhinoAI” 9.1.26300.6001  
C:\Program Files\Rhino 9\Plug-ins\3dxRhino.9.rhp “3DxRhino.9”   
C:\Program Files\Rhino 9\Plug-ins\AnimationTools.rhp “AnimationTools”   
C:\Program Files\Rhino 9\Plug-ins\UpdatesAndStatistics\UpdatesAndStatistics.rhp “UpdatesAndStatistics” 9.1.26300.6001  
C:\Program Files\Rhino 9\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 9.1.26300.6001  
C:\Program Files\Rhino 9\Plug-ins\rdk\_etoui.rhp “RDK\_EtoUI” 9.1.26300.6001  
C:\Program Files\Rhino 9\Plug-ins\NamedSnapshots.rhp “Snapshots”   
C:\Program Files\Rhino 9\Plug-ins\MeshCommands.rhp “MeshCommands” 9.1.26300.6001  
C:\Program Files\Rhino 9\Plug-ins\IronPython\RhinoDLR\_Python.rhp “IronPython” 9.1.26300.6001  
C:\Program Files\Rhino 9\Plug-ins\RhinoCycles.rhp “RhinoCycles” 9.1.26300.6001  
C:\Program Files\Rhino 9\Plug-ins\Grasshopper\GrasshopperPlugin.rhp “Grasshopper” 9.1.26300.6001  
C:\Program Files\Rhino 9\Plug-ins\Displacement.rhp “Displacement”   
C:\Program Files\Rhino 9\Plug-ins\SectionTools.rhp “SectionTools”

Thanks,  
Gerard

---

<div class="post-metadata">

**Author:** ![CallumSykes](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/callumsykes/32/569341_2.png) [@CallumSykes](https://discourse.mcneel.com/u/CallumSykes)\
**Post date:** [November 24, 2026, 3:25pm UTC](https://discourse.mcneel.com/t/gh2-curvature-display-faults-nullreferenceexception/225059/2 "2026-11-24T15:25:11Z")

</div>

Hey @Gerard,

Thanks for reporting!

> [@Gerard](#):
>
> Over here we are testing GH1 to GH2 conversions of scripts I made in the past and Claude does a very useful job for this.

Have you had issues opening the GH1 scripts in GH2 and its conversion feature?

> [@Gerard](#):
>
> Is it an idea that McNeel creates a Discourse place where we can upload posts generated by an AI agent? And that your AI agent is able to examine them?

I almost wonder if we should create an MCP or extend the existing MCP so you can have Claude upload error reports somewhere like we have for our crash reports and skip the humans entirely 😉 .

YT : [RH-100617](https://mcneel.myjetbrains.com/youtrack/issue/RH-100617) Curvature Display NullReferenceException

---

<div class="post-metadata">

**Author:** ![Gerard](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gerard/32/757794_2.png) [@Gerard](https://discourse.mcneel.com/u/Gerard)\
**Post date:** [November 24, 2026, 3:30pm UTC](https://discourse.mcneel.com/t/gh2-curvature-display-faults-nullreferenceexception/225059/3 "2026-11-24T15:30:20Z")

</div>

> [@CallumSykes](#):
>
> I almost wonder if we should create an MCP or extend the existing MCP so you can have Claude upload error reports somewhere like we have for our crash reports and skip the humans entirely

exactly, that’s my idea too. With some proper instructions for the users who run an Agent for doing so.

---

<div class="post-metadata">

**Author:** ![Gerard](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gerard/32/757794_2.png) [@Gerard](https://discourse.mcneel.com/u/Gerard)\
**Post date:** [November 24, 2026, 3:31pm UTC](https://discourse.mcneel.com/t/gh2-curvature-display-faults-nullreferenceexception/225059/4 "2026-11-24T15:31:46Z")

</div>

> [@CallumSykes](#):
>
> Have you had issues opening the GH1 scripts in GH2 and its conversion feature?

Yes, it does a great job and then there are many details that I train my Agent to update my scripts.  
We can make a report about what we found if you like.

---

<div class="post-metadata">

**Author:** ![CallumSykes](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/callumsykes/32/569341_2.png) [@CallumSykes](https://discourse.mcneel.com/u/CallumSykes)\
**Post date:** [November 24, 2026, 3:45pm UTC](https://discourse.mcneel.com/t/gh2-curvature-display-faults-nullreferenceexception/225059/5 "2026-11-24T15:45:41Z")

</div>

AH so it’s a collab of both to get it all working and sorted, but ultimately you can make what you need to work, work? 🙂

---

<div class="post-metadata">

**Author:** ![Gerard](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gerard/32/757794_2.png) [@Gerard](https://discourse.mcneel.com/u/Gerard)\
**Post date:** [November 24, 2026, 3:46pm UTC](https://discourse.mcneel.com/t/gh2-curvature-display-faults-nullreferenceexception/225059/6 "2026-11-24T15:46:43Z")

</div>

Well, I just posted this about our overall findings with Rhino 9 and GH1 and GH2:

> [@AI/Rhino challenges" of 30 Oct (Rhino, AI)](https://discourse.mcneel.com/t/ai-rhino-challenges-of-30-oct-rhino-ai/225061):
>
> Hi all, This is a follow-up to my topic [AI/Rhino challenges](https://discourse.mcneel.com/t/ai-rhino-challenges/224108). @CallumSykes asked there what Claude ran into. Here is a fuller answer than I could give then. Over the last weeks I worked with Claude through the Rhino MCP server on real jobs: reverse engineering and fairing ship hull surfaces, and maintaining Grasshopper 1 hull scripts and converting one of them to Grasshopper 2. Most things could be done in the end. Along the way we kept a list of every point where the agent was held back: 33 i…
