Search Unity

The referenced script on this Behaviour (Game Object '') is missing!

Discussion in 'Addressables' started by iamarugin, May 15, 2019.

Thread Status:
Not open for further replies.
  1. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Unity 2018.4.0 and Addressables 0.8.6

    When I set the Play Mode script to Packed play mode, build the addressables and run the game, the Editor log is filled by 80+ warnings such as:

    Code (CSharp):
    1. The referenced script on this Behaviour (Game Object '') is missing!
    2. The referenced script (Unknown) on this Behaviour is missing!
    3. Fixing reference to the runtime script in scene file!
    4. GameObject (named 'something') references runtime script in scene file. Fixing!
    But everything works as expected.

    Does anyone faced with such a problem? Could you please give me directions, how can I fix this warnings? I checked several times all prefabs that are in the addressables and I can't find any missing scirpts in them. And I think this warnings may break the game build where my loaded content works unpredictably. I have sudden missing refrences in the prefabs, and errors like:

    Code (CSharp):
    1. The file 'none' is corrupted! Remove it and launch unity again!
    2. [Position out of bounds!]
    I can not create a minimum reproducable project, because in a fresh project everything just works. So I really don't know what to do.
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    We've run into similar warnings. we're looking into it.
     
  3. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Oh my god, I thought I was crazy. Thanks!
     
  4. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    Yeah I'm getting similar errors, The referenced script is missing, and then 'The file 'none' is corrupted
     
  5. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    For more information...This issue seems to happen when I try to instantiate a non addressable prefab from an addressable scriptable object

    At runtime, I load (via addressables) a ScriptableObject provider, "DatabaseStore", that references another ScriptableObject "Map Database"...which references more scriptable objects in a tree structure to find things like assets to load.
    Loading other addressable assets from this works fine, as does instantiating scriptable object copies. It's only when I try to instantiate a prefab that issues happen
    The addressable store root
    upload_2019-5-27_14-17-15.png

    The scriptable object with the prefab reference (neither are directly addressable)
    upload_2019-5-27_14-22-0.png

    When the assets are loading, I see a lot of messages such as:
    The referenced script on this Behaviour (Game Object 'GridDoor') is missing!


    When I call Object.Instantiate() on that prefab reference (or another similar one), things seem to break and the error message:
    The file 'none' is corrupted! Remove it and launch unity again!
    appears

    This is on 2019.1.4

    Everything works fine in Editor, even in Packed Play mode...its only when I build the game that this issue happens

    EDIT: The actual error seems to be happening here:
    Code (CSharp):
    1. The file 'none' is corrupted! Remove it and launch unity again!
    2. [Position out of bounds!]
    3. 0x00007FFE151760EC (UnityPlayer) StackWalker::GetCurrentCallstack
    4. 0x00007FFE15178E09 (UnityPlayer) StackWalker::ShowCallstack
    5. 0x00007FFE151699E8 (UnityPlayer) GetStacktrace
    6. 0x00007FFE161CCD73 (UnityPlayer) DebugStringToFile
    7. 0x00007FFE158A5A90 (UnityPlayer) CachedReader::OutOfBoundsError
    8. 0x00007FFE158A83B5 (UnityPlayer) CachedReader::UpdateReadCache
    9. 0x00007FFE15B8A530 (UnityPlayer) TransferField_Array<StreamedBinaryRead,Converter_UnityEngineObject>
    10. 0x00007FFE15B9D70C (UnityPlayer) Transfer_UnityEngineObject<StreamedBinaryRead,1>
    11. 0x00007FFE15B8B200 (UnityPlayer) TransferField_LinearCollection<SafeBinaryRead>
    12. 0x00007FFE15B9116F (UnityPlayer) TransferScriptingObject<StreamedBinaryRead>
    13. 0x00007FFE15B91322 (UnityPlayer) TransferScriptingObject<StreamedBinaryRead>
    14. 0x00007FFE15BA166D (UnityPlayer) SerializableManagedRefTransfer::TransferEngineAndMonoInstance<StreamedBinaryRead>
    15. 0x00007FFE15B64949 (UnityPlayer) MonoBehaviour::VirtualRedirectTransfer
    16. 0x00007FFE155ABCFA (UnityPlayer) CloneObjectImpl
    17. 0x00007FFE155AB5F6 (UnityPlayer) CloneObject
    18. 0x00007FFE15C0B359 (UnityPlayer) Object_CUSTOM_Internal_CloneSingle
    19. 0x000001F2B38568A1 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Object:Internal_CloneSingle (UnityEngine.Object)
    20. 0x000001F2B38564EB (Mono JIT Code) UnityEngine.Object:Instantiate<T_REF> (T_REF)
    21. 0x000001F2887956B3 (Mono JIT Code) [RadialGridClusterBuilder.cs:189] CB.WorldGen.RadialGridClusterBuilder:PlaceConnector (CB.WorldGen.ConnectedTilesData,UnityEngine.Transform)
    22. 0x000001F2887950EB (Mono JIT Code) [RadialGridClusterBuilder.cs:180] CB.WorldGen.RadialGridClusterBuilder:PlaceConnectors (UnityEngine.Transform)
    23. 0x000001F28876F6F3 (Mono JIT Code) [RadialGridClusterBuilder.cs:100] CB.WorldGen.RadialGridClusterBuilder:PlaceClusterPrefabs (CB.WorldGen.RoomPrefabCreator,single,UnityEngine.Transform)
    24. 0x000001F28877F7CB (Mono JIT Code) [GeneratedRGFloor.cs:123] CB.WorldGen.GeneratedRGFloor:PlaceFloorPrefabs (CB.WorldGen.RoomPrefabCreator,UnityEngine.Transform)
    25. 0x000001F28877E93B (Mono JIT Code) [GeneratedRadialGridMap.cs:38] CB.WorldGen.GeneratedRadialGridMap:PlacePrefabs (UnityEngine.Transform)
    26. 0x000001F28877E57B (Mono JIT Code) [Map.cs:126] CB.WorldGen.Map/<_BuildEnvironment>d__26:MoveNext ()
    27. 0x000001F2DD5D3D54 (Mono JIT Code) [Timing.cs:5216] MEC.Timing/<_StartWhenDone>d__274:MoveNext ()
    28. 0x000001F2CD8A3F42 (Mono JIT Code) [Timing.cs:474] MEC.Timing:Update ()
    29. 0x000001F2B1E74FD8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    30. 0x00007FFE1922BBCB (mono-2.0-bdwgc) mono_get_runtime_build_info
    31. 0x00007FFE191B2252 (mono-2.0-bdwgc) mono_perfcounters_init
    32. 0x00007FFE191BB25F (mono-2.0-bdwgc) mono_runtime_invoke
    33. 0x00007FFE15B7BF7D (UnityPlayer) scripting_method_invoke
    34. 0x00007FFE15B78CC1 (UnityPlayer) ScriptingInvocation::Invoke
    35. 0x00007FFE15B59369 (UnityPlayer) MonoBehaviour::CallMethodIfAvailable
    36. 0x00007FFE15B5941C (UnityPlayer) MonoBehaviour::CallUpdateMethod
    37. 0x00007FFE155A9160 (UnityPlayer) BaseBehaviourManager::CommonUpdate<BehaviourManager>
    38. 0x00007FFE155AF62D (UnityPlayer) BehaviourManager::Update
    39. 0x00007FFE1585D7D9 (UnityPlayer) `InitPlayerLoopCallbacks'::`2'::UpdateScriptRunBehaviourUpdateRegistrator::Forward
    40. 0x00007FFE1584BAC7 (UnityPlayer) ExecutePlayerLoop
    41. 0x00007FFE1584BB95 (UnityPlayer) ExecutePlayerLoop
    42. 0x00007FFE1584F29F (UnityPlayer) PlayerLoop
    43. 0x00007FFE1519F3E2 (UnityPlayer) PerformMainLoop
    44. 0x00007FFE1519DBEA (UnityPlayer) MainMessageLoop
    45. 0x00007FFE151A2319 (UnityPlayer) UnityMainImpl
    46. 0x00007FFE151A3F9B (UnityPlayer) UnityMain
    47. 0x00007FF6F0E611F2 (SCP Containment Breach - Unity) __scrt_common_main_seh
    48. 0x00007FFE92877974 (KERNEL32) BaseThreadInitThunk
    49. 0x00007FFE955DA271 (ntdll) RtlUserThreadStart
    50. (Filename: C:\buildslave\unity\build\Runtime/Serialize/SerializationCaching/CachedReader.cpp Line: 214)
    SECOND EDIT: Opened a case, 1158679
     
    Last edited: May 29, 2019
  6. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
  7. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    Apparently the issue is being tracked here: https://issuetracker.unity3d.com/is...deserialize-some-scripts-on-standalone-builds - do you happen to know if it will be fixed for 1.0 of addressables, or at least soon? I'd like to be able to upgrade to using them but don't want to put my game into a broken state for months, as the current issue makes my game completely fail to run in the player
     
  8. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    It's an engine fix, not an addressables one. We are working on it, but it won't be fixed as of when we go out of preview. It will hopefully be fixed in some versions of the editor soon, but how quickly we can backport is unknown.
     
  9. jaymarvin98

    jaymarvin98

    Joined:
    Mar 26, 2019
    Posts:
    2
    Has this been scheduled to be fixed?
    I get these both, below, and clicking on them both goes to the same disabled Prefab Indexer in the Inspector.

    The referenced script (Unknown) on this Behaviour is missing!
    The referenced script on this Behaviour (Game Object 'Prefab Indexer') is missing!
     
    faolad likes this.
  10. afridi14641

    afridi14641

    Joined:
    Oct 28, 2018
    Posts:
    2
    how to solve it please any one correct me
     
  11. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    I'm having a similar issue. When I load a scene by Addressables the objects say MissingReferenceException and the script says Missing (Mono Script) on the GameObject. Anyone have ideas what might be going on there?

    It's as if the GameObjects in the scene load from Addressables are missing all their references.

    @unity_bill
     
  12. YoungXi

    YoungXi

    Joined:
    Jun 5, 2013
    Posts:
    63
    Any updates?
     
  13. BurningToad

    BurningToad

    Joined:
    Aug 14, 2013
    Posts:
    56
    I was having this problem after loading an addressable scene, and it turned out to be that after `
    AsyncOperationHandle<SceneInstance>.isDone` was true, I was calling `Addressables.Release` on the
    AsyncOperationHandle. Not sure when or why I put this in my scene loading code, but basically as soon as I successfully loaded the scene, I was calling this and I guess releasing references to things and so lots of things were destroyed causing missing reference exceptions, pink textures, etc etc.
     
  14. battman00

    battman00

    Joined:
    Mar 28, 2020
    Posts:
    10
    Having the same issue when calling `SceneManager.LoadSceneAsync` on a scene with a ScriptableObject attached as a SerializeField.

    The strange thing is that the warning goes away if I press "Play" (in Unity) while having the ScriptableObject open in the Inspector window. If the SO is not selected, then the warning returns.

    Code (CSharp):
    1. The referenced script (Unknown) on this Behaviour is missing!
    2. The referenced script on this Behaviour (Game Object '') is missing!
     
  15. yusufdemir2012

    yusufdemir2012

    Joined:
    Dec 21, 2013
    Posts:
    50
    Unity 2019.4.14 and Addressables 1.8.5
    Everything is fine on editor, but game is crashing in Android. I never see before "behaviour is missing" warnings on console.

    Code (CSharp):
    1. 2020-11-25 10:34:42.280 13211-15506/com.xxx.xxx E/Unity: The file '/data/app/com.xxx.xxx-ETB0RDVUkJhq84GEJvzJDQ==/base.apk/assets/bin/Data/resources.assets' is corrupted! Remove it and launch unity again!
    2.     [Position out of bounds!]
    3.     UnityEngine.Resources:Load(String)
    4.     UniversalMultiGameSystem:get_Instance()
    5.     UMGSE:ActiveGame()
    6.     DialogSystem:Init()
    7.     LoginManager:Awake()
    8.    
    9.     [./Runtime/Serialize/SerializationCaching/CachedReader.cpp line 220]
    10.     (Filename: ./Runtime/Serialize/SerializationCaching/CachedReader.cpp Line: 220)
    11.    
    12.    
    13.    
    14.     --------- beginning of crash
    15. 2020-11-25 10:34:42.280 13211-15506/com.xxx.xxx A/libc: Fatal signal 5 (SIGTRAP), code -6 (SI_TKILL) in tid 15506 (UnityMain), pid 13211 (com.xxx.xxx)
     
  16. ace1231231233

    ace1231231233

    Joined:
    Mar 20, 2021
    Posts:
    1
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class Move2d : MonoBehaviour {
    6.     public float moveSpeed = 5f;
    7.     // Use this for Initalization
    8.     void Start() {
    9.        
    10.     }
    11.  
    12.     // Update is called once per frame
    13.     void Update() {
    14.         Jump();
    15.         Vector3 movement = new Vector3(Input.GetAxis("Horizontal"), 0f, 0f);
    16.         transform.position += movement * Time.deltaTime * moveSpeed;  
    17.     }
    18.  
    19.     void Jump(){
    20.         if (Input.GetButtonDown("Jump")){
    21.             gameObject.GetComponent<Rigidbody2D>().AddForce(new Vector2(0f, 5f), ForceMode2D.Impulse);
    22.         }
    23.        
    24.     }
    25. }
    26.  
    Simple Code but why it says The referenced script on this Behaviour (Game Object ' ') is missing!
     
  17. orb_9

    orb_9

    Joined:
    Feb 10, 2010
    Posts:
    47
    chrismarch and Babiole like this.
Thread Status:
Not open for further replies.