I have two buttons with the exact same code, one works the other crashes the app, why?

so this app is for me to track my bicycle rides. It is my first project using fragments. I want to see on fragment “gesamt” all bikerides i did over the year (kilometer and altitude).
So i created two progressbars (the max of the progressbars are the data from last year), and a surface to add racing bicycle and a surface to add mountainbike rides.
Once you enter your kilometer and altitude for, let´s say racing bicycle 500/5000 and press the add button
a TextView under the progressbar should display 500 / max and 5000 / max.

Code:

package com.example.fahrradapp;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;


public class Gesamt extends Fragment {

    ProgressBar progressBarkm, progressBarhm;
    Button btnrradd, btnmtbadd, btnsave;
    EditText kmrr, hmrr, kmmtb, hmmtb;
    TextView percentkm, percenthm;


//This app is to track the kilometer and altitude difference i made over the year.

    @SuppressLint("SetTextI18n")
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {

        View v = inflater.inflate(R.layout.gesamt, container, false);

        progressBarkm = v.findViewById(R.id.progressbarkm);
        progressBarhm = v.findViewById(R.id.progressbarhm);
        btnrradd = v.findViewById(R.id.btnrradd);
        btnmtbadd = v.findViewById(R.id.btnmtbadd);
        btnsave = v.findViewById(R.id.btnsave);
        kmrr = v.findViewById(R.id.kmrr);
        hmrr = v.findViewById(R.id.hmrr);
        kmmtb = v.findViewById(R.id.kmmtb);
        hmmtb = v.findViewById(R.id.hmmtb);
        percentkm = v.findViewById(R.id.percentkm);
        percenthm = v.findViewById(R.id.percenthm);



        //Shows the progress of both progressbars (for kilometer and altitude)
        //At the start of the app it should display 0 /2492 and 0 / 37557
          int progressgesamtkm = progressBarkm.getProgress();
          percentkm.setText(progressgesamtkm + " / " + progressBarkm.getMax());
          int progressgesamthm = progressBarhm.getProgress();
          percenthm.setText(progressgesamthm + " / " + progressBarhm.getMax());



        //Button for the bike type racing bicycle
        btnrradd.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            int rrkmz1 = Integer.parseInt(kmrr.getText().toString()); //get the entered KM to string
            int rrkmz2 = progressBarkm.getProgress();  //get the progress of KM bar
            int rrkmz3 = rrkmz1 + rrkmz2; //add both

            try {
                percentkm.setText(rrkmz3 + " / " + progressBarkm.getMax()); //change the TextView under progressbar from 0 /2492 to the new value

            } catch (NumberFormatException e){
                Toast.makeText(getActivity(), "Fail", Toast.LENGTH_SHORT).show();
                }

            int rrhmz1 = Integer.parseInt(hmrr.getText().toString()); //same code like above but for altitude
            int rrhmz2 = progressBarhm.getProgress();
            int rrhmz3 = rrhmz1 + rrhmz2;

            try {
                percenthm.setText(rrhmz3 + " / " + progressBarhm.getMax());
            } catch (NumberFormatException e){
                Toast.makeText(getActivity(), "Fail", Toast.LENGTH_SHORT).show();
            }

            progressBarkm.setProgress(rrkmz3);
            progressBarhm.setProgress(rrhmz3);

                kmrr.setText(null);
                hmrr.setText(null);
            }
        });

        //this is exactly the same button like "btnrradd" but for mountainbikes
        //also, this button crashes the app
        btnmtbadd.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            int mtbkmz1 = Integer.parseInt(kmmtb.getText().toString());
            int mtbkmz2 = progressBarkm.getProgress();
            int mtbkmz3 = mtbkmz1 + mtbkmz2;

            try {
                percentkm.setText(mtbkmz3 + " / " + progressBarkm.getMax());

            } catch (NumberFormatException e){
                Toast.makeText(getActivity(), "Fail", Toast.LENGTH_SHORT).show();
            }

            int mtbhmz1 = Integer.parseInt(hmrr.getText().toString());
            int mtbhmz2 = progressBarhm.getProgress();
            int mtbhmz3 = mtbhmz1 + mtbhmz2;

            try {
                percenthm.setText(mtbhmz3 + " / " + progressBarhm.getMax());
            } catch (NumberFormatException e){
                Toast.makeText(getActivity(), "Fail", Toast.LENGTH_SHORT).show();
            }

            progressBarkm.setProgress(mtbkmz3);
            progressBarhm.setProgress(mtbhmz3);

                kmmtb.setText(null);
                hmmtb.setText(null);
            }
        });

        //not implemented yet, i want to safe the values of both TextViews under the progressbars.
        btnsave.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });

        return v;

    }
}

