Bug Report: RhinoCommon API Crashes (Rhino 8)

While testing RhinoCommon APIs, I discovered several APIs that cause Rhino to crash or throw unhandled exceptions. These issues occur with minimal, straightforward code.

var v = new Vector2f(1.0f, 0.0f);
var other = new Vector2f(0.0f, 1.0f);
bool result = v.PerpendicularTo(other);
var q = new Quaternion(1, 0, 0, 0);
double alpha, beta, gamma;
bool result = q.GetEulerZYZ(out alpha, out beta, out gamma);
var q = new Quaternion(1, 0, 0, 0);
double yaw, pitch, roll;
bool result = q.GetYawPitchRoll(out yaw, out pitch, out roll);

var mesh = Mesh.CreateFromBox(new BoundingBox(Point3d.Origin, new Point3d(10, 10, 10)), 5, 5, 5);
mesh.Normals.ComputeNormals();
mesh.Compact();

var origCount = mesh.Faces.Count;
var prms = new ReduceMeshParameters();
prms.DesiredPolygonCount = origCount / 2;
prms.AllowDistortion = true;
var result = mesh.Reduce(prms, false);  // NullReferenceException: Object reference not set to an instance of an object.
SystemInfo

Rhino 8 SR25 2025-11-24 (Rhino 8, 8.25.25328.11001, Git hash:master @ 14cb4406ecadfa9b5d0230ac10bd86175bd37aff)
License type: Educational, build 2025-11-24
License details: Cloud Zoo

Windows 11 (10.0.26100 SR0.0) or greater (Physical RAM: 62GB)
.NET 8.0.22

Computer platform: DESKTOP (Hosting Remote Desktop session)

Standard graphics configuration.
Primary display: Microsoft Remote Display Adapter (Microsoft) Memory: 0MB, Driver date: 6-21-2006 (M-D-Y).

Remote Desktop display device with 16 connection(s)

  • Windows Main Display using connection 0
    Primary OpenGL: NVIDIA GeForce RTX 5070 (NVidia) Memory: 12GB, Driver date: 10-9-2025 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 581.57

Accelerated graphics device with 0 adapter port(s)

  • There are no monitors attached to this device!

Secondary graphics devices.
AMD Radeon™ Graphics (AMD) Memory: 2GB, Driver date: 11-6-2025 (M-D-Y).

Accelerated graphics device with 0 adapter port(s)

  • There are no monitors attached to this device!

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
GPU Tessellation is: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)

Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 10-9-2025
Driver Version: 32.0.15.8157
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 12227 MB

Rhino plugins that do not ship with Rhino
C:\Program Files\McNeel\Rhinoceros\8.0\Plug-ins\D5LiveSync (e0d5e210-02f6-4ee9-a2b0-1675e225d958)\D5Conv.rhp “D5 Live Sync for Rhino”
C:\ProgramData\McNeel\Rhinoceros\8.0\Plug-ins\Datasmith Rhino Exporter (d1fdc795-b334-4933-b680-088119cdc6bb)\DatasmithRhino8.rhp “Datasmith Exporter” 5.6.1.0
C:\Program Files\Chaos\V-Ray\V-Ray for Rhinoceros\V8\VRayForRhino.rhp “V-Ray for Rhino”

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 8\Plug-ins\Commands.rhp “Commands” 8.25.25328.11001
C:\Program Files\Rhino 8\Plug-ins\WebBrowser.rhp “WebBrowser”
C:\Program Files\Rhino 8\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 8\Plug-ins\RhinoScript.rhp “RhinoScript”
C:\Program Files\Rhino 8\Plug-ins\IdleProcessor.rhp “IdleProcessor”
C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 8.25.25328.11001
C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 8.25.25328.11001
C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp “MeshCommands” 8.25.25328.11001
C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp “RhinoCycles” 8.25.25328.11001
C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 8.25.25328.11001
C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp “Displacement”
C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp “SectionTools”

Thank you, I have created a YouTrack item for this RH-90896

1 Like