AccessViolationException CRhinoUnroll_CreateFlatBreps (BUG?)

hello hello back with a problem.

Problem:
I’m encountering a System.AccessViolationException when running my custom plugin via Rhino.Compute. The same plugin runs without any issues inside Rhino Desktop (Rhino 8).


Error Output:

G  [15:33:45 DBG] Setting input values  
CG  [15:33:45 DBG] Solving definition...  
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.  
Repeat 2 times:  
--------------------------------  
   at UnsafeNativeMethods.CRhinoUnroll_CreateFlatBreps(IntPtr, Double, Int32 ByRef, Int32 ByRef, Int32 ByRef, Int32 ByRef)  
--------------------------------  
   at Rhino.Geometry.Unroller.PerformUnroll(Rhino.Geometry.Curve[] ByRef, Rhino.Geometry.Point3d[] ByRef, Rhino.Geometry.TextDot[] ByRef)  
   at Parapet.Lib.Crown.Crown.UnrollBrepAndProcess(...)  
   at Parapet.Components.CrownGenerators.GH_CrownBase.SolveInstance(...)  

Context:

  • Compute version: 8.0.0.0
  • Rhino version: 8.20.25157.13001
  • Plugin targets: .NET Framework 4.8 and .NET 7.0
  • Observed behavior:
    • Runs fine within Rhino 8 (desktop).
    • Crashes with AccessViolationException in Compute when calling Unroller.PerformUnroll(...).

What I’ve Tried:

  • Upgraded all RhinoCommon/NuGet packages to latest versions.
  • Tried forcing Rhino to use .NET 7.0 instead of 8.0.
  • Verified the input Breps and Curves are valid before passing them to Unroller.

Has anyone an idea why? Or is it a bug?

Thanks already in advance

I uninstalled Rhino 8.20xx and downgraded to 8.16xx and it works again. I didn’t change anything related to Rhino.Compute, so my suspicion is that the issue is caused by Rhino 8.20xx using .NET 8.0 as the default?