My Serial Communication seems to be freezing, needing a reset.

Hello, I'm using the Serial Monitor to test my code, but it seems to be freezing for some reason. I'm using App Inventor 2 to send Bluetooth data to the Arduino with a HC-05 BT module. When sending from a button press, it works fine. I setup a Clock on the app to send data and a given speed. I went from 1 full second to 1 millisecond and received the data just fine. It's when I use a slider on the app, the arduino seems to freeze. I don't know if it's being overwhelmed with data or it's something else. I'm running 115200 baud. Here's my code:

#include<SoftwareSerial.h>

int bluetoothTX = 12;
int bluetoothRX = 13;

SoftwareSerial bluetooth(bluetoothTX, bluetoothRX);

char textA;
char textB;
int delimiter1 = '#';
int delimiter2;
int delimiter3;


int R;
int G;
int B;
int A;
int Rvalue;
int Gvalue;
int Bvalue;
int Avalue;


void setup() {
  
Serial.begin(115200);
bluetooth.begin(115200);

bluetooth.println("BT Online!");
Serial.println("Let's Go!");

}

void loop()
{
  if (bluetooth.available() == 10)
  {
    if (bluetooth.peek() == 35)
    {
    
      int delimiter1 = bluetooth.read();
      int R = bluetooth.read();
      int Rvalue = bluetooth.read();
      int G = bluetooth.read();
      int Gvalue = bluetooth.read();
      int B = bluetooth.read();
      int Bvalue = bluetooth.read();
      int A = bluetooth.read();
      int Avalue = bluetooth.read();
      int delimiter2 = bluetooth.read();
      

      if ((delimiter1 = 35) && (delimiter2 = 35))
      {

        Serial.print("R : ");
        Serial.print(Rvalue);
        Serial.print(" G : ");
        Serial.print(Gvalue);
        Serial.print(" B : ");
        Serial.print(Bvalue);
        Serial.print(" A : ");
        Serial.println(Avalue);
      }
  }
}
}

The following seems a bit silly. Why do you want exactly 10 bytes to be available, before taking action?

 if (bluetooth.available() == 10)

Unless a message or line delimiter is transmitted, the more common approach is to read bytes one by one, and parse "on the fly". You might find Serial Input Basics to be useful.

I noticed you are using software serial. If possible, use hardware serial instead because software serial causes interrupts in the code. I am not 100% sure that this is your problem but it is defiantly a good thing to look into changing.

The 115200 for software serial might be a problem. I know you mentioned that it worked with a button in your app, but still, the advise is to limit that to 19200 (or maybe 38400).

As indicated by jremington, below is a bit silly.

  if (bluetooth.available() == 10)

What if your serial prints start blocking because the output buffer is filled up? I would think that there is a chance that you receive more then 10 bytes before checking and hence the condition will never be true.
Change the == to >=.

I would also suggest to send an acknowledge back to the app; the app should not send new data before it has received the acknowledge.