Pedro,

OK, so GP4 and GP5 are the outputs, the rest are inputs. Each output has a 1K resistor, so the max that goes into/out of there is 5/1K or 5mA each output, 10 mA total. 10 is well within any PIC limit. That isn't where the problem is.

In your original post you state the problem happens "sometimes." Does this mean a particular part will sometimes fault, or sometimes several parts in a lot will fault but each will fault every time?

Do you do any testing before shipping? If you have customer returns after test then the parts seem to have worked at least once.