Printf's cause code violation

Whenever there is a printf statement in code the code violation light blinks slowly. It happens regardless of what variable types I’m printing, or even if its just text. Has anyone else had this problem?

This is on the 2006 controller using MPLAB + IFI Loader.
I have the proper serial port selected in IFI Loader, and Baud rate is 115200. Error occurs regardless of where the printf is.

I’ve seen this before if the loop is too fast it can make the processor angry.

We saw this in early testing when we wrote the first version of easyC

Add a small delay in the loop and see if that helps.

Can you post the code that is causing the issue?

If not, I think I had an issue like that when I switched to Kevin’s code, but I don’t remember what I did to fix it.

If you’re using my serial port code, a sure fire way to get the red-light-of-death when you send data is to not properly configure the interrupt service routine in user_routines_fast.c.