Program freezing after constant number of iterations

Can you post the CircularFIFO class code directly in the forum? Can’t read .ino on mobile

I also see some dynamic instanciations of smoothed and average CircularFIFO which possibly poke holes into your heap.