Task running at port PIC18F8680 is unstable

Hello! I have a projects running at port pic18f8860, but it is unstable! It has four task in current version, one for USART receive/transmitter, and one for CAN BUS receive/transmiter, and other for system status of running check.The system is running fine when it is just start, but the system will be crashed when it is running longer. The USART receive/transmiter  task running on queue and other  task is also! The configCPU_CLOCK_HZ was be setting to 40Mhz, and configTICK_RATE_HZ is 1000. what is happen! pls help me!

Task running at port PIC18F8680 is unstable

This isn’t really enough information. The first thing to always check is your stack usage.  Are any of the tasks running out of stack. How much RAM does a PIC18F8680 have?  I cannot find any reference to this device.

Task running at port PIC18F8680 is unstable

thank’s! Yes! I already check the stack usage, i can’t find a problem. The other simple task also may be crash when it running a longer timer, that is same blow: static SysCheck(void) {    for(;;)   {     uFlag |= 0x01;    WritePort(uFlag, 0x07);    portDelayTask(1000);    uFlag &= ~0x01;    WritePort(uFlag, 0x07);    portDealyTask(1000);   } } in here, WritePort(…) is a marco define which is used to write a byte to port, i used portENTER_CRITICAL/portEXIT_CRITICAL to protected port operation in PIC18F8680. uFlag is a global variable. btw! PIC18F8680 have 3092byte ram and 64K program memory, and 1 USART, 1 CAN node and other. The buad rate of UASRT is being set to 9600.