Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Unity 2021.3.9 build error invalid propertyPath

Discussion in 'Editor & General Support' started by toan-stt, Sep 6, 2022.

  1. toan-stt

    toan-stt

    Joined:
    Sep 30, 2013
    Posts:
    9
    Hi,
    I updated unity to 2021.3.9 and tried to build IL2PCC win, but I got this error:

    Trying to update the managed reference registry with invalid propertyPath(likely caused by a missing reference instance)'managedReferences[2591244572266856457].cmp', with value ''


    Please help me to solve it
     
  2. rekatha

    rekatha

    Joined:
    Dec 18, 2017
    Posts:
    22
    Do we have fix for this issue ?
     
  3. abegue

    abegue

    Joined:
    Jan 28, 2019
    Posts:
    24
    The only workaround I found is to use a text editor to find the reference and delete it. In general, it also means that a reference has been lost so you may have to set the reference/value on this property again.

    I am not really sure of what it is the cause but I think this something like that:

    Say we have a prefab and an instance of it in the scene.
    In your prefab, you have a property that use [SerializeReference]. You setup an instance that have a property 'cmp' and set a value.
    Internally, it will create something like in your prefab asset (look at the reference id):
    Code (CSharp):
    1. - rid: 2591244572266856457
    2. [...]
    3. references:
    4.   version: 2
    5. RefIds:
    6.     - rid: 2591244572266856457
    7.       type: {yourClass}
    8.       data:
    9.          _cmp: {any value}
    Then, in the prefab instance in the scene, you override the value. In your scene asset, it will create something like (look at the reference id):
    Code (CSharp):
    1.     - target: {fileID: ..., guid: ..., type: 3}
    2.       propertyPath: managedReferences[2591244572266856457].cmp
    3.       value: {any new value}
    Now, you make some changes in the prefab and decide to get ride of the instance of your interface property. This change now replace 2591244572266856457 by, saying, 5166781093476565058.
    Your prefab is now okay but when you go back to your scene, the file still contains a "prefab override" whose the property path still reference the old id (2591244572266856457).
    Then, it will display you that:
    Trying to update the managed reference registry with invalid propertyPath(likely caused by a missing reference instance)'managedReferences[2591244572266856457].cmp', with value '{whatever}'


    It is just a hypothesis but perhaps it can help. Despite [SerializeReference] being really really really useful (it is so much powerful), I think I will stop using it while this bug is not fixed (I think it will need a big rework of how things work if my hypothesis is valid) since it corrupts your prefabs/scenes, introducing value/reference losses and prevent buildings.
     
  4. LVermeulen

    LVermeulen

    Joined:
    Jun 26, 2013
    Posts:
    37
    Would be great to get some idea of where this is happening. The error message just gives the property name and doesn't say what prefab or even what script.
     
    juanborgesv, dtaddis and Flavelius like this.
  5. Dawid_Matuszewski

    Dawid_Matuszewski

    Joined:
    Mar 2, 2016
    Posts:
    10
    Same here. Do we have some fix of this error
    2021.3.28f1
     
    AR12D likes this.
  6. mgmhunt

    mgmhunt

    Joined:
    Apr 1, 2013
    Posts:
    60
    Encountered this on 2021.3.30f1 Mac.

    Trying to update the managed reference registry with invalid propertyPath(likely caused by a missing reference instance)'managedReferences[3449465115153006597].EventOriginTransform', with value ''

    Edit - luckily the corruption occurred in a script-generated scene, so I could overwrite it.
     
    Last edited: Oct 6, 2023
  7. JAMSCommercial

    JAMSCommercial

    Joined:
    Sep 1, 2023
    Posts:
    4
    Any Perfect Fix for this issue????!!!
     
  8. eelbee

    eelbee

    Joined:
    Jun 17, 2022
    Posts:
    2
    We keep running into this error also. Very annoying - especially that the fix is dependent on a text-editor, and cannot be handled via the Unity Editor itself.