BUG CSharp code Editor crash in Rhino 8

Hi to everyone! I’m new to C# scripting and I’m encountering a problem when writing in the C# script component inside Grasshopper :upside_down_face:. I’m currently using Rhino version 8.9.24194.18121. Rhino crashes specifically when I try to write a certain part of my code. Here is the code where the crash occurs, I have highlited the part when it crashes:

    private void RunScript(
        Surface iSurface,
        List<Curve> iCurves,
        double iRadius,
        int iIterations,
        double iTolerance,
        ref object oNumberOfIntersections,
        ref object oIntersectionPoint)
    {
        var intersectionEvents = Rhino.Geometry.Intersect.Intersection.CurveCurve(iCurves[0], iCurves[1], iTolerance, iTolerance);
        if (intersectionEvents!=null)
        {
            int numberOfIntersections = intersectionEvents.Count;
            if (numberOfIntersections == 1)
            {
                if (intersectionEvents[0].IsPoint)
                {
                    Point3d point = intersectionEvents[0].PointA;
                    oIntersectionPoint = point;
                }
            }

        }
    }
    // Rhino crashes when writing here, this comment was added inside the post
}

I also attach an image for more clarity:

Has anyone else experienced similar issues or knows a solution?
Thanks in advance :melting_face:!

Here’s a recording of the bug occurring:


Here’s also the file that I’m using:
CRASH.gh (14.9 KB)

Thank you for reporting this, I have created a Youtrack issue for this at https://mcneel.myjetbrains.com/youtrack/issue/RH-83060

1 Like

RH-83060 is fixed in Rhino 8 Service Release 10

2 Likes

Thank you so much @menno and @brian and the developers!

1 Like