The waveform draws properly. The FFT causes the program to hang