XML code:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="20dp"
    android:background="#EEf5DB"
    >

    <TextView
        android:id="@+id/kmgesamt"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginTop="10dp"
        android:background="#FE5F55"
        android:gravity="center"
        android:text=" Kilometer gesamt "
        android:textColor="@color/black"
        android:textSize="25sp"
        android:textStyle="italic"></TextView>

    <ProgressBar
        android:id="@+id/progressbarkm"
        style="?android:attr/progressBarStyleHorizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:scaleY="1.5"
        android:progress="0"
        android:max="2492"
        android:layout_marginTop="10dp"
        android:progressTint="#4F6367"
        android:background="#B8D8D8"
        android:progressDrawable="@drawable/progressbarkm"
        />

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="22sp"
        android:textStyle="italic"
        android:layout_gravity="center"
        android:textColor="@color/black"
        android:id="@+id/percentkm"
        android:layout_marginTop="5dp"/>

    <TextView
        android:id="@+id/hmgesamt"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text=" Höhenmeter gesamt "
        android:textSize="25sp"
        android:textColor="@color/black"
        android:layout_gravity="center"
        android:gravity="center"
        android:background="#FE5F55"
        android:textStyle="italic"
        android:layout_marginTop="20dp">
    </TextView>

    <ProgressBar
        android:id="@+id/progressbarhm"
        style="?android:attr/progressBarStyleHorizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:scaleY="1.5"
        android:progress="0"
        android:max="37557"
        android:layout_marginTop="10dp"
        android:progressTint="#4F6367"
        android:background="#B8D8D8"
        android:progressDrawable="@drawable/progressbarkm"
        />
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="22sp"
        android:textStyle="italic"
        android:layout_gravity="center"
        android:textColor="@color/black"
        android:id="@+id/percenthm"
        android:layout_marginTop="5dp"/>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="4dp"
        android:background="#7A9E9F"
        android:layout_marginTop="20dp"/>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_marginTop="20dp">


        <EditText
            android:layout_width="150dp"
            android:layout_height="wrap_content"
            android:hint="KM Rennrad"
            android:layout_marginLeft="20dp"
            android:textColor="@color/black"
            android:id="@+id/kmrr"
            android:inputType="number">

        </EditText>





    </LinearLayout>


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_marginTop="10dp">


        <EditText
            android:layout_width="150dp"
            android:layout_height="wrap_content"
            android:hint="HM Rennrad"
            android:layout_marginLeft="20dp"
            android:textColor="@color/black"
            android:id="@+id/hmrr"
            android:inputType="number">

        </EditText>

        <Button
            android:layout_width="100dp"
            android:layout_height="wrap_content"
            android:text="Add"
            android:textColor="@color/black"
            android:layout_marginLeft="40dp"
            android:layout_marginRight="50dp"
            android:backgroundTint="#7A9E9F"
            android:textSize="18sp"
            android:id="@+id/btnrradd"
            >
        </Button>


    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="4dp"
        android:background="#7A9E9F"
        android:layout_marginTop="20dp"/>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_marginTop="20dp">


        <EditText
            android:layout_width="150dp"
            android:layout_height="wrap_content"
            android:hint="KM MTB"
            android:layout_marginLeft="20dp"
            android:textColor="@color/black"
            android:id="@+id/kmmtb"
            android:inputType="number">

        </EditText>





    </LinearLayout>


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_marginTop="10dp">


        <EditText
            android:layout_width="150dp"
            android:layout_height="wrap_content"
            android:hint="HM MTB"
            android:layout_marginLeft="20dp"
            android:textColor="@color/black"
            android:id="@+id/hmmtb"
            android:inputType="number">

        </EditText>

        <Button
            android:layout_width="100dp"
            android:layout_height="wrap_content"
            android:text="Add"
            android:textColor="@color/black"
            android:layout_marginLeft="40dp"
            android:layout_marginRight="50dp"
            android:backgroundTint="#7A9E9F"
            android:textSize="18sp"
            android:id="@+id/btnmtbadd"
            >
        </Button>


    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="4dp"
        android:background="#7A9E9F"
        android:layout_marginTop="20dp"/>

    <Button
        android:layout_width="110dp"
        android:layout_height="wrap_content"
        android:text="Save"
        android:textColor="@color/black"
        android:backgroundTint="#7A9E9F"
        android:textSize="20sp"
        android:id="@+id/btnsave"
        android:layout_gravity="center"
        android:layout_marginTop="20dp">

    </Button>


</LinearLayout>

In my mind the btnmtbadd should work perfectly fine since the btnrradd has basically the same code and works.
But if i enter values for KM and HM for my mountainbike and press the add button the app crashes.
If i do the same for racing bicycle it shows exactly what it should show.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật