Sanity check error

Hello friends, https://www.dropbox.com/sh/py3jzsnjyyz61p6/AAADkxaIGizgB6ryVt7ixy8Fa?dl=0 Please find attached some images of the output that we receive (capture 2 image is outputting the very first lines of main without restarting the debugger and then freezing). Sometimes the Sanity check failed error occurs after maybe 30 sec – 1 min of switching between tasks (and on a line number 930 of queue.c). We are creating 4+ tasks, all defined with the same parameters and priorities as the one below: static xTaskHandle xHandler; xTaskGenericCreate(activateTask1, (const signed char*)”Task1″, 1024, NULL, 4, &xHandler, NULL, NULL); All the xTaskGenericCreate functions return 1. We tried different combinations of stack depth and priorities and each combination outputs same problem but with different order. We tested to see if the rtos heap was running out of memory, however xPortGetFreeHeapSize() function returns always 40000, even after we create all the tasks. Also we tried to use pvPortMalloc() to malloc memory space for the xTaskHandle taskBeaconHandler and then pass it to xTaskGenericCreate()​, however nothing changes and also the heap size is not getting decreased. I think the configuration we are using from a vendor is using a static allocation of memory during the compilation of the code. The behavior is really weird and not consistent. We feel that some buffer is overflowing. (When each task is run individually this problem does not appear)!! Anyone have any idea that can help us find the cause of the issue/error? Thank you.

Sanity check error

There is really not enough context here to start to provide an answer. Things like, which port you are using, what the sanity checks are, and what the tasks are doing. However, I will say that it is not intended for you to call xTaskGenericCreate() – it is not a documented API function, doesn’t appear in any examples, the reference manual, or the online API code. Please use either xTaskCreate() or xTaskCreateStatic().