FreeRTOS vTaskSuspendAll() is not thread safe and uxSchedulerSuspended variable becomes zero and asserts error

Our GUI library uses realloc function and that is not available in heap4.c. I may need to implement realloc i think

I will try your suggestion and see whether i am able to resolve this

@Eugin Just following up, has your issue been resolved?

No Adamds. Memory is getting corrupt and when it is trying to context switch after executing xTaskResumeAll(), it finds an invalid return address. Checked the stack for all the tasks and it is intact. Have enabled to debug stack overflows. Also checked the stack marker and found to be intact for all the tasks. It looks like Crank library is corrupting the memory and every time it gets stuck in the Crank thread

May be check with the maintainers of that library and see if they have any debugging support built in.

I am in touch with them now Gaurav. Thankyou