Instantiating Object crashes Unity, am I stupid?

So, Im trying to instantiate an object and throw it with varying force in the direction I’m looking at. Pressing Space should start the whole procedure, ramp up the force while space is held down, and then on release, it should instantiate the object, apply the force to it and launch it into space. For some reason however, whenever I press Space, it just straight up crashes the entirety of unity.

This is the code.

  float force = 1F;
  public GameObject Throwable;

// Use this for initialization
void Start () {
   
}

// Update is called once per frame
void Update () {

}
private void FixedUpdate(){

    if (Input.GetKey(KeyCode.Space)) {
        while (Input.GetKeyDown(KeyCode.Space))
        {
            force = force + 0.5F;
        }
        var temp = Instantiate(Throwable, new Vector3(transform.position.x, transform.position.y, transform.position.z), transform.rotation);
        temp.GetComponent<Rigidbody>().AddForce(0, 0, force);
    }

}

(No idea of the whole launching part of the code is even correct since I have not yet come as far as to test it yet :confused: )

Not tested, you might need to try out

 private void FixedUpdate()
    {
        if (Input.GetKey(KeyCode.Space))
        {
            if (Input.GetKeyDown(KeyCode.Space))
            {
                force = force + 0.5F;
            }
            
        }
        if (Input.GetKeyUp(KeyCode.Space) && force > 0) 
        {
            var temp = Instantiate(Throwable, new Vector3(transform.position.x, transform.position.y, transform.position.z), transform.rotation);
            temp.GetComponent<Rigidbody>().AddForce(0, 0, force);
        }
    }