Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Crash on build: Component_CUSTOM_GetComponentFastPath

Discussion in 'Scripting' started by gerudoking, Jan 18, 2024.

  1. gerudoking

    gerudoking

    Joined:
    Jan 25, 2013
    Posts:
    4
    Hello everyone!

    I'm facing a weird crash on my game builds. After checking the player log, there is the current outputting stack trace:
    Code (CSharp):
    1. ========== OUTPUTTING STACK TRACE ==================
    2.  
    3. 0x00007FFF5D0AC8C2 (UnityPlayer) Component_CUSTOM_GetComponentFastPath
    4. 0x000002CD9E9CE2AF (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Component:GetComponentFastPath (UnityEngine.Component,System.Type,intptr)
    5. 0x000002CD9E9CE1C3 (Mono JIT Code) UnityEngine.Component:GetComponent<T_REF> ()
    6. 0x000002CDF38CC74B (Mono JIT Code) Projectile:OnTriggerEnter (UnityEngine.Collider)
    7. 0x000002CDF3847CB3 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object (object,intptr,intptr,intptr)
    8. 0x00007FFF5C8265FE (mono-2.0-bdwgc) mono_jit_set_domain
    9. 0x00007FFF5C75CD84 (mono-2.0-bdwgc) mono_object_get_virtual_method
    10. 0x00007FFF5C75CEFC (mono-2.0-bdwgc) mono_runtime_invoke
    11. 0x00007FFF5D63484D (UnityPlayer) scripting_method_invoke
    12. 0x00007FFF5D6213B2 (UnityPlayer) ScriptingInvocation::Invoke
    13. 0x00007FFF5D619262 (UnityPlayer) MonoBehaviour::HandleNotifications
    14. 0x00007FFF5D28222E (UnityPlayer) GameObject::SendMessageAny
    15. 0x00007FFF5D95AB06 (UnityPlayer) PhysicsScene::ProcessTriggerEnterExits
    16. 0x00007FFF5D95A746 (UnityPlayer) PhysicsScene::ProcessReports
    17. 0x00007FFF5D58CD4D (UnityPlayer) PhysicsManager::Simulate
    18. 0x00007FFF5D584C00 (UnityPlayer) `PhysicsManager::InitializeClass'::`2'::FixedUpdatePhysicsFixedUpdateRegistrator::Forward
    19. 0x00007FFF5D48CDFA (UnityPlayer) ExecutePlayerLoop
    20. 0x00007FFF5D48CEA0 (UnityPlayer) ExecutePlayerLoop
    21. 0x00007FFF5D48FB78 (UnityPlayer) PlayerLoop
    22. 0x00007FFF5D68E51A (UnityPlayer) PerformMainLoop
    23. 0x00007FFF5D68D24B (UnityPlayer) MainMessageLoop
    24. 0x00007FFF5D691C47 (UnityPlayer) UnityMainImpl
    25. 0x00007FFF5D69396B (UnityPlayer) UnityMain
    26. 0x00007FF76DD011F2 (Spacepunk Survival) __scrt_common_main_seh
    27. 0x00007FF847D2257D (KERNEL32) BaseThreadInitThunk
    28. 0x00007FF849A2AA58 (ntdll) RtlUserThreadStart
    29.  
    30. ========== END OF STACKTRACE ===========
    Seems like there is something to do with the OnTriggerEnter of my Projectile class, which looks like this:

    Code (CSharp):
    1. private void OnTriggerEnter(Collider other)
    2. {
    3.     if (isServer) {
    4.         if(other == null) {
    5.             return;
    6.         }
    7.  
    8.         if (other.GetComponent<EnemyPersuer>() != null) {
    9.             if (other.GetComponent<EnemyPersuer>().alien == EnemyPersuer.AlienType.CeilingCrawler || other.GetComponent<EnemyPersuer>().alien == EnemyPersuer.AlienType.Sniper) return;
    10.         }
    11.  
    12.         if (other.tag == "Player") {
    13.             TargetSendVisualEffect(other.GetComponent<NetworkIdentity>().connectionToClient);
    14.             other.GetComponent<EntityStatus>().TakeDamage(1, transform);
    15.             NetworkServer.Destroy(gameObject);
    16.         }
    17.         if (other.tag == "Barrier" || other.tag == "Enemy") {
    18.             NetworkServer.Destroy(gameObject);
    19.         }
    20.     }
    21. }
    I'm really out of ideas of what could be the problem. Any ideas? We are currently using Unity 2021.3.34f1 and Mirror for networking.

    Thanks in advance!!
     
  2. Mordek

    Mordek

    Joined:
    May 26, 2019
    Posts:
    3
    Did you find a solution? We currently face a similar issue, but we use Netcode for GameObjects for networking.