Editing Animations crashes Unity

I’m making my first 3rd person adventure rpg and I’m currently working on the animations. When I go into the Animation tab and try to edit the animations, Unity stops responding and freezes. Nothing else in Unity causes it to freeze, so I dont know what the problem is.

I fixed this because I realized that I was playing two animations at once. I had an animation playing, and then when i pressed the mouse I wanted a different one to play. When i pressed the mouse, unity froze.

Basicly what I was doing wrong was that I didnt stop the first Animation from playing. I set the transitions to go off a bool, and so inside each button I used, I needed to set all other bools to false before setting it to false. heres some code:

 Animator anim;
    int walkHash = Animator.StringToHash("shouldWalk");
    int idleHash = Animator.StringToHash("shouldIdle");
    int hitHash = Animator.StringToHash("shouldHit");
    int jumpHash = Animator.StringToHash("shouldJump");

    private void Start()
    {
        anim = GetComponent<Animator>();
    }
    private void Update()
    {
        if (Input.GetKey("w"))
        {
            anim.SetBool(idleHash, false);
            anim.SetBool(jumpHash, false);
            anim.SetBool(idleHash, false);
            anim.SetBool(walkHash, true);
        }
    }

then I did this for every button I wanted to trigger an animation. So far I have w,a,s,d,space and mouse 0.
hope this helps someone.