Simple LED Chaser Misbehaves - 6x595s, 48 LEDs

I have a simple back-and-forth LED chaser, only one LED is lit at a time. My approach is multiply x2 until I get to 128 then I multiply by 0.5 until I reach 1.
It works fine with one shift register. Now I've added 5 more shift registers and I get nothing like I would expect, many LEDs are lit at once, the register closest to the Arduino behaves the worst, random, non-repeating, etc. Sometimes I will get repeating patterns that will freeze. Looking at my Serial.print's, the loops appear to be doing what they're supposed to.

Now for the strange part. If I handle the breadboard, it will unfreeze and start misbehaving again. Makes me amost wonder if there is something wrong with my breadboard. I do have a small capacitor between the latch pin and ground on each of the 595s. All the LED's cathodes are tied together going through a single current limiting resistor to ground (I thought that would be OK as only one LED should be lit at a time). Here's my code for the scaled up version (the non-working one) if that helps. Any hot tips appreciated.

Carl

//  Notes   : LED chaser, sweeps back and forth                
//          : shiftOutCode, blink without delay, analogRead     
//**************************************************************//
int latchPin = 8;    // Pin connected to ST_CP of 74HC595  (pin 12 on the 595 green wire)
int clockPin = 12;   // Pin connected to SH_CP of 74HC595  (pin 11 on the 595 yellow wire)
int dataPin = 11;    // Pin connected to DS of 74HC595   (pin 14 on the 595 blue wire)
int potPin = 2;      // A2 select the analog pin that connects to the middle lead on the potentiometer
int speakerPin = 3;  // has to be a PWM digital pin
int buttonPin = 2;   // D2 the number of the pushbutton pin
int potVal = 0;       // variable to store the value coming from the sensor (potentiometer)...
long previousMillis = 0;  // will store last time display was updated
long interVal = 1000;           // interval at which to update display (milliseconds)
int numOfRegisters = 6;
int regToDisplay = 1;
byte numberToDisplay = 1;
byte zeroByte = 0;
int numOfLEDs = numOfRegisters * 8;
//numberToDisplay counting up -or- down?
double x = 2;
void setup() {
  //set pins to output so you can control the shift register
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  pinMode(potPin, INPUT);
  pinMode(buttonPin, INPUT); 
  Serial.begin(9600);
  //initSwitches(); 
}
void loop() {
  potVal = analogRead(potPin);    // read the value from the sensor
  potVal = map(potVal,0,1024,50,241);
  unsigned long currentMillis = millis();
  
  interVal = 60000/potVal/numOfLEDs;  //converts potVal beats per minute to mS
  if(currentMillis - previousMillis > interVal) {
    // save the last time display was updated
    previousMillis = currentMillis;
    
    if (numberToDisplay == 1 && x == .5){ //currently counting down and at the botom
      if(regToDisplay == 1) {
        x = 2;                                      // start counting up
        numberToDisplay = numberToDisplay * x;
        tone(speakerPin,2640,10);
      } else {
        numberToDisplay = 128;
        regToDisplay = regToDisplay - 1;
      }
    } else if (numberToDisplay == 128 && x == 2){  //currently counting up and at the top
      if(regToDisplay == numOfRegisters) {
        x = .5;                                    // start counting down
        numberToDisplay = numberToDisplay * x;
        tone(speakerPin,2640,10);
      } else {
        numberToDisplay = 1;
        regToDisplay = regToDisplay + 1;
      } 
    }  else {
        numberToDisplay = numberToDisplay * x;        
    }
    digitalWrite (latchPin, LOW);
    for (int thisReg = numOfRegisters; thisReg > 0; thisReg --) {
      //Serial.println(thisReg);
      
      if (thisReg == regToDisplay){
        shiftOut(dataPin, clockPin, LSBFIRST, numberToDisplay);
      } else {
        shiftOut(dataPin, clockPin, LSBFIRST, zeroByte);
      }
    }
    digitalWrite (latchPin, HIGH);
/*
    Serial.print("reg ");
    Serial.print(regToDisplay);
    Serial.print(" num ");
    Serial.println(numberToDisplay);
*/
  }
}

This comes up several times a week.
Lack of decoupling or a capacitor on the clock line from a faulty tutorial or yes faulty bread board.

Thanks for the prompt reply GM!
On my single shift register version (the working one), I was getting the LSB and MSB both lighting at the same time after the project ran for a while. I added the cap to the latch pin and that seemed to correct the condition so I thought I had any required decoupling handled.

I will add caps to the clock pin as well. As they're all ganged together, I expect a single cap is all that is required but will add one to each register as I did with the latch pin. Once I try decoupling the clock pin, if I still have problems, I will swap breadboards. If still no go, I'm sure I'll be back.

Thanks again,
Carl

Noooooo
no caps on the clock, no caps on the latch.
Caps between supply and ground on each shift register.

OK, moved the caps from the latch pin to the power pin and you are correct on both counts. Regrets for the same old noob question.

Now I can see my code behaving and the faulty breadboard misbehaving. Thanks!

I will port the project to another board and report back.

[OT] Just got back from working out the last of the bugs on a 1947 Northern Hammond BV organ. Man does it sound good thru my 1966 Leslie speaker! Get this...the problem, Buddy noticed DC was ramping up (1.75V) onto the signal at a certain point and put a 4.7 Mohm resistor to bleed off the DC without sucking the sweetness out of the signal. We still don't know what caused the DC leakage, many theories tho. Anyhoo, it's fixed and victory beer time....

We still don't know what caused the DC leakage,

I would put my money on a capacitor getting old an leaky, a bit like me actually.

I swapped out the breadboard any everything works great now, thanks for holding my hand through this. Seems when I went to gang two breadboards together, I managed to seperaate the bottom from one of them. Next time I won't manhandle my breadboards like that duh.