sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Error: #<TypeError: reference to deleted Entity>

    Scheduled Pinned Locked Moved SketchUp Bug Reporting
    sketchup
    2 Posts 2 Posters 8.3k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      BryanHL
      last edited by

      Noticed the following in the Ruby console when working on an extension.

      Error: #<TypeError: reference to deleted Entity>
      c:/users/.../appdata/roaming/sketchup/sketchup 2017/sketchup/plugins/su_dynamiccomponents/ruby/dcobservers.rbe:908:in get_attribute' c:/users/.../appdata/roaming/sketchup/sketchup 2017/sketchup/plugins/su_dynamiccomponents/ruby/dcobservers.rbe:908:in onActivePathChanged'

      At first I assumed an error in my extension but it was easily replicated in a fresh start of SU.

      Steps: Create some geometry, add it to a group or component. Open the group or component for editing, select all and delete. Then click anywhere on the screen and the the above appears in the console.

      Doesn't seem to have any other side effects.

      Note: I am on make, so no dynamic components...

      Bryan

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        Fredo reported this a while ago.
        With recent versions if you have a reference set up for an entity etc and it gets recreated - e.g. during an explode - the reference changes and so there's an error as some code finds an invalid reference.
        Most developers have now trapped for this in their code - e.g. setting a reference to an entity does not persist after an operation like explode, so you need to grep the result of the explode to re-collect the object[s] to re-find that entity - using persistent-id or a custom attribute assigned to the entity...
        In older versions an explode etc did not destroy the reference to an entity, so your code could reference it inside a group and find it again after the explode... the persistent-id changes broke this and a workaround is needed, as explained.
        I suspect that the old DC code has not been fully updated to avoid the 'delete entity' reference messages...
        It's a straightforward fix to trap for it - but SketchUp seems unwilling to devote much time to DCs - they have new fish to fry...

        TIG

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement