I think everyone is looking past an important hint here. Those pulses on the uarts RX pin. Those pulses could be read as data accidentally and cause a problem. I've been there before.

If you disable the UART, do the pulses disappear? What types of signals are near by (pin wise)? The goal is to find out what if anything connected to the pic or in the code would be causing the pulses you speak of. There is a chance this is just general noise if that is the case it needs to be suppressed.