Crash Grasshopper in sweep2(by start and end /Point)

in Rhino 7, 7.14.21362.1300 sweep2 in c# in run crash rhino and grasshopper
but in Rhino 7 SR14 2021-11-23 (Rhino 7, 7.14.21327.17001 it is ok


in Rhino 7 SR14 2021-11-23 (Rhino 7, 7.14.21327.1700

in Rhino 7, 7.14.21362.1300
sweep2.gh (18.3 KB)

Hi @Rh-3d-p,

Thanks for reporting. This will be fixed in next week’s SR14 release candidate.

https://mcneel.myjetbrains.com/youtrack/issue/RH-66839

– Dale

RH-66839 is fixed in Rhino 7 Service Release 14

1 Like

Hi, is there a chance this fix might have broken the CreateFromSweep() function when activated in Grasshopper through Rhino.Inside?

In particular, I have the Sweep2 component (and nothing else) inserted in a GH definition with some simple internalized lines as input:

image

When this component is asked to compute itself from Rhino.Inside using this syntax

            var arch = new GH_IO.Serialization.GH_Archive();

            arch.ReadFromFile(myDefinitionPath);
            
            using (var doc = new GH_Document())
            {
                arch.ExtractObject(doc, "Definition");
                
                var allComps = doc.Objects.Where(o => o is GH_Component).Cast<GH_Component>();

                foreach (var comp in allComps)
                {
                    comp.CollectData();
                    comp.ComputeData();
                }
            }

I get this System.AccessViolationException when getting to the comp.ComputeData() line for this component:

This was working fine in SR7, but throws the above exception in SR14 & SR15 (and crashes the host application).

Cheers,

Sebastian

1 Like

I can confirm @sebastian.lindholm finding, I get the same result here as well.

Hi @sebastian.lindholm, @Oskar_Scherdin - can you provide me a way of repeating the crash you are getting? Does this crash occur in just Rhino, in Rhino.Inside Revit, or both?

Thanks,

– Dale

Hi Dale,

It’s only crashing the host application, in this case Tekla Structures (Rhino.Inside.Tekla).

I’ll try to get a simple example to you unless @sebastian.lindholm beats me to it.

Can you provide a support upload link?

You can post any file here, or send me a pm if needed.

— Dale

1 Like

Hi Dale,

I noticed something else, did Sweep2 always use to output a Brep? The surface offset component below used to work fine, so maybe something has changed there?

Hi Dale, this occurs with Rhino.Inside (RhinoCore), i.e. not when using standalone Rhino/GH. I’ve extracted the relevant boilerplate code to activate Rhino.Inside and GH and then ask the components in a GH definition to solve themselves to a separate project here:

CrashProject.zip (7.8 KB)

This stripped project doesn’t reference any external application or libraries, so doesn’t seem to be related to e.g. Tekla. Simply running the project from VS on a definition that contains a Sweep2 component throws an exception with SR15 as described in my last post. The gh file is in the zip as well, but it happens on any definition with a Sweep2. Running the code on any other definition works fine.

Cheers,

Sebastian

1 Like

Yes.

– Dale

Hi @sebastian.lindholm,

This was most helpful, thanks. I am able to repeat the issue. I doubt a fix will make it onto this week’s SR16 release candidate. But we should have something ready for testing next week.

https://mcneel.myjetbrains.com/youtrack/issue/RH-67456

Thanks,

– Dale

1 Like

Perfect, thanks for the quick reaction!

RH-67456 is fixed in Rhino 7 Service Release 16

2 Likes

Wow, that’s fast, great work guys!

:clap:

1 Like