EnsurePrivateCopy() on an InstanceDefinition causes overflow

Hi @dale,

i accidentally used EnsurePrivateCopy on an InstanceDefinition which crashed RH6 caused by some kind of overflow. To reproduce:

import Rhino

def DoSomething():
    msg = "Select block instance"
    obj_type = Rhino.DocObjects.ObjectType.InstanceReference
    rc, obj_ref = Rhino.Input.RhinoGet.GetOneObject(msg, False, obj_type)
    if rc != Rhino.Commands.Result.Success: return
    
    iref = obj_ref.Object()
    if not iref: return
    idef = iref.InstanceDefinition
    if not idef: return

    try:
        idef.EnsurePrivateCopy()
    except Exception as ex:
       print ex

_
c.

Got it - thanks.

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

– Dale

So far, I haven’t been able to reproduce this. @dale or @clement, do you have a model where this can be reproduced?

Hi @stevebaer, it happened with the model provided here using SR14. I am now at SR16 and cannot make it crash either.

_
c.