Search Unity

Question Can someone Help me diagnose a build crash?

Discussion in 'Scripting' started by tzxbbo, Feb 3, 2023.

  1. tzxbbo

    tzxbbo

    Joined:
    Dec 14, 2019
    Posts:
    100
    My build sometimes crashes, but it never happen in the Editor.
    here's some part of my crash report, can someone maybe point me the cause of the crash?
    Code (CSharp):
    1. Begin MonoManager ReloadAssembly
    2. - Completed reload, in  0.137 seconds
    3. <RI> Initializing input.
    4. New input system (experimental) initialized
    5. <RI> Input initialized.
    6. <RI> Initialized touch support.
    7. UnloadTime: 1.364400 ms
    8. The referenced script (Unknown) on this Behaviour is missing!
    9. The referenced script on this Behaviour (Game Object '<null>') is missing!
    10. A scripted object (script unknown or not yet loaded) has a different serialization layout when loading. (Read 56 bytes but expected 68 bytes)
    11. Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
    12. The referenced script (Zenject.Tests.TestAnimationStateBehaviourInject.StateBehaviour1) on this Behaviour is missing!
    13. The referenced script on this Behaviour (Game Object '<null>') is missing!
    14. The referenced script (Unknown) on this Behaviour is missing!
    15. The referenced script on this Behaviour (Game Object '<null>') is missing!
    16. The referenced script (Unknown) on this Behaviour is missing!
    17. The referenced script on this Behaviour (Game Object 'Foo') is missing!
    18. The referenced script (Zenject.Tests.Factories.BindFactory.Foo) on this Behaviour is missing!
    19. The referenced script on this Behaviour (Game Object 'Foo') is missing!
    20. The referenced script (Unknown) on this Behaviour is missing!
    21. The referenced script on this Behaviour (Game Object 'Foo') is missing!
    22. The referenced script (Unknown) on this Behaviour is missing!
    23. The referenced script on this Behaviour (Game Object 'FooSubContainer') is missing!
    24. The referenced script (Unknown) on this Behaviour is missing!
    25. The referenced script on this Behaviour (Game Object '<null>') is missing!
    26. The referenced script (Unknown) on this Behaviour is missing!
    27. The referenced script on this Behaviour (Game Object 'Foo') is missing!
    I'm using zenject for the project, but I'm not sure why these warning (coming from some assets from the zenject package) are generated for the build version but not in the editor?

    Code (CSharp):
    1. The referenced script on this Behaviour (Game Object 'QuxSearch') is missing!
    2. The referenced script (Unknown) on this Behaviour is missing!
    3. The referenced script on this Behaviour (Game Object '<null>') is missing!
    4. A scripted object (script unknown or not yet loaded) has a different serialization layout when loading. (Read 68 bytes but expected 112 bytes)
    5. Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
    6. The referenced script (Zenject.Internal.DefaultSceneContractConfig) on this Behaviour is missing!
    7. The referenced script on this Behaviour (Game Object '<null>') is missing!
    8. A scripted object (probably Zenject.Internal.DefaultSceneContractConfig?) has a different serialization layout when loading. (Read 68 bytes but expected 104 bytes)
    9. Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
    10. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105217 ms: Timed out
    11. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105208 ms: Timed out
    12. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105231 ms: Timed out
    13. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105222 ms: Timed out
    14. Crash!!!
    Here you can see a wierd connection failure to the unity clould, I'm not sure how this is even happening, is this the cuase of the crash?, we can see the "Crash!!!" after several timed out request

    Code (CSharp):
    1. ' (Address: 00007FFB94F71A1D)
    2. 0x00007FFB94F71A1D (UnityPlayer) (function-name not available)
    3. 0x000001FCC83AE69F (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Transform:SetParent (UnityEngine.Transform,UnityEngine.Transform,bool)
    4. 0x000001FCC84A7F53 (Mono JIT Code) UnityEngine.Transform:SetParent (UnityEngine.Transform)
    5. 0x000001FCC84A8443 (Mono JIT Code) ShapeProxy:set_Shape (IShape)
    6. 0x000001FCEE089C93 (Mono JIT Code) Projectile:Build (IEntity)
    7. 0x000001FCEE1058A8 (Mono JIT Code) Entity:IEntity.Clone ()
    8. 0x000001FCEE1054C3 (Mono JIT Code) EntityBuilder:Build ()
    9. 0x000001FCEE1051AB (Mono JIT Code) ChildBuilder:Build ()
    10. 0x000001FCEE12B37A (Mono JIT Code) ShotgunDecorator:Build ()
    11. 0x000001FCEE105106 (Mono JIT Code) ExecutableEntityBuilder:Build ()
    12. 0x000001FCEE10508B (Mono JIT Code) ExecutableEntityBuilder:Execute ()
    13. 0x000001FCEE104FEF (Mono JIT Code) ExecutableProxy:Execute ()
    14. 0x000001FCEE104E8B (Mono JIT Code) CardExecuting:Tick ()
    15. 0x000001FCEE0D1322 (Mono JIT Code) DrawCardMachine:Tick ()
    16. 0x000001FCEE0D10FB (Mono JIT Code) MonsRoomState:Tick ()
    17. 0x000001FCC84C8B86 (Mono JIT Code) GameManager:Update ()
    18. 0x000001FCC7698158 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    19. 0x00007FFB9F4EFE24 (mono-2.0-bdwgc) mono_jit_set_domain
    20. 0x00007FFB9F42E764 (mono-2.0-bdwgc) mono_object_get_virtual_method
    21. 0x00007FFB9F42E8FC (mono-2.0-bdwgc) mono_runtime_invoke
    Here you can see some of my codes, if we follow the trace the problem is inside Transform.SetParent???
    I don't think that's possible, this probably a consequence of the crash??

    Code (CSharp):
    1. The referenced script (Unknown) on this Behaviour is missing!
    2. The referenced script on this Behaviour (Game Object '<null>') is missing!
    3. A scripted object (script unknown or not yet loaded) has a different serialization layout when loading. (Read 68 bytes but expected 112 bytes)
    4. Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
    5. The referenced script (Zenject.Internal.DefaultSceneContractConfig) on this Behaviour is missing!
    6. The referenced script on this Behaviour (Game Object '<null>') is missing!
    7. A scripted object (probably Zenject.Internal.DefaultSceneContractConfig?) has a different serialization layout when loading. (Read 68 bytes but expected 104 bytes)
    8. Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
    9. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105195 ms: Timed out
    10. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105194 ms: Timed out
    11. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105205 ms: Timed out
    12. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105240 ms: Timed out
    13. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105223 ms: Timed out
    14. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105185 ms: Timed out
    15. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105218 ms: Timed out
    16. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105234 ms: Timed out
    17. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105210 ms: Timed out
    18. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105199 ms: Timed out
    19. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105190 ms: Timed out
    20. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105195 ms: Timed out
    21. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105208 ms: Timed out
    22. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105219 ms: Timed out
    23. Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 105164 ms: Timed out
    My previous crash report also shows a load of timed out request, But I don't even know what is cuasing the connection? is this a normal behaviour??
     
  2. tomfulghum

    tomfulghum

    Joined:
    May 8, 2017
    Posts:
    78
    Compiler errors that only happen when building are most of the time caused by either referencing the UnityEditor assembly in runtime code or necessary code not being included because of preprocessor directives. Did you check for what the error messages say: Did you
    #ifdef UNITY_EDITOR
    a section of your serialized properties in any of your scripts?

    As for the stack trace, the problem isn't in SetParent. You're probably passing a null object to SetParent, most likely caused by the missing scripts.
     
  3. tzxbbo

    tzxbbo

    Joined:
    Dec 14, 2019
    Posts:
    100
    But I never used such things like
    #ifdef UNITY_EDITOR
    I looked up some of the gameobjects (from the zenject package) mentioned in the report, the scripts on them are perfectly fine, I didn't use UnityEditor as well except in test runner for loading prefabs. I don't even understand why these Zenject assets are mentioned in the report, unless Zenject run its tests everytime the game starts and it's broken somehow
     
  4. SF_FrankvHoof

    SF_FrankvHoof

    Joined:
    Apr 1, 2022
    Posts:
    780

    1. The referenced script (Zenject.Tests.TestAnimationStateBehaviourInject.StateBehaviour1) on this Behaviour is missing!
    It's being referenced somehow, somewhere..