System.AccessViolationException at Curve.ToNurbsCurve()

@dale @stevebaer @andyopayne

I am running a rhino.compute project on Kubernetes and I am encountering the error System.AccessViolationException at Rhino.Geometry.Curve.ToNurbsCurve(). I am using RhinoCommon version 7.0.20314.3001 in custom code and rhino inside version 7.0 in compute.geometry. is there a way to avoid this?

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at UnsafeNativeMethods.ON_Curve_NurbsCurve(IntPtr pCurve, Double tolerance, Interval subDomain, Boolean ignoreSubDomain)
   at Rhino.Geometry.Curve.ToNurbsCurve()
   at Rhino.Geometry.Line.ToNurbsCurve()
   at Airteam.Objects.
   at Airteam.Objects.
   at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>)
   at System.Threading.Tasks.Task.Execute()
   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.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
   at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

Thanking you in advance
Arjun Sharma

You probably should first update to the very latest release of Rhino 7 and RhinoCommon - for both that’d be 7.38, but even 7.37 should be fine - and see if the issue still happens with that.