[Solved] Infinite loop

I started learning unity couple of months ago. I’m having this weird bug, the game will go on infinite loop of spawning and killing player. I’m struggling to find out what might be causing this. any help is appreciated. Thanks in advance.

I’m using these scripts on Player:

private void OnCollisionEnter(Collision collision)
{
    switch(collision.gameObject.tag)
    {
        case "Friendly":
            isGrounded = true;
            print("You are okay");
            break;

        case "Finish":
            print("You did it");
            break;

        default:
            Destroy(this.gameObject, 0.2f);
            spawnner.ExecuteSpawnner();
            print("You are dead");
            break;
    }
}

private void OnCollisionExit(Collision collision)
{
    if (collision.gameObject.tag == "Friendly")
        isGrounded = false;
}

A separate Game manager to delay the respawn using coroutine -

  public class GameManager : MonoBehaviour
{
[SerializeField]
GameObject Player;
[SerializeField]
Vector3 Location;

private void Start()
{
    Spawnner();
}
public void ExecuteSpawnner()
{
    StartCoroutine(DelaySpawnner());
}

public IEnumerator DelaySpawnner()
{
    yield return new WaitForSeconds(1f);
    Spawnner();
}
 
public void Spawnner()
{
    if (GameObject.Find("AtomRocket") == null) 
    {
        Instantiate(Player, Location, Quaternion.identity);
    }
     
}

}

@xxmariofer thank you for the reply. It looks like this was caused by “Destroy(this.gameObject, 0.2f);” when i hit something while moving fast it used to trigger lot of onCollisionEnter call backs before it got destroyed in 0.2 seconds. Hence screwed up everything.