[BUG] print type(Rhino.Geometry.<type>) in GHPython crashes Rhino!


I’ve recently noticed a bug in GHPhython in Rhino 7 (7.9.21222.15002, 2021-08-10) for macOS and the version before, where Rhino sometimes completely crashes - shuts down without beach balling first -, when I attempt to print type(Rhino.Geometry.<type>)!

This works totally fine. M is a type hinted mesh input.

for vtx in M.Vertices:
    print vtx

Now try adding type() around vtx (starting from left to right).

for vtx in M.Vertices:
    print type(vtx)   # <--

Rhino should crash before you can finish typing! At least that’s the case for me.

If I might guess, I’d say that there is probably something wrong with the GHPython component itself. Could it be the language-aware code completion or on-the-fly debugger?

Hey @diff-arch,

I am seeing the same thing and created RH-65457 to get that fixed up.

Thanks for submitting the issue!

1 Like

Thanks! :+1:

In Rhino 7 (7.13.21313.11002, 2021-11-09) on macOS, this bug is unfortunately back!
I’ve encountered it now a couple of times while trying to call the Z attribute of a Rhino.Geometry.Point3d.

Hey @diff-arch that makes sense as the original issue unfortunately has not been fixed yet. I’ll make a note on the issue to see if the above gives more hints.

1 Like