Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Bug] Unity Editor is trying to access a deleted component and it's blaming me via MissingReferen...

Discussion in 'Editor & General Support' started by Xtro, Feb 17, 2019.

  1. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    604
    Can I get some attention for this bug please?

    Bug report: https://fogbugz.unity3d.com/default.asp?1128416_u2ubno0n56pu36f1
    Issue tracker: https://issuetracker.unity3d.com/is...e-component-with-destoyimmediate-in-edit-mode

    Unity Editor is trying to access a deleted component and it's blaming me via MissingReferenceException

    1) Open this project.
    2) Select TestObject prefab in project window.
    2.a) Click "Open Prefab" button in the inspector if you are testing this on 2018.3.x.
    3) Click "Add/Remove Helper Component" button on MainComponent of TestObject in the inspector.
    4) See that a HelperComponent is added to the TestObject in the inspector.
    5) Click "Add/Remove Helper Component" button again.
    6) See that the HelperComponent is removed from the TestObject.
    7) See console. Unity raises a MissingReferenceException. My scripts are not listed in the call stack which means Unity Editor is causing this exception.

    Probably this is a very old bug.

    I can reproduce this on 2018.2.20 and 2018.3.6.
     
    Last edited: Feb 20, 2019
  2. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    604
    I confirm that this is working fine in 2019.3.7.